Bug 276923

Summary: Crash during initial run of facial recognition
Product: [Applications] digikam Reporter: Jeff Robinson <jeffnik>
Component: Faces-RecognitionAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles, superandrzej
Priority: NOR    
Version: 2.0.0   
Target Milestone: ---   
Platform: Slackware   
OS: Linux   
Latest Commit: Version Fixed In: 2.0.0
Sentry Crash Report:

Description Jeff Robinson 2011-07-01 21:31:34 UTC
Application: digikam (2.0.0-rc)
KDE Platform Version: 4.4.3 (KDE 4.4.3)
Qt Version: 4.6.2
Operating System: Linux 2.6.33.4-smp i686
Distribution (Platform): Slackware Packages

-- Information about the crash:
On a fresh install of digikam 2.0.0-rc (upgraded from 1.9.0) all features seem to work properly until facial recognition starts.  As soon as the facial recognition starts (after telling the software to scan the album), Digikam crashes.

The crash can be reproduced every time.

 -- Backtrace:
Application: digiKam (digikam), signal: Illegal instruction
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/libgobject-2.0.so.0.2200.5-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
[Current thread is 1 (Thread 0xb0258740 (LWP 32183))]

Thread 14 (Thread 0xaed27b70 (LWP 32184)):
#0  0xb4ae1210 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xb4b89107 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x0821f677 in Digikam::ScanController::run (this=0x86928b0) at /usr/src/digikam-2.0.0-rc/core/digikam/database/scancontroller.cpp:618
#3  0xb4b881de in ?? () from /usr/lib/libQtCore.so.4
#4  0xb4adc830 in start_thread () from /lib/libpthread.so.0
#5  0xb48a715e in clone () from /lib/libc.so.6

Thread 13 (Thread 0xae527b70 (LWP 32187)):
#0  0xb4ae1210 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xb4b89107 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0xb68bfb70 in Digikam::ParkingThread::run (this=0x89d31c0) at /usr/src/digikam-2.0.0-rc/core/libs/threads/threadmanager.cpp:119
#3  0xb4b881de in ?? () from /usr/lib/libQtCore.so.4
#4  0xb4adc830 in start_thread () from /lib/libpthread.so.0
#5  0xb48a715e in clone () from /lib/libc.so.6

Thread 12 (Thread 0xadd27b70 (LWP 32188)):
#0  0xb4ae1528 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xaba80f49 in ?? () from /usr/lib/libxine.so.1
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 11 (Thread 0xab204b70 (LWP 32189)):
#0  0xb489f597 in select () from /lib/libc.so.6
#1  0xabaab2b4 in xine_usec_sleep () from /usr/lib/libxine.so.1
#2  0x00000000 in ?? ()

Thread 10 (Thread 0xaaa04b70 (LWP 32190)):
#0  0xb38751c1 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#1  0xb38755b1 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0xb3875ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0xb4cb5aef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0xb4c88689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0xb4c88ada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb4b85478 in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0xabace86a in ?? () from /usr/lib/kde4/plugins/phonon_backend/phonon_xine.so
#8  0xb4b881de in ?? () from /usr/lib/libQtCore.so.4
#9  0xb4adc830 in start_thread () from /lib/libpthread.so.0
#10 0xb48a715e in clone () from /lib/libc.so.6

Thread 9 (Thread 0xaa204b70 (LWP 32193)):
#0  0xb489c71c in poll () from /lib/libc.so.6
#1  0xab657081 in ?? () from /usr/lib/xine/plugins/1.27/xineplug_ao_out_alsa.so
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 8 (Thread 0xa9a04b70 (LWP 32194)):
#0  0xb4ae1210 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xaba92b18 in ?? () from /usr/lib/libxine.so.1
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 7 (Thread 0xa7a73b70 (LWP 32202)):
#0  0xb4ae0490 in pthread_mutex_unlock () from /lib/libpthread.so.0
#1  0xb3874f26 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#2  0xb38756dc in ?? () from /usr/lib/libglib-2.0.so.0
#3  0xb3875ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0xb4cb5aef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0xb4c88689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb4c88ada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0xb68bf042 in Digikam::WorkerObjectRunnable::run (this=0xb4bab68) at /usr/src/digikam-2.0.0-rc/core/libs/threads/threadmanager.cpp:196
#8  0xb4b7dd4c in ?? () from /usr/lib/libQtCore.so.4
#9  0xb4b881de in ?? () from /usr/lib/libQtCore.so.4
#10 0xb4adc830 in start_thread () from /lib/libpthread.so.0
#11 0xb48a715e in clone () from /lib/libc.so.6

