Bug 329651

Summary: Facedetction crashes hen reaches 3 GB of Memory, thogh the computer has 6GB and 2 are still free. (64)
Product: [Applications] digikam Reporter: G.Rass <g.rass>
Component: Faces-EngineAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles
Priority: NOR    
Version: 3.4.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In: 7.0.0
Sentry Crash Report:

Description G.Rass 2014-01-06 12:35:28 UTC
Facedetction crashes hen reaches 3 GB of Memory, thogh the computer has  6GB and 2 are still free, and I use Windows 64. The database is on an NAS

Reproducible: Always

Steps to Reproduce:
1. Start Facedetection
2. do nothing exept watching the Memory
3. Fails
Actual Results:  
Application: digikam (3.4.0)
KDE Platform Version: 4.10.2
Qt Version: 4.8.4
Operating System: WindowsNT Windows 7 i686

-- Information about the crash:
<In detail, tell us what you were doing  when the application crashed.>

-- Backtrace:
Application: digiKam (digikam.exe), signal: Unknown


ntdll.dll!ZwWaitForSingleObject() [[unknown] @ -1] at 0x77d4f8d1
kernel32.dll!WaitForSingleObjectEx() [[unknown] @ -1] at 0x775a1194
kernel32.dll!WaitForSingleObject() [[unknown] @ -1] at 0x775a1148
QtCore4.dll!QWaitCondition::wait() [[unknown] @ -1] at 0x63e7881b
digikam.exe!QMap<QString,QString>::unite() [[unknown] @ -1] at 0x140420a
QtCore4.dll!QEventDispatcherWin32::`default constructor closure'() [[unknown] @ -1] at 0x63e76fbc
QtCore4.dll!QEventDispatcherWin32::`default constructor closure'() [[unknown] @ -1] at 0x63e776fd


ntdll.dll!ZwWaitForSingleObject() [[unknown] @ -1] at 0x77d4f8d1
kernel32.dll!WaitForSingleObjectEx() [[unknown] @ -1] at 0x775a1194
kernel32.dll!WaitForSingleObject() [[unknown] @ -1] at 0x775a1148
VCOMP100.DLL!vcomp_ordered_loop_end() [[unknown] @ -1] at 0x61354111
VCOMP100.DLL!vcomp_atomic_div_r8() [[unknown] @ -1] at 0x6135708e
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x775a336a
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f72
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f45


