Bug 113557

Summary: digiKam crashes during "Find Duplicate Images" with SIGSEGV
Product: [Applications] digikam Reporter: Bernard S. Jansen <bernard.jansen>
Component: Searches-SimilarityAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Slackware   
OS: Linux   
Latest Commit: Version Fixed In: 7.0.0
Sentry Crash Report:

Description Bernard S. Jansen 2005-09-29 12:10:39 UTC
Version:           0.7.3 (using KDE KDE 3.4.2)
Installed from:    Slackware Packages
OS:                Linux

Events leading to crash:
*In digiKam, to Tools - Find Duplicate Images
*Select All
*OK

The Find Duplicate Images tool appears to run for some time, then does a complete crash, both of the tool and digiKam.

Notes:
(1) If I run Find Duplicate Images on one small album, then it works OK - "No duplicate images found";
(2) During the 'fingerprinting' process, I do appear to get error messages, like "cannot fingerprint file foo.jpg", but it's too quick to catch
(3) I have imported all images using the import images or import directory function, and to my memory all images are 'valid', and were displayed when imported.
(4) The tail -n20 of $strace digikam >& digikam.log is:

gettimeofday({1127985468, 915091}, NULL) = 0
gettimeofday({1127985468, 982035}, NULL) = 0
write(3, "B\1\5\0\323I\1\2Y\1\0\2\2\0\30\0003\2\30\0@\0\7\0\323I"..., 16384) = 16384
gettimeofday({1127985468, 991064}, NULL) = 0
gettimeofday({1127985469, 57651}, NULL) = 0
gettimeofday({1127985469, 64054}, NULL) = 0
gettimeofday({1127985469, 130084}, NULL) = 0
gettimeofday({1127985469, 144264}, NULL) = 0
gettimeofday({1127985469, 150398}, NULL) = 0
kill(5787, SIGRTMIN)                    = 0
kill(5787, SIGRTMIN)                    = 0
gettimeofday({1127985469, 157161}, NULL) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

(5) I have no idea what this means, except that SIGSEGV is a memory violation.  Don't know how to troubleshoot further.  My feeling is that a corrupt image file is causing the problem? Not sure, I should have thought digiKam should be 'invincible' to a corrupt image file.
Comment 1 caulier.gilles 2005-09-29 12:13:26 UTC
Please give me a backtrace using gdb.

Gilles Caulier
Comment 2 Bernard S. Jansen 2005-09-29 13:17:45 UTC
Thanks for the quick response - 3 minutes is quite mindblowing.
Never done gdb before, but based on a few online tutorials the last 25 lines follow.  If you require more, let me know - I copied up to 571 before I gave up finding the end.

#0  0x412af8c2 in QString::replace () from /usr/lib/qt/lib/libqt-mt.so.3
#1  0x412afe36 in QString::replace () from /usr/lib/qt/lib/libqt-mt.so.3
#2  0x408d5ae8 in KProgress::setIndicator () from /opt/kde/lib/libkdeui.so.4
#3  0x410e097f in QProgressBar::setTotalSteps () from /usr/lib/qt/lib/libqt-mt.so.3
#4  0x408d584c in KProgress::setTotalSteps () from /opt/kde/lib/libkdeui.so.4
#5  0x40224198 in KIPI::BatchProgressDialog::setProgress ()
   from /opt/kde/lib/libkipi.so.0
#6  0x429de6bf in Plugin_FindImages::customEvent ()
   from /opt/kde/lib/kde3/kipiplugin_findimages.so
#7  0x40fd299c in QObject::event () from /usr/lib/qt/lib/libqt-mt.so.3
#8  0x40f7884f in QApplication::internalNotify () from /usr/lib/qt/lib/libqt-mt.so.3
#9  0x40f77e4e in QApplication::notify () from /usr/lib/qt/lib/libqt-mt.so.3
#10 0x40afb585 in KApplication::notify () from /opt/kde/lib/libkdecore.so.4
#11 0x40f79646 in QApplication::sendPostedEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#12 0x40f794c6 in QApplication::sendPostedEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#13 0x40f22e4d in QEventLoop::processEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#14 0x40f8ac4f in QEventLoop::processEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#15 0x40f789be in QApplication::processEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#16 0x40f78988 in QApplication::processEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#17 0x429ddfa0 in Plugin_FindImages::customEvent ()
   from /opt/kde/lib/kde3/kipiplugin_findimages.so
