Bug 335624 - digiKam crash when I start face recognition
Summary: digiKam crash when I start face recognition
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Unclassified
Component: Faces-Recognition (show other bugs)
Version: 4.0.0
Platform: Ubuntu Packages Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2014-05-31 12:19 UTC by christian.rioult
Modified: 2017-07-26 18:07 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.3.0


Attachments
New crash information added by DrKonqi (23.78 KB, text/plain)
2014-06-15 18:07 UTC, Hatl
Details
New crash information added by DrKonqi (19.13 KB, text/plain)
2014-08-07 19:01 UTC, Christian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description christian.rioult 2014-05-31 12:19:32 UTC
Application: digikam (4.0.0)
KDE Platform Version: 4.13.0
Qt Version: 4.8.6
Operating System: Linux 3.13.0-27-generic i686
Distribution: Ubuntu 14.04 LTS

-- Information about the crash:
- What I was doing when the application crashed: starting a face recognition with a small amount of photos.
Running DK under Xubuntu on an old PC with only 1go memory.

The crash can be reproduced every time.

-- Backtrace:
Application: digiKam (digikam), signal: Segmentation fault
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0xad0e1900 (LWP 4011))]

Thread 8 (Thread 0xaa4b1b40 (LWP 4014)):
#0  0xb30e1d2e in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#1  0xb30e2138 in g_mutex_unlock () from /lib/i386-linux-gnu/libglib-2.0.so.0
#2  0xb309c372 in g_main_context_acquire () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0xb309d288 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0xb309d76b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0xade86e9a in ?? () from /usr/lib/i386-linux-gnu/libgio-2.0.so.0
#6  0xb30c39ca in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0xb34fff70 in start_thread (arg=0xaa4b1b40) at pthread_create.c:312
#8  0xb46b970e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 7 (Thread 0xa9affb40 (LWP 4015)):
#0  0xb3502030 in __GI___pthread_mutex_lock (mutex=0x8cba058) at ../nptl/pthread_mutex_lock.c:63
#1  0xb46c6af4 in pthread_mutex_lock (mutex=0x8cba058) at forward.c:192
#2  0xb30e2100 in g_mutex_lock () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0xb309ce0b in g_main_context_check () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0xb309d37a in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0xb309d528 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#6  0xb309d57e in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0xb30c39ca in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#8  0xb34fff70 in start_thread (arg=0xa9affb40) at pthread_create.c:312
#9  0xb46b970e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 6 (Thread 0xa88feb40 (LWP 4019)):
#0  0xb772d424 in __kernel_vsyscall ()
#1  0xb3503d4b in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:187
#2  0xb46c68ec in __pthread_cond_wait (cond=0x8dcfd00, mutex=0x8dcfce8) at forward.c:149
#3  0xb49ad0f5 in wait (time=4294967295, this=0x8dcfce8) at thread/qwaitcondition_unix.cpp:86
#4  QWaitCondition::wait (this=this@entry=0x8dcfc5c, mutex=mutex@entry=0x8dcfc58, time=time@entry=4294967295) at thread/qwaitcondition_unix.cpp:158
#5  0x0821c064 in Digikam::ScanController::run (this=0x8dc86c8) at /build/buildd/digikam-4.0.0/core/digikam/database/scancontroller.cpp:725
#6  0xb49acb6f in QThreadPrivate::start (arg=0x8dc86c8) at thread/qthread_unix.cpp:349
#7  0xb34fff70 in start_thread (arg=0xa88feb40) at pthread_create.c:312
#8  0xb46b970e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 5 (Thread 0xa7645b40 (LWP 4020)):
#0  0xb30e20f8 in g_mutex_lock () from /lib/i386-linux-gnu/libglib-2.0.so.0
#1  0xb309ccc6 in g_main_context_check () from /lib/i386-linux-gnu/libglib-2.0.so.0
#2  0xb309d37a in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0xb309d528 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0xb4aee95f in QEventDispatcherGlib::processEvents (this=0xa9b06010, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#5  0xb4abd823 in QEventLoop::processEvents (this=this@entry=0xa7645098, flags=...) at kernel/qeventloop.cpp:149
#6  0xb4abdb49 in QEventLoop::exec (this=this@entry=0xa7645098, flags=...) at kernel/qeventloop.cpp:204
#7  0xb49aa23d in QThread::exec (this=this@entry=0x8dcbbb0) at thread/qthread.cpp:537
#8  0xb4a9dc44 in QInotifyFileSystemWatcherEngine::run (this=0x8dcbbb0) at io/qfilesystemwatcher_inotify.cpp:265
#9  0xb49acb6f in QThreadPrivate::start (arg=0x8dcbbb0) at thread/qthread_unix.cpp:349
#10 0xb34fff70 in start_thread (arg=0xa7645b40) at pthread_create.c:312
#11 0xb46b970e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 4 (Thread 0x9f11ab40 (LWP 4048)):
#0  0xb30e1d2e in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#1  0xb30e2138 in g_mutex_unlock () from /lib/i386-linux-gnu/libglib-2.0.so.0
#2  0xb309d3d3 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0xb309d528 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0xb4aee95f in QEventDispatcherGlib::processEvents (this=0x9c7d7660, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#5  0xb4abd823 in QEventLoop::processEvents (this=this@entry=0x9f11a098, flags=...) at kernel/qeventloop.cpp:149
#6  0xb4abdb49 in QEventLoop::exec (this=this@entry=0x9f11a098, flags=...) at kernel/qeventloop.cpp:204
#7  0xb6a38552 in Digikam::WorkerObjectRunnable::run (this=0xb643548) at /build/buildd/digikam-4.0.0/core/libs/threads/threadmanager.cpp:196
#8  0xb499ff07 in QThreadPoolThread::run (this=0x9d0d710) at concurrent/qthreadpool.cpp:108
#9  0xb49acb6f in QThreadPrivate::start (arg=0x9d0d710) at thread/qthread_unix.cpp:349
#10 0xb34fff70 in start_thread (arg=0x9f11ab40) at pthread_create.c:312
#11 0xb46b970e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 3 (Thread 0x99bc9b40 (LWP 4057)):
[KCrash Handler]
#7  isEmpty (this=0x89) at /usr/include/qt4/QtCore/qmap.h:203
#8  Digikam::FaceTags::getOrCreateTagForIdentity (attributes=...) at /build/buildd/digikam-4.0.0/core/libs/database/faces/facetags.cpp:286
#9  0x08331911 in Digikam::DatabaseWriter::process (this=this@entry=0xb40ce40, package=...) at /build/buildd/digikam-4.0.0/core/utilities/facemanagement/facepipeline.cpp:661
#10 0x08332224 in Digikam::DatabaseWriter::qt_static_metacall (_o=0xb40ce40, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xa9bc5bb8) at /build/buildd/digikam-4.0.0/obj-i686-linux-gnu/core/digikam/facepipeline_p.moc:493
#11 0xb4ad08aa in QMetaCallEvent::placeMetaCall (this=0x9b5c0fb0, object=0xb40ce40) at kernel/qobject.cpp:524
#12 0xb4ad86fb in QObject::event (this=this@entry=0xb40ce40, e=e@entry=0x9b5c0fb0) at kernel/qobject.cpp:1194
#13 0xb6a39f1c in Digikam::WorkerObject::event (this=0xb40ce40, e=0x9b5c0fb0) at /build/buildd/digikam-4.0.0/core/libs/threads/workerobject.cpp:160
#14 0xb501b7f4 in QApplicationPrivate::notify_helper (this=0x8b85a60, receiver=0xb40ce40, e=0x9b5c0fb0) at kernel/qapplication.cpp:4567
#15 0xb50222d3 in QApplication::notify (this=0xbf979ff8, receiver=receiver@entry=0xb40ce40, e=e@entry=0x9b5c0fb0) at kernel/qapplication.cpp:4353
#16 0xb5b6b0a4 in KApplication::notify (this=0xbf979ff8, receiver=0xb40ce40, event=0x9b5c0fb0) at ../../kdeui/kernel/kapplication.cpp:311
#17 0xb4abee4a in QCoreApplication::notifyInternal (this=0xbf979ff8, receiver=receiver@entry=0xb40ce40, event=event@entry=0x9b5c0fb0) at kernel/qcoreapplication.cpp:953
#18 0xb4ac270d in sendEvent (event=0x9b5c0fb0, receiver=0xb40ce40) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#19 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x9d0f320) at kernel/qcoreapplication.cpp:1577
#20 0xb4ac2c1c in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1470
#21 0xb4aef23e in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#22 postEventSourceDispatch (s=0xa9b0a2f0) at kernel/qeventdispatcher_glib.cpp:287
#23 0xb309d1e3 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#24 0xb309d468 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#25 0xb309d528 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#26 0xb4aee93b in QEventDispatcherGlib::processEvents (this=0xa9b03190, flags=...) at kernel/qeventdispatcher_glib.cpp:434
#27 0xb4abd823 in QEventLoop::processEvents (this=this@entry=0x99bc9098, flags=...) at kernel/qeventloop.cpp:149
#28 0xb4abdb49 in QEventLoop::exec (this=this@entry=0x99bc9098, flags=...) at kernel/qeventloop.cpp:204
#29 0xb6a38552 in Digikam::WorkerObjectRunnable::run (this=0x9e01358) at /build/buildd/digikam-4.0.0/core/libs/threads/threadmanager.cpp:196
#30 0xb499ff07 in QThreadPoolThread::run (this=0x9d0f210) at concurrent/qthreadpool.cpp:108
#31 0xb49acb6f in QThreadPrivate::start (arg=0x9d0f210) at thread/qthread_unix.cpp:349
#32 0xb34fff70 in start_thread (arg=0x99bc9b40) at pthread_create.c:312
#33 0xb46b970e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 2 (Thread 0x923bab40 (LWP 4072)):
#0  0xb772d424 in __kernel_vsyscall ()
#1  0xb46c7392 in __GI___clock_gettime (clock_id=1, tp=0x923b9e28) at ../sysdeps/unix/clock_gettime.c:115
#2  0xb4a078cc in do_gettime (frac=0x923b9e20, sec=0x923b9e18) at tools/qelapsedtimer_unix.cpp:127
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:144
#4  0xb4af02a2 in updateCurrentTime (this=0x9c7a5aac) at kernel/qeventdispatcher_unix.cpp:354
#5  QTimerInfoList::timerWait (this=0x9c7a5aac, tm=...) at kernel/qeventdispatcher_unix.cpp:460
#6  0xb4aee82b in timerSourcePrepareHelper (src=<optimized out>, timeout=0x923b9f1c) at kernel/qeventdispatcher_glib.cpp:143
#7  0xb4aee8bd in timerSourcePrepare (source=0x9c7a5a78, timeout=0x923b9f1c) at kernel/qeventdispatcher_glib.cpp:176
#8  0xb309c9b3 in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#9  0xb309d2df in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#10 0xb309d528 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#11 0xb4aee95f in QEventDispatcherGlib::processEvents (this=0x9c7a5108, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#12 0xb4abd823 in QEventLoop::processEvents (this=this@entry=0x923ba098, flags=...) at kernel/qeventloop.cpp:149
#13 0xb4abdb49 in QEventLoop::exec (this=this@entry=0x923ba098, flags=...) at kernel/qeventloop.cpp:204
#14 0xb6a38552 in Digikam::WorkerObjectRunnable::run (this=0x907e7b0) at /build/buildd/digikam-4.0.0/core/libs/threads/threadmanager.cpp:196
#15 0xb499ff07 in QThreadPoolThread::run (this=0x9d11fa8) at concurrent/qthreadpool.cpp:108
#16 0xb49acb6f in QThreadPrivate::start (arg=0x9d11fa8) at thread/qthread_unix.cpp:349
#17 0xb34fff70 in start_thread (arg=0x923bab40) at pthread_create.c:312
#18 0xb46b970e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 1 (Thread 0xad0e1900 (LWP 4011)):
#0  0xb772d424 in __kernel_vsyscall ()
#1  0xb3503d4b in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:187
#2  0xb46c68ec in __pthread_cond_wait (cond=0x903e050, mutex=0x903e038) at forward.c:149
#3  0xb49ad0f5 in wait (time=4294967295, this=0x903e038) at thread/qwaitcondition_unix.cpp:86
#4  QWaitCondition::wait (this=this@entry=0x9069110, mutex=mutex@entry=0x90690fc, time=time@entry=4294967295) at thread/qwaitcondition_unix.cpp:158
#5  0xb499f13f in QThreadPoolPrivate::waitForDone (this=0x90690b0, msecs=msecs@entry=-1) at concurrent/qthreadpool.cpp:295
#6  0xb49a05b3 in QThreadPool::~QThreadPool (this=0x9096300, __in_chrg=<optimized out>) at concurrent/qthreadpool.cpp:438
#7  0xb49a05fc in QThreadPool::~QThreadPool (this=0x9096300, __in_chrg=<optimized out>) at concurrent/qthreadpool.cpp:440
#8  0xb4ad6bda in QObjectPrivate::deleteChildren (this=this@entry=0x90962b0) at kernel/qobject.cpp:1907
#9  0xb4ad9188 in QObject::~QObject (this=0x9088f88, __in_chrg=<optimized out>) at kernel/qobject.cpp:926
#10 0xb6a37c02 in Digikam::ThreadManager::~ThreadManager (this=0x9088f88, __in_chrg=<optimized out>) at /build/buildd/digikam-4.0.0/core/libs/threads/threadmanager.cpp:257
#11 0xb6a37c73 in ~ThreadManagerCreator (this=0x9088f88, __in_chrg=<optimized out>) at /build/buildd/digikam-4.0.0/core/libs/threads/threadmanager.cpp:236
#12 destroy () at /build/buildd/digikam-4.0.0/core/libs/threads/threadmanager.cpp:241
#13 0xb682df79 in KCleanUpGlobalStatic::~KCleanUpGlobalStatic (this=0xb6c5a7b8 <_ZZN7Digikam5._155ptEvE13cleanUpObject>, __in_chrg=<optimized out>) at /usr/include/kglobal.h:62
#14 0xb46003d1 in __run_exit_handlers (status=status@entry=1, listp=0xb47783c4 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:82
#15 0xb460042d in __GI_exit (status=1) at exit.c:104
#16 0xaf9df7d3 in ?? () from /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#17 0xb5b69aa9 in KApplication::xioErrhandler (this=0xbf979ff8, dpy=dpy@entry=0x8b879f8) at ../../kdeui/kernel/kapplication.cpp:419
#18 0xb5b69b64 in kde_xio_errhandler (dpy=0x8b879f8) at ../../kdeui/kernel/kapplication.cpp:126
#19 0xb41c5b04 in _XIOError () from /usr/lib/i386-linux-gnu/libX11.so.6
#20 0xb41c327f in _XEventsQueued () from /usr/lib/i386-linux-gnu/libX11.so.6
#21 0xb41b4500 in XEventsQueued () from /usr/lib/i386-linux-gnu/libX11.so.6
#22 0xb50cff8a in x11EventSourceCheck (s=0x8b84aa8) at kernel/qguieventdispatcher_glib.cpp:85
#23 0xb309cdff in g_main_context_check () from /lib/i386-linux-gnu/libglib-2.0.so.0
#24 0xb309d37a in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#25 0xb309d528 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#26 0xb4aee93b in QEventDispatcherGlib::processEvents (this=this@entry=0x8aef6d0, flags=...) at kernel/qeventdispatcher_glib.cpp:434
#27 0xb50d05de in QGuiEventDispatcherGlib::processEvents (this=0x8aef6d0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#28 0xb4abd823 in QEventLoop::processEvents (this=this@entry=0xbf979e28, flags=...) at kernel/qeventloop.cpp:149
#29 0xb4abdb49 in QEventLoop::exec (this=this@entry=0xbf979e28, flags=...) at kernel/qeventloop.cpp:204
#30 0xb4ac38fe in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225
#31 0xb5019a24 in QApplication::exec () at kernel/qapplication.cpp:3828
#32 0x080be1a0 in main (argc=5, argv=0xbf97a134) at /build/buildd/digikam-4.0.0/core/digikam/main/main.cpp:236