Thread 6 (Thread 0xa6a73b70 (LWP 32204)):
#0  0xb4cb5b49 in ?? () from /usr/lib/libQtCore.so.4
#1  0xb3874f31 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#2  0xb38756dc in ?? () from /usr/lib/libglib-2.0.so.0
#3  0xb3875ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0xb4cb5aef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0xb4c88689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb4c88ada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0xb68bf042 in Digikam::WorkerObjectRunnable::run (this=0xb37c708) at /usr/src/digikam-2.0.0-rc/core/libs/threads/threadmanager.cpp:196
#8  0xb4b7dd4c in ?? () from /usr/lib/libQtCore.so.4
#9  0xb4b881de in ?? () from /usr/lib/libQtCore.so.4
#10 0xb4adc830 in start_thread () from /lib/libpthread.so.0
#11 0xb48a715e in clone () from /lib/libc.so.6

Thread 5 (Thread 0xa916cb70 (LWP 32205)):
[KCrash Handler]
#5  0xb412c7ab in cvCanny () from /usr/lib/libcv.so.2.1
#6  0xb4068ee9 in cvHaarDetectObjects () from /usr/lib/libcv.so.2.1
#7  0xb6da1509 in libface::FaceDetect::cascadeResult (this=0xa5ffb758, inputImage=0xa5f7c050, casc=0xa2e23ee0, params=...) at /usr/src/digikam-2.0.0-rc/extra/libkface/libface/FaceDetect.cpp:459
#8  0xb6da20e3 in libface::FaceDetect::detectFaces (this=0xa5ffb758, inputImage=0xa5f7c050, size=...) at /usr/src/digikam-2.0.0-rc/extra/libkface/libface/FaceDetect.cpp:752
#9  0xb6da7841 in libface::LibFace::detectFaces (this=0xa5b1d070, image=0xa5f7c050, originalSize=...) at /usr/src/digikam-2.0.0-rc/extra/libkface/libface/LibFace.cpp:157
#10 0xb6d92c03 in KFaceIface::Database::detectFaces (this=0xa613a4e8, image=...) at /usr/src/digikam-2.0.0-rc/extra/libkface/libkface/database.cpp:189
#11 0xb6d9a920 in KFaceIface::FaceDetector::detectFaces (this=0x9de7aec, image=...) at /usr/src/digikam-2.0.0-rc/extra/libkface/libkface/facedetector.cpp:107
#12 0x082fe9b4 in Digikam::DetectionWorker::process (this=0x9de7ae0, package=) at /usr/src/digikam-2.0.0-rc/core/utilities/facedetection/facepipeline.cpp:465
#13 0x082fede3 in Digikam::DetectionWorker::qt_metacall (this=0x9de7ae0, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xa836878) at /usr/src/digikam-2.0.0-rc/core/digikam/facepipeline_p.moc:298
#14 0xb4c8f26a in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#15 0xb4c997a6 in QMetaCallEvent::placeMetaCall(QObject*) () from /usr/lib/libQtCore.so.4
#16 0xb4c9a8ce in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#17 0xb68bfda9 in Digikam::WorkerObject::event (this=0x9de7ae0, e=0x0) at /usr/src/digikam-2.0.0-rc/core/libs/threads/workerobject.cpp:160
#18 0xb52a0d0c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#19 0xb52a795e in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#20 0xb5e16e1a in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#21 0xb4c8a06b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#22 0xb4c8ca43 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#23 0xb4c8cbad in QCoreApplication::sendPostedEvents(QObject*, int) () from /usr/lib/libQtCore.so.4
#24 0xb4cb5fbf in ?? () from /usr/lib/libQtCore.so.4
#25 0xb38720f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#26 0xb3875990 in ?? () from /usr/lib/libglib-2.0.so.0
#27 0xb3875ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#28 0xb4cb5ab5 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#29 0xb4c88689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#30 0xb4c88ada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#31 0xb68bf042 in Digikam::WorkerObjectRunnable::run (this=0x9b800b8) at /usr/src/digikam-2.0.0-rc/core/libs/threads/threadmanager.cpp:196
#32 0xb4b7dd4c in ?? () from /usr/lib/libQtCore.so.4
#33 0xb4b881de in ?? () from /usr/lib/libQtCore.so.4
#34 0xb4adc830 in start_thread () from /lib/libpthread.so.0
#35 0xb48a715e in clone () from /lib/libc.so.6

