[Digikam-devel] [digikam] [Bug 323253] New: When face tag scanning, digikam exhausts all memory on computer.

Kristian Karl kristian.hermann.karl at gmail.com
Wed Aug 7 07:57:47 BST 2013


            Bug ID: 323253
           Summary: When face tag scanning, digikam exhausts all memory on
    Classification: Unclassified
           Product: digikam
           Version: 3.4.0
          Platform: Compiled Sources
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Face Management
          Assignee: digikam-devel at kde.org
          Reporter: kristian.hermann.karl at gmail.com

When scanning a small collection of pics (jpgs), digikam will exhaust all
memory on computer.

I compiled digikam from latest master and ran it under a debugger. I
interrupted the scanning when the memory consumption started to grow, and found
this interesting frame stack for one of the threads:
#0 __printf_fp() at /lib64/libc.so.6
#1 vfprintf() at /lib64/libc.so.6
#2 __vsprintf_chk() at /lib64/libc.so.6
#3 __sprintf_chk() at /lib64/libc.so.6
#4 cvWriteRawData() at /lib64/libopencv_core.so.2.4
#5 icvWriteMat(CvFileStorage*, char const*, void const*, CvAttrList)() at
#6 cvWrite() at /lib64/libopencv_core.so.2.4
#7 cv::write(cv::FileStorage&, std::string const&, cv::Mat const&)() at
#8 operator<< <cv::Mat>() at /usr/include/opencv2/core/operations.hpp:2909
#9 KFaceIface::LBPHFaceModel::setHistograms() at
#10 KFaceIface::TrainingDB::lbphFaceModel() at
#11 lbph() at
#12 KFaceIface::OpenCVLBPHFaceRecognizer::recognize() at
#13 KFaceIface::RecognitionDatabase::recognizeFaces() at
#14 KFaceIface::RecognitionDatabase::recognizeFaces() at
#15 Digikam::RecognitionWorker::process() at
#16 Digikam::RecognitionWorker::qt_static_metacall() at
#17 QObject::event(QEvent*)() at /lib64/libQtCore.so.4
#18 QApplicationPrivate::notify_helper(QObject*, QEvent*)() at
#19 QApplication::notify(QObject*, QEvent*)() at /lib64/libQtGui.so.4
#20 KApplication::notify(QObject*, QEvent*)() at /lib64/libkdeui.so.5
#21 QCoreApplication::notifyInternal(QObject*, QEvent*)() at
#22 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)() at
#23 postEventSourceDispatch(_GSource*, int (*)(void*), void*)() at
#24 g_main_context_dispatch() at /lib64/libglib-2.0.so.0
#25 g_main_context_iterate.isra.22() at /lib64/libglib-2.0.so.0
#26 g_main_context_iteration() at /lib64/libglib-2.0.so.0
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)() at
#28 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)() at
#29 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)() at
#30 Digikam::WorkerObjectRunnable::run() at
#31 QThreadPoolThread::run()() at /lib64/libQtCore.so.4
#32 QThreadPrivate::start(void*)() at /lib64/libQtCore.so.4
#33 start_thread() at /lib64/libpthread.so.0
#34 clone() at /lib64/libc.so.6

It gets stuck in: #9 KFaceIface::LBPHFaceModel::setHistograms() at

If I comment out that line, digikam works as expected. But I guess the
recognition part does not work properly if histograms are not saved?

I'm on Fedora 19, using testing repos, and the version of Open CV is:
yum info opencv-devel.x86_64
Installed Packages
Name        : opencv-devel
Arch        : x86_64
Version     :
Release     : 1.fc19
Size        : 2.6 M
Repo        : installed
>From repo   : updates-testing
Summary     : Development files for using the OpenCV library
URL         : http://opencv.org
License     : BSD
Description : This package contains the OpenCV C/C++ library and header files,
as well as
            : documentation. It should be installed if you want to develop
programs that
            : will use the OpenCV library. You should consider installing
            : package.

Reproducible: Always

Steps to Reproduce:
1. Start digikam using a new database: digikam
2. Add a small collection of pics. (I used a collection of 20 jpgs)
3. Scan collection for faces.
Actual Results:  
All memory (8GB RAM) on the computer is used by digikam in just a few seconds.

Expected Results:  
Digikam completes the face scanning without any problems.

You are receiving this mail because:
You are the assignee for the bug.

More information about the Digikam-devel mailing list