The reporter indicates this bug may be a duplicate of or related to bug 334509.

Possible duplicates by query: bug 334580, bug 334509.

Reported using DrKonqi
Comment 1 caulier.gilles 2014-05-31 13:00:11 UTC
*** Bug 334509 has been marked as a duplicate of this bug. ***
Comment 2 guenter 2014-06-01 19:49:26 UTC
OpenSuse 12.3, latest updates as of 1.6.2014

 digikam --version
Qt: 4.8.4
KDE Development Platform: 4.13.0
digiKam: 4.0.0

There are three radio buttons for face detection:
*detect
*detect and recognize
*recognize

Only "detect and recognize" set crashes. Both other two go through.

KDE-Crash Reporter does not work at the moment, digikam disapears simply after crash.

This is what gdb says on crash:

OpenCV Error: Bad argument (This LBPH model is not computed yet. Did you call the train method?) in predict, file /home/abuild/rpmbuild/BUILD/digikam-4.0.0-rc/extra/libkface/libkface/recognition-opencv-lbph/facerec_borrowed.cpp, line 324
digikam(12845)/KFACE: cv::Exception: /home/abuild/rpmbuild/BUILD/digikam-4.0.0-rc/extra/libkface/libkface/recognition-opencv-lbph/facerec_borrowed.cpp:324: error: (-5) This LBPH model is not computed yet. Did you call the train method? in function predict
 