Thread 4 (Thread 0xa48ffb70 (LWP 32206)):
#0  0xb48b716a in __libc_enable_asynccancel () from /lib/libc.so.6
#1  0xb489c70b in poll () from /lib/libc.so.6
#2  0xb38825cb in g_poll () from /usr/lib/libglib-2.0.so.0
#3  0xb38757cb in ?? () from /usr/lib/libglib-2.0.so.0
#4  0xb3875ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#5  0xb4cb5aef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb4c88689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0xb4c88ada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#8  0xb68bf042 in Digikam::WorkerObjectRunnable::run (this=0x9dbf0a0) at /usr/src/digikam-2.0.0-rc/core/libs/threads/threadmanager.cpp:196
#9  0xb4b7dd4c in ?? () from /usr/lib/libQtCore.so.4
#10 0xb4b881de in ?? () from /usr/lib/libQtCore.so.4
#11 0xb4adc830 in start_thread () from /lib/libpthread.so.0
#12 0xb48a715e in clone () from /lib/libc.so.6

Thread 3 (Thread 0xa40ffb70 (LWP 32207)):
#0  0xb380ffd8 in clock_gettime () from /lib/librt.so.1
#1  0xb4cb2beb in ?? () from /usr/lib/libQtCore.so.4
#2  0xb4cb7df5 in ?? () from /usr/lib/libQtCore.so.4
#3  0xb4cb7e3a in ?? () from /usr/lib/libQtCore.so.4
#4  0xb4cb5cf8 in ?? () from /usr/lib/libQtCore.so.4
#5  0xb4cb5d85 in ?? () from /usr/lib/libQtCore.so.4
#6  0xb38751f0 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#7  0xb38755b1 in ?? () from /usr/lib/libglib-2.0.so.0
#8  0xb3875ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#9  0xb4cb5aef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#10 0xb4c88689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#11 0xb4c88ada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#12 0xb68bf042 in Digikam::WorkerObjectRunnable::run (this=0x9df9a48) at /usr/src/digikam-2.0.0-rc/core/libs/threads/threadmanager.cpp:196
#13 0xb4b7dd4c in ?? () from /usr/lib/libQtCore.so.4
#14 0xb4b881de in ?? () from /usr/lib/libQtCore.so.4
#15 0xb4adc830 in start_thread () from /lib/libpthread.so.0
#16 0xb48a715e in clone () from /lib/libc.so.6

Thread 2 (Thread 0xa38ffb70 (LWP 32208)):
#0  0xb4842d0f in memcpy () from /lib/libc.so.6
#1  0xb537a045 in QImage::copy(QRect const&) const () from /usr/lib/libQtGui.so.4
#2  0xb53788d7 in QImage::detach() () from /usr/lib/libQtGui.so.4
#3  0xb5379998 in QImage::bits() () from /usr/lib/libQtGui.so.4
#4  0xb669b199 in DImg (this=0xa38ff1c0, image=...) at /usr/src/digikam-2.0.0-rc/core/libs/dimg/dimg.cpp:150
#5  0xb6897510 in Digikam::PreviewLoadingTask::execute (this=0x9ccc870) at /usr/src/digikam-2.0.0-rc/core/libs/threadimageio/previewtask.cpp:263
#6  0xb687de29 in Digikam::LoadSaveThread::run (this=0x9d7d548) at /usr/src/digikam-2.0.0-rc/core/libs/threadimageio/loadsavethread.cpp:118
#7  0xb68c1812 in Digikam::DynamicThread::DynamicThreadPriv::run (this=0xbd3ab28) at /usr/src/digikam-2.0.0-rc/core/libs/threads/dynamicthread.cpp:328
#8  0xb4b7dd4c in ?? () from /usr/lib/libQtCore.so.4
#9  0xb4b881de in ?? () from /usr/lib/libQtCore.so.4
#10 0xb4adc830 in start_thread () from /lib/libpthread.so.0
#11 0xb48a715e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb0258740 (LWP 32183)):
#0  0xb4ae1528 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xb4b87ae1 in ?? () from /usr/lib/libQtCore.so.4
#2  0xb4b87c23 in QThread::msleep(unsigned long) () from /usr/lib/libQtCore.so.4
#3  0xabaf9204 in ?? () from /usr/lib/kde4/plugins/phonon_backend/phonon_xine.so
#4  0xb75027bf in ?? () from /usr/lib/libphonon.so.4
#5  0xb75011c5 in ?? () from /usr/lib/libphonon.so.4
#6  0xb74fd42b in ?? () from /usr/lib/libphonon.so.4
#7  0xb47f5fdf in exit () from /lib/libc.so.6
#8  0xb532207b in ?? () from /usr/lib/libQtGui.so.4
#9  0xb5e167ca in KApplication::xioErrhandler(_XDisplay*) () from /usr/lib/libkdeui.so.5
#10 0xb5e16806 in ?? () from /usr/lib/libkdeui.so.5
#11 0xb4621726 in _XIOError () from /usr/lib/libX11.so.6
#12 0xb4628a3a in ?? () from /usr/lib/libX11.so.6
#13 0xb4629376 in _XEventsQueued () from /usr/lib/libX11.so.6
#14 0xb4611e9f in XEventsQueued () from /usr/lib/libX11.so.6
#15 0xb535df25 in ?? () from /usr/lib/libQtGui.so.4
#16 0xb3874f31 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#17 0xb38756dc in ?? () from /usr/lib/libglib-2.0.so.0
#18 0xb3875ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#19 0xb4cb5aef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#20 0xb535dd55 in ?? () from /usr/lib/libQtGui.so.4
#21 0xb4c88689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#22 0xb4c88ada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#23 0xb4c8cc6f in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#24 0xb52a0da7 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#25 0x0830d3e1 in main (argc=1, argv=0xbfc559b4) at /usr/src/digikam-2.0.0-rc/core/digikam/main/main.cpp:232

