[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
https://bugs.kde.org/show_bug.cgi?id=323253
Bug ID: 323253
Summary: When face tag scanning, digikam exhausts all memory on
computer.
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
/lib64/libopencv_core.so.2.4
#6 cvWrite() at /lib64/libopencv_core.so.2.4
#7 cv::write(cv::FileStorage&, std::string const&, cv::Mat const&)() at
/lib64/libopencv_core.so.2.4
#8 operator<< <cv::Mat>() at /usr/include/opencv2/core/operations.hpp:2909
#9 KFaceIface::LBPHFaceModel::setHistograms() at
/home/krikar/dev/kde/digikam/extra/libkface/libkface/recognition-opencv-lbph/lbphfacemodel.cpp:139
#10 KFaceIface::TrainingDB::lbphFaceModel() at
/home/krikar/dev/kde/digikam/extra/libkface/libkface/database/trainingdb.cpp:303
#11 lbph() at
/home/krikar/dev/kde/digikam/extra/libkface/libkface/recognition-opencv-lbph/opencvlbphfacerecognizer.cpp:67
#12 KFaceIface::OpenCVLBPHFaceRecognizer::recognize() at
/home/krikar/dev/kde/digikam/extra/libkface/libkface/recognition-opencv-lbph/opencvlbphfacerecognizer.cpp:153
#13 KFaceIface::RecognitionDatabase::recognizeFaces() at
/home/krikar/dev/kde/digikam/extra/libkface/libkface/recognitiondatabase.cpp:620
#14 KFaceIface::RecognitionDatabase::recognizeFaces() at
/home/krikar/dev/kde/digikam/extra/libkface/libkface/recognitiondatabase.cpp:594
#15 Digikam::RecognitionWorker::process() at
/home/krikar/dev/kde/digikam/core/utilities/facemanagement/facepipeline.cpp:594
#16 Digikam::RecognitionWorker::qt_static_metacall() at
/home/krikar/dev/kde/digikam/build/core/digikam/facepipeline_p.moc:406
#17 QObject::event(QEvent*)() at /lib64/libQtCore.so.4
#18 QApplicationPrivate::notify_helper(QObject*, QEvent*)() at
/lib64/libQtGui.so.4
#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
/lib64/libQtCore.so.4
#22 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)() at
/lib64/libQtCore.so.4
#23 postEventSourceDispatch(_GSource*, int (*)(void*), void*)() at
/lib64/libQtCore.so.4
#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
#27
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)() at
/lib64/libQtCore.so.4
#28 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)() at
/lib64/libQtCore.so.4
#29 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)() at
/lib64/libQtCore.so.4
#30 Digikam::WorkerObjectRunnable::run() at
/home/krikar/dev/kde/digikam/core/libs/threads/threadmanager.cpp:196
#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
/home/krikar/dev/kde/digikam/extra/libkface/libkface/recognition-opencv-lbph/lbphfacemodel.cpp:139
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 : 2.4.6.1
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
opencv-devel-docs
: package.
Reproducible: Always
Steps to Reproduce:
1. Start digikam using a new database: digikam
--database-directory=/home/user/digikam/tmp/
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