<this message above several times>

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff757fa700 (LWP 12913)]
Digikam::FaceTags::getOrCreateTagForIdentity (attributes=...)
    at /usr/src/debug/digikam-4.0.0/core/libs/database/faces/facetags.cpp:286
286     /usr/src/debug/digikam-4.0.0/core/libs/database/faces/facetags.cpp: Datei oder Verzeichnis nicht gefunden.

###

 bt                                                                               
#0  Digikam::FaceTags::getOrCreateTagForIdentity (attributes=...)
    at /usr/src/debug/digikam-4.0.0/core/libs/database/faces/facetags.cpp:286
#1  0x00000000006f4a37 in Digikam::DatabaseWriter::process (this=0x4b2d2d0, 
    package=...)
    at /usr/src/debug/digikam-4.0.0/core/utilities/facemanagement/facepipeline.cpp:661
#2  0x00000000006f5264 in Digikam::DatabaseWriter::qt_static_metacall (
    _o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>)
    at /usr/src/debug/digikam-4.0.0/build/core/digikam/facepipeline_p.moc:494
#3  0x00007ffff295877e in QObject::event (this=0x4b2d2d0, e=<optimized out>)
    at kernel/qobject.cpp:1203
#4  0x00007ffff1a7086c in QApplicationPrivate::notify_helper (
    this=this@entry=0xcbc490, receiver=receiver@entry=0x4b2d2d0, e=e@entry=
    0x7fff68025970) at kernel/qapplication.cpp:4562