#18 0x40fd299c in QObject::event () from /usr/lib/qt/lib/libqt-mt.so.3
#19 0x40f7884f in QApplication::internalNotify () from /usr/lib/qt/lib/libqt-mt.so.3
#20 0x40f77e4e in QApplication::notify () from /usr/lib/qt/lib/libqt-mt.so.3
#21 0x40afb585 in KApplication::notify () from /opt/kde/lib/libkdecore.so.4
#22 0x40f79646 in QApplication::sendPostedEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#23 0x40f794c6 in QApplication::sendPostedEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#24 0x40f22e4d in QEventLoop::processEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#25 0x40f8ac4f in QEventLoop::processEvents () from /usr/lib/qt/lib/libqt-mt.so.3
Comment 3 caulier.gilles 2005-09-29 13:25:06 UTC
You  need to compile kipi-plugins using --enable-debug=full with .configure option to give more debug informations

Nota : process a find duplicate search on my computer (over 10000 photos) don't crash this plugin...

Gilles

 
Comment 4 Bernard S. Jansen 2005-09-30 11:48:45 UTC
Downloaded kipi-plugins-0.1.0-beta2, and did #./configure --enable-debug=full.
Used #checkinstall (rather then #make install).

Please note that during gdm there were a few dozen SIG43 events before digiKam even fully loaded.  This happened with the slack package version of kipi-plugins too. Forgot to mention before, sorry, wasn't sure if it was relevant.

Following are up to line 25 from running a gdb backtrace at the 'crash' event.  I have saved to line 104 if required:

#0  0x412af8c2 in QString::replace () from /usr/lib/qt/lib/libqt-mt.so.3
#1  0x412afe36 in QString::replace () from /usr/lib/qt/lib/libqt-mt.so.3
#2  0x408d5ae8 in KProgress::setIndicator () from /opt/kde/lib/libkdeui.so.4
#3  0x410e097f in QProgressBar::setTotalSteps () from /usr/lib/qt/lib/libqt-mt.so.3
#4  0x408d584c in KProgress::setTotalSteps () from /opt/kde/lib/libkdeui.so.4
#5  0x40224198 in KIPI::BatchProgressDialog::setProgress () from /opt/kde/lib/libkipi.so.0
#6  0x429ed2f5 in Plugin_FindImages::customEvent () from /opt/kde/lib/kde3/kipiplugin_findimages.so
#7  0x40fd299c in QObject::event () from /usr/lib/qt/lib/libqt-mt.so.3
#8  0x40f7884f in QApplication::internalNotify () from /usr/lib/qt/lib/libqt-mt.so.3
#9  0x40f77e4e in QApplication::notify () from /usr/lib/qt/lib/libqt-mt.so.3
#10 0x40afb585 in KApplication::notify () from /opt/kde/lib/libkdecore.so.4
#11 0x40f79646 in QApplication::sendPostedEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#12 0x40f794c6 in QApplication::sendPostedEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#13 0x40f22e4d in QEventLoop::processEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#14 0x40f8ac4f in QEventLoop::processEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#15 0x40f789be in QApplication::processEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#16 0x40f78988 in QApplication::processEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#17 0x429ed3b5 in Plugin_FindImages::customEvent () from /opt/kde/lib/kde3/kipiplugin_findimages.so
#18 0x40fd299c in QObject::event () from /usr/lib/qt/lib/libqt-mt.so.3
#19 0x40f7884f in QApplication::internalNotify () from /usr/lib/qt/lib/libqt-mt.so.3
#20 0x40f77e4e in QApplication::notify () from /usr/lib/qt/lib/libqt-mt.so.3
#21 0x40afb585 in KApplication::notify () from /opt/kde/lib/libkdecore.so.4
#22 0x40f79646 in QApplication::sendPostedEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#23 0x40f794c6 in QApplication::sendPostedEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#24 0x40f22e4d in QEventLoop::processEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#25 0x40f8ac4f in QEventLoop::processEvents () from /usr/lib/qt/lib/libqt-mt.so.3

I can do a backtrace at the first "SIG43" if you like?  Sorry if this is taking a bit long, but this is all very new to me -- but I'm very happy to try to learn.
Comment 5 Renchi Raju 2005-10-01 23:20:50 UTC
you can ignore SIG43 signals. google to see how to setup gdb to ignore them.
Comment 6 Angelo Naselli 2006-06-18 23:34:13 UTC
I tested it with 1.3 Gb of photos in an album with sub-albums.
After a while (a lot more, really) i obain that it worked well.
Can the reporter check if it is still valid?
Thanks,
  Angelo 
Comment 7 Angelo Naselli 2006-06-22 22:48:56 UTC
No answers from reporter, no confirm from other users and moreover 
the bug has not been replicated by developers. 

If reporters has the problem yet can open it again.
Thanks,
   Angelo
Comment 8 Bernard S. Jansen 2006-09-12 02:01:28 UTC
Been away for a while.  This problem has gone away with later versions of digikam, so happy to say that it is resolved.  Must have been a ghost in my machine.
Comment 9 caulier.gilles 2019-12-27 13:16:39 UTC
Not reproducible with 7.0.0-beta1