ntdll.dll!ZwWaitForSingleObject() [[unknown] @ -1] at 0x77d4f8d1
kernel32.dll!WaitForSingleObjectEx() [[unknown] @ -1] at 0x775a1194
kernel32.dll!WaitForSingleObject() [[unknown] @ -1] at 0x775a1148
QtCore4.dll!QWaitCondition::wait() [[unknown] @ -1] at 0x63e7881b
digikamlib.dll!Digikam::ICCPreviewWidget::qt_static_metacall() [[unknown] @ -1] at 0x5ddb109d
QtCore4.dll!QEventDispatcherWin32::`default constructor closure'() [[unknown] @ -1] at 0x63e77709
MSVCR100.dll!endthreadex() [[unknown] @ -1] at 0x6432c556
MSVCR100.dll!endthreadex() [[unknown] @ -1] at 0x6432c600
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x775a336a
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f72
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f45


ntdll.dll!ZwWaitForMultipleObjects() [[unknown] @ -1] at 0x77d5015d
kernel32.dll!WaitForMultipleObjectsEx() [[unknown] @ -1] at 0x775a19fc
USER32.dll!PeekMessageW() [[unknown] @ -1] at 0x7598086a
QtCore4.dll!QEventDispatcherWin32::processEvents() [[unknown] @ -1] at 0x63f871a6
QtCore4.dll!QEventLoop::exec() [[unknown] @ -1] at 0x63f5eab9
digikamlib.dll!Digikam::ICCPreviewWidget::qt_static_metacall() [[unknown] @ -1] at 0x5ddb0d9a
QtCore4.dll!QtConcurrent::internal::ExceptionStore::hasThrown() [[unknown] @ -1] at 0x63e681a9


ntdll.dll!NtWaitForWorkViaWorkerFactory() [[unknown] @ -1] at 0x77d51f46
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x775a336a
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f72
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f45


ntdll.dll!ZwWaitForMultipleObjects() [[unknown] @ -1] at 0x77d5015d
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x775a336a
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f72
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f45


ntdll.dll!ZwWaitForMultipleObjects() [[unknown] @ -1] at 0x77d5015d
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x775a336a
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f72
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f45


ntdll.dll!ZwWaitForMultipleObjects() [[unknown] @ -1] at 0x77d5015d
kernel32.dll!WaitForMultipleObjectsEx() [[unknown] @ -1] at 0x775a19fc
USER32.dll!PeekMessageW() [[unknown] @ -1] at 0x7598086a
QtCore4.dll!QEventDispatcherWin32::processEvents() [[unknown] @ -1] at 0x63f871a6
QtGui4.dll!qt_getRegisteredWndClass() [[unknown] @ -1] at 0x6343a59f
QtCore4.dll!QCoreApplication::exec() [[unknown] @ -1] at 0x63f608cc
digikam.exe!QMap<QString,QString>::unite() [[unknown] @ -1] at 0x14ca6e1
digikam.exe![unknown]() [[unknown] @ -1] at 0x12f1125
digikam.exe!QMap<QString,QString>::unite() [[unknown] @ -1] at 0x15a2980
digikam.exe!QMap<QString,QString>::unite() [[unknown] @ -1] at 0x15a318f


ntdll.dll!NtWaitForWorkViaWorkerFactory() [[unknown] @ -1] at 0x77d51f46
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x775a336a
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f72
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f45


ntdll.dll!ZwWaitForSingleObject() [[unknown] @ -1] at 0x77d4f8d1
kernel32.dll!WaitForSingleObjectEx() [[unknown] @ -1] at 0x775a1194
kernel32.dll!WaitForSingleObject() [[unknown] @ -1] at 0x775a1148
VCOMP100.DLL!vcomp_ordered_loop_end() [[unknown] @ -1] at 0x61354111
VCOMP100.DLL!vcomp_atomic_div_r8() [[unknown] @ -1] at 0x6135708e
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x775a336a
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f72
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f45


ntdll.dll!NtRemoveIoCompletion() [[unknown] @ -1] at 0x77d4f959
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x775a336a
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f72
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f45


ntdll.dll!ZwWaitForMultipleObjects() [[unknown] @ -1] at 0x77d5015d
kernel32.dll!WaitForMultipleObjectsEx() [[unknown] @ -1] at 0x775a19fc
kernel32.dll!WaitForMultipleObjects() [[unknown] @ -1] at 0x775a41d8
QtCore4.dll!QString::contains() [[unknown] @ -1] at 0x63f44313
QtCore4.dll!QThread::setTerminationEnabled() [[unknown] @ -1] at 0x63e77ddd
QtCore4.dll!QEventDispatcherWin32::`default constructor closure'() [[unknown] @ -1] at 0x63e776fd


KERNELBASE.dll!RaiseException() [[unknown] @ -1] at 0x75a6c41f
MSVCR100.dll!CxxThrowException() [[unknown] @ -1] at 0x642f872d
MSVCR100.dll!fcloseall() [[unknown] @ -1] at 0x6430f30f
opencv_core246.dll!cv::Range::Range() [[unknown] @ -1] at 0x60e109c8
opencv_core246.dll!cv::Range::Range() [[unknown] @ -1] at 0x60e682e7
qsqlite4.dll!qt_plugin_instance() [[unknown] @ -1] at 0x5e163003
QtSql4.dll!QSqlCachedResult::cacheNext() [[unknown] @ -1] at 0x6889ef75


ntdll.dll!ZwWaitForSingleObject() [[unknown] @ -1] at 0x77d4f8d1
kernel32.dll!WaitForSingleObjectEx() [[unknown] @ -1] at 0x775a1194
kernel32.dll!WaitForSingleObject() [[unknown] @ -1] at 0x775a1148
VCOMP100.DLL!vcomp_ordered_loop_end() [[unknown] @ -1] at 0x61354111
VCOMP100.DLL!vcomp_atomic_div_r8() [[unknown] @ -1] at 0x6135708e
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x775a336a
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f72
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f45