#5  0x00007ffff1a74ceb in QApplication::notify (this=this@entry=0x7fffffffd9d0, 
    receiver=receiver@entry=0x4b2d2d0, e=e@entry=0x7fff68025970)
    at kernel/qapplication.cpp:4423
#6  0x00007ffff33a6366 in KApplication::notify (this=0x7fffffffd9d0, 
    receiver=0x4b2d2d0, event=0x7fff68025970)
    at /usr/src/debug/kdelibs-4.13.0/kdeui/kernel/kapplication.cpp:311
#7  0x00007ffff2943d8e in QCoreApplication::notifyInternal (this=0x7fffffffd9d0, 
    receiver=receiver@entry=0x4b2d2d0, event=event@entry=0x7fff68025970)
    at kernel/qcoreapplication.cpp:946
#8  0x00007ffff29476f1 in sendEvent (event=0x7fff68025970, receiver=0x4b2d2d0)
    at kernel/qcoreapplication.h:231
#9  QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, 
    event_type=event_type@entry=0, data=0x3833190) at kernel/qcoreapplication.cpp:1570
#10 0x00007ffff2947973 in QCoreApplication::sendPostedEvents (
    receiver=receiver@entry=0x0, event_type=event_type@entry=0)
    at kernel/qcoreapplication.cpp:1463