Reported using DrKonqi
Comment 1 caulier.gilles 2011-07-01 21:54:55 UTC
Crash is in OpenCV library. Which version you use ? Got to Help/Components Info for details.

Gilles Caulier
Comment 2 Jeff Robinson 2011-07-01 22:20:36 UTC
My current version of OpenCV is 2.1 which appears to be from either a 3rd-party binary package I downloaded or a SlackBuild.  I will upgrade to OpenCV 2.3.0 rc and let you know the result.
Comment 3 caulier.gilles 2011-07-02 10:02:26 UTC
digiKam 2.0.0 RC is out. Please check if crash is reproducible with this version.

Thanks in advance

Gilles Caulier
Comment 4 Jeff Robinson 2011-07-02 15:08:16 UTC
(In reply to comment #3)
> digiKam 2.0.0 RC is out. Please check if crash is reproducible with this
> version.
> 
> Thanks in advance
> 
> Gilles Caulier

Hi Gilles,

I've installed the latest OpenCV library and recompiled Digikam 2.0.0 RC, but seem to run into the same problem.

The following information appears on the console:
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kconf_update.so
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kdeinit4: preparing to launch /usr/lib/kde4/kio_file.so
kdeinit4: preparing to launch /usr/lib/kde4/kio_file.so
kdeinit4: preparing to launch /usr/lib/kde4/kio_file.so
kdeinit4: preparing to launch /usr/lib/kde4/kio_file.so
kdeinit4: preparing to launch /usr/lib/kde4/kio_file.so
kdeinit4: preparing to launch /usr/lib/kde4/kio_digikamdates.so
kdeinit4: preparing to launch /usr/lib/kde4/kio_digikamalbums.so
kdeinit4: preparing to launch /usr/lib/kde4/kio_file.so
kdeinit4: preparing to launch /usr/lib/kde4/kio_file.so
kdeinit4: preparing to launch /usr/lib/kde4/kio_file.so
kdeinit4: preparing to launch /usr/lib/kde4/kio_file.so
kdeinit4: preparing to launch /usr/lib/kde4/kio_file.so
kdeinit4: preparing to launch /usr/lib/kde4/kio_file.so
kdeinit4: preparing to launch /usr/lib/kde4/kio_file.so
Cascade directory located as : /usr/share/apps/libkface/haarcascades
digikam: Fatal IO error: client killed
KCrash: Application 'digikam' crashing...
sock_file=/home/edited/.kde/socket-kilgore/kdeinit4_localhost_10
kdeinit4: preparing to launch /usr/lib/kde4/libexec/drkonqi

and here is a list of the component levels currently installed:
digiKam version 2.0.0-rc
Exiv2 can write to Jp2: Yes
Exiv2 can write to Jpeg: Yes
Exiv2 can write to Pgf: Yes
Exiv2 can write to Png: Yes
Exiv2 can write to Tiff: Yes
Exiv2 supports XMP metadata: Yes
LibCImg: 130
LibClapack: internal library
LibExiv2: 0.21.1
LibJPEG: 80
LibJasper: 1.900.1
LibKDE: 4.4.3 (KDE 4.4.3)
LibKExiv2: 2.0.0
LibKMap: 2.0.0
LibKdcraw: 2.0.0
LibLCMS: 119
LibPGF: 6.11.24 - internal library
LibPNG: 1.4.3
LibQt: 4.6.2
LibRaw: 0.13.5
LibTIFF: LIBTIFF, Version 3.9.4 Copyright (c) 1988-1996 Sam Leffler Copyright (c) 1991-1996 Silicon Graphics, Inc.
Marble Widget: 0.9.3
Parallelized demosaicing: Yes
Database backend: QSQLITE
LibGphoto2: 2.4.9
LibKface: 2.0.0
LibKipi: 1.2.0
LibOpenCV: 2.3.0
Libface: 0.2
Comment 5 caulier.gilles 2011-07-02 16:14:57 UTC
What's the gdb backtrace in this case ?

Can you see which image crash digiKam ? Look debug statements in the console.

Gilles Caulier
Comment 6 Jeff Robinson 2011-07-02 19:54:15 UTC
(In reply to comment #5)
> What's the gdb backtrace in this case ?
> 
> Can you see which image crash digiKam ? Look debug statements in the console.
> 
> Gilles Caulier

When I run the facial recognition this is the feedback from the console.
Cascade directory located as : /usr/share/apps/libkface/haarcascades
digikam: Fatal IO error: client killed
KCrash: Application 'digikam' crashing...
sock_file=/home/edited/.kde/socket-kilgore/kdeinit4_localhost_10
QFile::at: Cannot set file position 2152 
QFile::at: Cannot set file position 2130820542 
kdeinit4: preparing to launch /usr/lib/kde4/libexec/drkonqi
digikam(23279)/digikam (core) Digikam::PreviewLoadingTask::execute: Cannot extract preview for  "/data/Portfolio/album/Mike_Deal_icon.xcf" 

[1]+  Stopped                 digikam

Once I tell KDE to display the debug information the console then displays:
libpng warning: zTXt: CRC error
libpng warning: zTXt: CRC error
libpng warning: iTXt: CRC error
libpng warning: zTXt: CRC error
libpng warning: zTXt: CRC error
libpng warning: iTXt: CRC error
libpng warning: zTXt: CRC error
libpng warning: zTXt: CRC error
libpng warning: iTXt: CRC error
libpng warning: zTXt: CRC error
libpng warning: zTXt: CRC error
libpng warning: iTXt: CRC error
QSqlDatabasePrivate::removeDatabase: connection 'digikamDatabase-134589296' is still in use, all queries will cease to work.
QSqlDatabasePrivate::removeDatabase: connection 'digikamDatabase-134589296' is still in use, all queries will cease to work.
QSocketNotifier: Invalid socket 14 and type 'Read', disabling...
QSocketNotifier: Invalid socket 14 and type 'Read', disabling...

warning: the debug information found in "/usr/lib/libqca.so.2.0.2.debug" does not match "/usr/lib/libqca.so.2" (CRC mismatch).

DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.

The debug information is:
Application: digiKam (digikam), signal: Illegal instruction
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/libgobject-2.0.so.0.2200.5-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
[Current thread is 1 (Thread 0xb002f740 (LWP 23279))]

Thread 14 (Thread 0xaeafab70 (LWP 23287)):
#0  0xb4aaf210 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xb4b57107 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x0821f677 in Digikam::ScanController::run (this=0x86c5430) at /usr/src/digikam-2.0.0-rc/core/digikam/database/scancontroller.cpp:618
#3  0xb4b561de in ?? () from /usr/lib/libQtCore.so.4
#4  0xb4aaa830 in start_thread () from /lib/libpthread.so.0
#5  0xb487515e in clone () from /lib/libc.so.6

Thread 13 (Thread 0xae2fab70 (LWP 23291)):
#0  0xb4aaf210 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xb4b57107 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0xb688db70 in Digikam::ParkingThread::run (this=0x893efb8) at /usr/src/digikam-2.0.0-rc/core/libs/threads/threadmanager.cpp:119
#3  0xb4b561de in ?? () from /usr/lib/libQtCore.so.4
#4  0xb4aaa830 in start_thread () from /lib/libpthread.so.0
#5  0xb487515e in clone () from /lib/libc.so.6

Thread 12 (Thread 0xab56eb70 (LWP 23304)):
#0  0xb4aaf528 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xab972f49 in ?? () from /usr/lib/libxine.so.1
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 11 (Thread 0xaa902b70 (LWP 23306)):
#0  0xb486d597 in select () from /lib/libc.so.6
#1  0xab99d2b4 in xine_usec_sleep () from /usr/lib/libxine.so.1
#2  0x00000000 in ?? ()

Thread 10 (Thread 0xaa102b70 (LWP 23307)):
#0  0xb35c8d38 in ?? () from /usr/X11R6/lib/libgthread-2.0.so.0
#1  0xb379a3a2 in g_thread_self () from /usr/lib/libglib-2.0.so.0
#2  0xb3774aae in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0xb4c83aef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0xb4c56689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0xb4c56ada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb4b53478 in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0xab9c086a in ?? () from /usr/lib/kde4/plugins/phonon_backend/phonon_xine.so
#8  0xb4b561de in ?? () from /usr/lib/libQtCore.so.4
#9  0xb4aaa830 in start_thread () from /lib/libpthread.so.0
#10 0xb487515e in clone () from /lib/libc.so.6

Thread 9 (Thread 0xa9902b70 (LWP 23310)):
#0  0xb486a71c in poll () from /lib/libc.so.6
#1  0xaad55081 in ?? () from /usr/lib/xine/plugins/1.27/xineplug_ao_out_alsa.so
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 8 (Thread 0xa9102b70 (LWP 23311)):
#0  0xb4aaf210 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xab984b18 in ?? () from /usr/lib/libxine.so.1
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 7 (Thread 0xa616cb70 (LWP 23342)):
#0  0xb4aae490 in pthread_mutex_unlock () from /lib/libpthread.so.0
#1  0xb377483f in ?? () from /usr/lib/libglib-2.0.so.0
#2  0xb3774ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0xb4c83aef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0xb4c56689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0xb4c56ada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb688d042 in Digikam::WorkerObjectRunnable::run (this=0x9995618) at /usr/src/digikam-2.0.0-rc/core/libs/threads/threadmanager.cpp:196
#7  0xb4b4bd4c in ?? () from /usr/lib/libQtCore.so.4
#8  0xb4b561de in ?? () from /usr/lib/libQtCore.so.4
#9  0xb4aaa830 in start_thread () from /lib/libpthread.so.0
#10 0xb487515e in clone () from /lib/libc.so.6

Thread 6 (Thread 0xa716cb70 (LWP 23343)):
#0  0xb377477d in ?? () from /usr/lib/libglib-2.0.so.0
#1  0xb3774ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#2  0xb4c83aef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#3  0xb4c56689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0xb4c56ada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0xb688d042 in Digikam::WorkerObjectRunnable::run (this=0x98fcad0) at /usr/src/digikam-2.0.0-rc/core/libs/threads/threadmanager.cpp:196
#6  0xb4b4bd4c in ?? () from /usr/lib/libQtCore.so.4
#7  0xb4b561de in ?? () from /usr/lib/libQtCore.so.4
#8  0xb4aaa830 in start_thread () from /lib/libpthread.so.0
#9  0xb487515e in clone () from /lib/libc.so.6

Thread 5 (Thread 0xa696cb70 (LWP 23344)):
[KCrash Handler]
#5  0xb4234f38 in cvCanny () from /usr/lib/libopencv_imgproc.so.2.3
#6  0xb3f35326 in cvHaarDetectObjectsForROC(void const*, CvHaarClassifierCascade*, CvMemStorage*, std::vector<int, std::allocator<int> >&, std::vector<double, std::allocator<double> >&, double, int, int, CvSize, CvSize, bool) () from /usr/lib/libopencv_objdetect.so.2.3
#7  0xb3f35bce in cvHaarDetectObjects () from /usr/lib/libopencv_objdetect.so.2.3
#8  0xb6d6f5eb in libface::FaceDetect::cascadeResult (this=0xaa43ef8, inputImage=0xbbd4d90, casc=0xbd20920, params=...) at /usr/src/digikam-2.0.0-rc/extra/libkface/libface/FaceDetect.cpp:459
#9  0xb6d701c3 in libface::FaceDetect::detectFaces (this=0xaa43ef8, inputImage=0xbbd4d90, size=...) at /usr/src/digikam-2.0.0-rc/extra/libkface/libface/FaceDetect.cpp:752
#10 0xb6d75921 in libface::LibFace::detectFaces (this=0xa4f2f48, image=0xbbd4d90, originalSize=...) at /usr/src/digikam-2.0.0-rc/extra/libkface/libface/LibFace.cpp:157
#11 0xb6d60ce3 in KFaceIface::Database::detectFaces (this=0xb39a730, image=...) at /usr/src/digikam-2.0.0-rc/extra/libkface/libkface/database.cpp:189
#12 0xb6d68a00 in KFaceIface::FaceDetector::detectFaces (this=0xbcbb684, image=...) at /usr/src/digikam-2.0.0-rc/extra/libkface/libkface/facedetector.cpp:107
#13 0x082fe9b4 in Digikam::DetectionWorker::process (this=0xbcbb678, package=) at /usr/src/digikam-2.0.0-rc/core/utilities/facedetection/facepipeline.cpp:465
#14 0x082fede3 in Digikam::DetectionWorker::qt_metacall (this=0xbcbb678, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xa2ca358) at /usr/src/digikam-2.0.0-rc/core/digikam/facepipeline_p.moc:298
#15 0xb4c5d26a in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#16 0xb4c677a6 in QMetaCallEvent::placeMetaCall(QObject*) () from /usr/lib/libQtCore.so.4
#17 0xb4c688ce in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#18 0xb688dda9 in Digikam::WorkerObject::event (this=0xbcbb678, e=0xa6969e2c) at /usr/src/digikam-2.0.0-rc/core/libs/threads/workerobject.cpp:160
#19 0xb526ed0c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#20 0xb527595e in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#21 0xb5de4e1a in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#22 0xb4c5806b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#23 0xb4c5aa43 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#24 0xb4c5abad in QCoreApplication::sendPostedEvents(QObject*, int) () from /usr/lib/libQtCore.so.4
#25 0xb4c83fbf in ?? () from /usr/lib/libQtCore.so.4
#26 0xb37710f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#27 0xb3774990 in ?? () from /usr/lib/libglib-2.0.so.0
#28 0xb3774ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#29 0xb4c83ab5 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#30 0xb4c56689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#31 0xb4c56ada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#32 0xb688d042 in Digikam::WorkerObjectRunnable::run (this=0xbbba8b8) at /usr/src/digikam-2.0.0-rc/core/libs/threads/threadmanager.cpp:196
#33 0xb4b4bd4c in ?? () from /usr/lib/libQtCore.so.4
#34 0xb4b561de in ?? () from /usr/lib/libQtCore.so.4
#35 0xb4aaa830 in start_thread () from /lib/libpthread.so.0
#36 0xb487515e in clone () from /lib/libc.so.6

Thread 4 (Thread 0xa886ab70 (LWP 23345)):
#0  0xb488516a in __libc_enable_asynccancel () from /lib/libc.so.6
#1  0xb486a70b in poll () from /lib/libc.so.6
#2  0xb37815cb in g_poll () from /usr/lib/libglib-2.0.so.0
#3  0xb37747cb in ?? () from /usr/lib/libglib-2.0.so.0
#4  0xb3774ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#5  0xb4c83aef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb4c56689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0xb4c56ada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#8  0xb688d042 in Digikam::WorkerObjectRunnable::run (this=0xbd56ba0) at /usr/src/digikam-2.0.0-rc/core/libs/threads/threadmanager.cpp:196
#9  0xb4b4bd4c in ?? () from /usr/lib/libQtCore.so.4
#10 0xb4b561de in ?? () from /usr/lib/libQtCore.so.4
#11 0xb4aaa830 in start_thread () from /lib/libpthread.so.0
#12 0xb487515e in clone () from /lib/libc.so.6

Thread 3 (Thread 0xa4733b70 (LWP 23346)):
#0  0xb4aae490 in pthread_mutex_unlock () from /lib/libpthread.so.0
#1  0xb376fd17 in g_main_context_query () from /usr/lib/libglib-2.0.so.0
#2  0xb37745fc in ?? () from /usr/lib/libglib-2.0.so.0
#3  0xb3774ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0xb4c83aef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0xb4c56689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb4c56ada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0xb688d042 in Digikam::WorkerObjectRunnable::run (this=0xbe79680) at /usr/src/digikam-2.0.0-rc/core/libs/threads/threadmanager.cpp:196
#8  0xb4b4bd4c in ?? () from /usr/lib/libQtCore.so.4
#9  0xb4b561de in ?? () from /usr/lib/libQtCore.so.4
#10 0xb4aaa830 in start_thread () from /lib/libpthread.so.0
#11 0xb487515e in clone () from /lib/libc.so.6

Thread 2 (Thread 0xa3f33b70 (LWP 23347)):
#0  0xb66691c5 in DImg (this=0xa3f331c0, image=...) at /usr/src/digikam-2.0.0-rc/core/libs/dimg/dimg.cpp:156
#1  0xb6865510 in Digikam::PreviewLoadingTask::execute (this=0xbbe65d0) at /usr/src/digikam-2.0.0-rc/core/libs/threadimageio/previewtask.cpp:263
#2  0xb684be29 in Digikam::LoadSaveThread::run (this=0xbb12570) at /usr/src/digikam-2.0.0-rc/core/libs/threadimageio/loadsavethread.cpp:118
#3  0xb688f812 in Digikam::DynamicThread::DynamicThreadPriv::run (this=0xbcbb008) at /usr/src/digikam-2.0.0-rc/core/libs/threads/dynamicthread.cpp:328
#4  0xb4b4bd4c in ?? () from /usr/lib/libQtCore.so.4
#5  0xb4b561de in ?? () from /usr/lib/libQtCore.so.4
#6  0xb4aaa830 in start_thread () from /lib/libpthread.so.0
#7  0xb487515e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb002f740 (LWP 23279)):
#0  0xb4aaf528 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xb4b55ae1 in ?? () from /usr/lib/libQtCore.so.4
#2  0xb4b55c23 in QThread::msleep(unsigned long) () from /usr/lib/libQtCore.so.4
#3  0xab9eb204 in ?? () from /usr/lib/kde4/plugins/phonon_backend/phonon_xine.so
#4  0xb74d07bf in ?? () from /usr/lib/libphonon.so.4
#5  0xb74cf1c5 in ?? () from /usr/lib/libphonon.so.4
#6  0xb74cb42b in ?? () from /usr/lib/libphonon.so.4
#7  0xb47c3fdf in exit () from /lib/libc.so.6
#8  0xb52f007b in ?? () from /usr/lib/libQtGui.so.4
#9  0xb5de47ca in KApplication::xioErrhandler(_XDisplay*) () from /usr/lib/libkdeui.so.5
#10 0xb5de4806 in ?? () from /usr/lib/libkdeui.so.5
#11 0xb45ef726 in _XIOError () from /usr/lib/libX11.so.6
#12 0xb45f6a3a in ?? () from /usr/lib/libX11.so.6
#13 0xb45f7376 in _XEventsQueued () from /usr/lib/libX11.so.6
#14 0xb45dfe9f in XEventsQueued () from /usr/lib/libX11.so.6
#15 0xb532bfae in ?? () from /usr/lib/libQtGui.so.4
#16 0xb37741f0 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#17 0xb37745b1 in ?? () from /usr/lib/libglib-2.0.so.0
#18 0xb3774ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#19 0xb4c83aef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#20 0xb532bd55 in ?? () from /usr/lib/libQtGui.so.4
#21 0xb4c56689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#22 0xb4c56ada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#23 0xb4c5ac6f in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#24 0xb526eda7 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#25 0x0830d3e1 in main (argc=1, argv=0xbfde5f74) at /usr/src/digikam-2.0.0-rc/core/digikam/main/main.cpp:232
Comment 7 Marcel Wiesweg 2011-07-11 15:46:09 UTC
> Application: digiKam (digikam), signal: Illegal instruction

"Illegal instruction" or SIGILL means the processor was given an instruction to execute which it does not support.
Most probably, your OpenCV was compiled requiring some sort of SSE which your compiler does not speak.
Comment 8 Jeff Robinson 2011-07-12 02:59:44 UTC
(In reply to comment #7)
> > Application: digiKam (digikam), signal: Illegal instruction
> 
> "Illegal instruction" or SIGILL means the processor was given an instruction to
> execute which it does not support.
> Most probably, your OpenCV was compiled requiring some sort of SSE which your
> compiler does not speak.

This was the exact problem.  The machine that OpenCV crashed on was using an Athlon processor.  The odd thing is that I built OpenCV on that same machine but it didn't change the configuration or acknowledge the lack of SSE.

I changed the configure options to remove SSE support, recompiled, and now everything works as expected.
Comment 9 Andrzej 2011-09-20 19:50:52 UTC
Jeff,

I have 2 questions:
1) how did you exactly remove SSE support (I also have Athlon processor but in my case digikam won't even start)?
2) did you report this bug to OpenCV developers?

thanks in advance

Andrzej