ntdll.dll!ZwWaitForSingleObject() [[unknown] @ -1] at 0x77d4f8d1
kernel32.dll!WaitForSingleObjectEx() [[unknown] @ -1] at 0x775a1194
kernel32.dll!WaitForSingleObject() [[unknown] @ -1] at 0x775a1148
VCOMP100.DLL!vcomp_ordered_loop_end() [[unknown] @ -1] at 0x61354111
VCOMP100.DLL!vcomp_atomic_div_r8() [[unknown] @ -1] at 0x6135708e
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x775a336a
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f72
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f45


ntdll.dll!ZwWaitForSingleObject() [[unknown] @ -1] at 0x77d4f8d1
kernel32.dll!WaitForSingleObjectEx() [[unknown] @ -1] at 0x775a1194
kernel32.dll!WaitForSingleObject() [[unknown] @ -1] at 0x775a1148
VCOMP100.DLL!vcomp_ordered_loop_end() [[unknown] @ -1] at 0x61354111
VCOMP100.DLL!vcomp_atomic_div_r8() [[unknown] @ -1] at 0x6135708e
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x775a336a
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f72
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f45


ntdll.dll!ZwWaitForSingleObject() [[unknown] @ -1] at 0x77d4f8d1
kernel32.dll!WaitForSingleObjectEx() [[unknown] @ -1] at 0x775a1194
kernel32.dll!WaitForSingleObject() [[unknown] @ -1] at 0x775a1148
VCOMP100.DLL!vcomp_ordered_loop_end() [[unknown] @ -1] at 0x61354111
VCOMP100.DLL!vcomp_atomic_div_r8() [[unknown] @ -1] at 0x6135708e
kernel32.dll!BaseThreadInitThunk() [[unknown] @ -1] at 0x775a336a
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f72
ntdll.dll!RtlInitializeExceptionChain() [[unknown] @ -1] at 0x77d69f45

Report to https://bugs.kde.org/

Expected Results:  
Just work on the Face detection, using all the Memory or knows how to handl the Memory.
Comment 1 caulier.gilles 2014-01-06 13:09:02 UTC

*** This bug has been marked as a duplicate of bug 323888 ***
Comment 2 Maik Qualmann 2017-12-17 19:49:35 UTC
Git commit 6a9fd9891a3ff341dc42fe36158cbf0101d513b6 by Maik Qualmann.
Committed on 17/12/2017 at 19:20.
Pushed by mqualmann into branch 'master'.

delete threads from memory when they are finished
Related: bug 375317, bug 375035, bug 321784, bug 325712, bug 328732, bug 330227, bug 331912, bug 344661, bug 345395, bug 350549, bug 381877, bug 338249, bug 329091, bug 387821, bug 381222

M  +2    -1    NEWS
M  +25   -0    libs/database/dbjobs/dbjobsmanager.cpp
M  +35   -0    libs/iojobs/iojobsmanager.cpp

https://commits.kde.org/digikam/6a9fd9891a3ff341dc42fe36158cbf0101d513b6
Comment 3 caulier.gilles 2017-12-17 20:03:26 UTC
Following this commit:

https://commits.kde.org/digikam/6a9fd9891a3ff341dc42fe36158cbf0101d513b6

... the approach to fix this problem is under way and new digiKam 5.8.0 pre-release bundles will be compiled tonight to lets a chance to end-users to give a feedback about this fix before the 5.8.0 official release planed before Christmas 2017.

The bundles will be available in 2 hours at this url:

https://files.kde.org/digikam/

Please do not waste time to test if this file is always valid for next 5.8.0.

Thanks in advance

Gilles Caulier
Comment 4 caulier.gilles 2019-12-23 06:22:07 UTC
Problem is fixed with new 7.0.0-beta1 through this long story from this bug

https://bugs.kde.org/show_bug.cgi?id=399923

You can test digiKam 7.0.0-beta1 with bundle available here:

https://download.kde.org/unstable/digikam/

Don't hesitate to give us a fresh feedback about his entry.

Thanks in advance

Gilles Caulier