#11 0x00007ffff2972133 in sendPostedEvents () at kernel/qcoreapplication.h:236
#12 postEventSourceDispatch (s=0x7fff40001d00) at kernel/qeventdispatcher_glib.cpp:279
#13 0x00007fffea37b7d5 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#14 0x00007fffea37bb08 in ?? () from /usr/lib64/libglib-2.0.so.0
#15 0x00007fffea37bbc4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#16 0x00007ffff29722c6 in QEventDispatcherGlib::processEvents (this=0x7fff400008c0, 
    flags=...) at kernel/qeventdispatcher_glib.cpp:424
#17 0x00007ffff2942adf in QEventLoop::processEvents (this=this@entry=0x7fff757f9d20, 
    flags=...) at kernel/qeventloop.cpp:149
#18 0x00007ffff2942d68 in QEventLoop::exec (this=this@entry=0x7fff757f9d20, flags=...)
    at kernel/qeventloop.cpp:204
#19 0x00007ffff563947b in Digikam::WorkerObjectRunnable::run (this=0x5b52130)
---Type <return> to continue, or q <return> to quit---
    at /usr/src/debug/digikam-4.0.0/core/libs/threads/threadmanager.cpp:196
#20 0x00007ffff283bc9d in QThreadPoolThread::run (this=0x3832ff0)
    at concurrent/qthreadpool.cpp:107
#21 0x00007ffff28480cc in QThreadPrivate::start (arg=0x3832ff0)
    at thread/qthread_unix.cpp:338
#22 0x00007fffef53ae0f in start_thread () from /lib64/libpthread.so.0
#23 0x00007ffff10ae44d in clone () from /lib64/libc.so.6
Comment 3 caulier.gilles 2014-06-11 21:13:57 UTC
Git commit fa909aa96e7e41225551cd9e866618717f1ea546 by Gilles Caulier.
Committed on 11/06/2014 at 21:06.
Pushed by cgilles into branch 'master'.

use a better C++ exception wrapper to handle non OpenCV exceptions (as pure C++ one)
Related: bug 330342, bug 329873, bug 326742, bug 326586, bug 326585, bug 324774, bug 323888, bug 323361, bug 320812, bug 312440, bug 309027, bug 308645, bug 301611, bug 297558, bug 285517

M  +4    -0    libkface/facedetector.cpp
M  +17   -2    libkface/recognitiondatabase.cpp

http://commits.kde.org/libkface/fa909aa96e7e41225551cd9e866618717f1ea546
Comment 4 caulier.gilles 2014-06-11 21:31:42 UTC
With next digiKam 4.1.0, i fixed libkface to handle all C++ exception (and not only OpenCV exception).

So, at least, digiKam must crash lesser now. If you want to review this entry again, use current implementation from git/master, or wait next 4.1.0 release...

Thanks to update your feedback

Gilles Caulier
Comment 5 Hatl 2014-06-15 18:07:11 UTC
Created attachment 87206 [details]
New crash information added by DrKonqi

digikam (4.0.0) on KDE Platform 4.13.0 using Qt 4.8.6

- What I was doing when the application crashed:
Started the face recognition
Progress goes to 4%
crashes afterwards

-- Backtrace (Reduced):
#6  isEmpty (this=0x3d) at /usr/include/qt4/QtCore/qmap.h:203
#7  Digikam::FaceTags::getOrCreateTagForIdentity (attributes=...) at /build/buildd/digikam-4.0.0/core/libs/database/faces/facetags.cpp:286
#8  0x00000000006f0205 in Digikam::DatabaseWriter::process (this=0x88438c0, package=...) at /build/buildd/digikam-4.0.0/core/utilities/facemanagement/facepipeline.cpp:661
#9  0x00000000006f09f1 in Digikam::DatabaseWriter::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /build/buildd/digikam-4.0.0/obj-x86_64-linux-gnu/core/digikam/facepipeline_p.moc:493
#10 0x00007fb0421adc1e in QObject::event (this=0x88438c0, e=<optimized out>) at kernel/qobject.cpp:1194
Comment 6 caulier.gilles 2014-06-18 14:26:13 UTC
Git commit 4662dd94102f8144bc65ce1cb66d6b6cb1d500fd by Gilles Caulier.
Committed on 18/06/2014 at 14:22.
Pushed by cgilles into branch 'master'.

Libkface now depand of last stable OpenCV library version 2.4.9
This prevent internal crash int Cv:Algorithm that we cannot handle in libkface as exception.
Now, Face Recognition do not crash but still report Exception at training operations, especially about wrong Cv:Matrix size :

digikam(8673)/digikam (core) Digikam::DImg::load:"/mnt/data2/photos/GILLES/NEW/Adrien/2010-04-13/20100413_009.jpg"  :
JPEG file identified
OpenCV Error: Assertion failed (0 <= _dims && _dims <= CV_MAX_DIM) in setSize, file /mnt/devel/opencv/modules/core/src/matrix.cpp, line 89
digikam(8673)/KFACE: cv::Exception training LBPH: /mnt/devel/opencv/modules/core/src/matrix.cpp:89: error: (-215) 0 <=_dims && _dims <= CV_MAX_DIM in function setSize

It still a problem somwhere, but it's better than previous state.
Related: bug 330342, bug 329873, bug 326742, bug 326586, bug 326585, bug 324774, bug 323888, bug 323361, bug 320812, bug 312440, bug 309027, bug 308645, bug 301611, bug 297558, bug 285517

M  +1    -1    CMakeLists.txt

http://commits.kde.org/libkface/4662dd94102f8144bc65ce1cb66d6b6cb1d500fd
Comment 7 caulier.gilles 2014-06-24 12:43:29 UTC
Git commit 1fff86f31e3bf47a2a2cfa6eaa98bb1bdf1a863b by Gilles Caulier.
Committed on 24/06/2014 at 12:32.
Pushed by cgilles into branch 'master'.

add more test before to commit/checkout compressed histogram data in Face database, to prevent crashes, especially if data are corrupted from database.
Related: bug 330342, bug 329873, bug 326742, bug 326586, bug 326585, bug 324774, bug 323888, bug 320812, bug 312440, bug 309027, bug 308645, bug 301611, bug 297558, bug 285517

M  +62   -28   libkface/database/trainingdb.cpp

http://commits.kde.org/libkface/1fff86f31e3bf47a2a2cfa6eaa98bb1bdf1a863b
Comment 8 caulier.gilles 2014-06-24 13:01:34 UTC
Git commit d48f66e8fc4adfaaea4f5928c28aabb6057775c1 by Gilles Caulier.
Committed on 24/06/2014 at 13:00.
Pushed by cgilles into branch 'master'.

Check if QMap is not null before to pass it to FaceTags API, to prevent Qt crash

M  +9    -3    utilities/facemanagement/facepipeline.cpp

http://commits.kde.org/digikam/d48f66e8fc4adfaaea4f5928c28aabb6057775c1
Comment 9 caulier.gilles 2014-06-24 13:54:00 UTC
With next digiKam 4.1.0, a lots of improvements/fixes have be done around face management. Please give us a fresh feedback.

Note i recommend to delete face recognition database to prevent dysfunction due to possible wrong data store in this container. Look where file is located in my computer :

[gilles@localhost database]$ pwd
/home/gilles/.kde4/share/apps/libkface/database
[gilles@localhost database]$ ls -al
total 397028
drwx------ 2 gilles gilles      4096 juin  24 14:22 ./
drwx------ 3 gilles gilles      4096 juin  18 19:08 ../
-rw-r--r-- 1 gilles gilles 406543360 juin  24 14:22 recognition.db
[gilles@localhost database]$
Comment 10 Christian 2014-08-07 19:01:05 UTC
Created attachment 88150 [details]
New crash information added by DrKonqi

digikam (4.0.0) on KDE Platform 4.12.5 using Qt 4.8.5

- What I was doing when the application crashed:

From the left bar, select the People tab. Then start face recognition. I selected one album, then clicked on search.

-- Backtrace (Reduced):
#6  isEmpty (this=0x2d) at /usr/include/qt4/QtCore/qmap.h:203
#7  Digikam::FaceTags::getOrCreateTagForIdentity (attributes=...) at /portage_builddir/portage/media-gfx/digikam-4.0.0/work/digikam-4.0.0/core/libs/database/faces/facetags.cpp:286
#8  0x00000000006fa024 in Digikam::DatabaseWriter::process (this=0x6f59d00, package=...) at /portage_builddir/portage/media-gfx/digikam-4.0.0/work/digikam-4.0.0/core/utilities/facemanagement/facepipeline.cpp:661
#9  0x00000000006fa833 in Digikam::DatabaseWriter::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /portage_builddir/portage/media-gfx/digikam-4.0.0/work/digikam-4.0.0_build/digikam/facepipeline_p.moc:493
#10 0x00007fc277f6d9fe in QObject::event (this=0x6f59d00, e=<optimized out>) at kernel/qobject.cpp:1194
Comment 11 caulier.gilles 2014-08-08 06:03:17 UTC
Most changes about this problem have been introduced in digiKam 4.1.0 through libkface. digiKam 4.2.0 is just released. Please check with this version...

Gilles Caulier
Comment 12 caulier.gilles 2014-08-08 06:05:48 UTC
and also, remove libkface database located here :

Linux: ~/.kde4/share/apps/libkface/database/recognition.db
OSX: ~/Library/Preferences/KDE/share/apps/libkface/database/recognition.db
Windows: ~/AppData/Roaming/.kde/share/apps/libkface/database/recognition.db

... before to retry to start face recognition.

Gilles Caulier
Comment 13 Christian 2014-08-08 12:31:54 UTC
I think for me the upgrade to 4.2.0 solved this issue. 4.2.0 hasn't crashed yet although I've done face recognition a few times in the way that caused the crash from me in 4.0.0. Haven't tested 4.1.0.
However, in 4.2.0 CPU usage during face recognition can be extremely high, such that e.g. I cannot type continuously into this text box while face recognition is running. (Maybe that setting there about CPU cores would fix this, I haven't tried yet.)
Comment 14 caulier.gilles 2014-08-08 13:48:31 UTC
Fine. I close this file now. Re-open if necessary...

Gilles Caulier