Bug 261015 - Digikam Fingerprinter crashes
Summary: Digikam Fingerprinter crashes
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Unclassified
Component: Searches-Similarity (show other bugs)
Version: 1.7.0
Platform: Ubuntu Packages Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-22 23:51 UTC by Stephen S
Modified: 2012-06-27 10:35 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.8.0


Attachments
Testcase that crashes the fingerprinter. (168 bytes, image/png)
2010-12-28 02:45 UTC, Daniel Scharrer
Details
Handle Qt::KeepAspectRatio scaling the destination width/height to zero in DImg::smoothScale (410 bytes, patch)
2010-12-28 02:48 UTC, Daniel Scharrer
Details
New crash information added by DrKonqi (18.46 KB, text/plain)
2011-03-06 13:15 UTC, Vasile Jureschi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen S 2010-12-22 23:51:04 UTC
Application: digikam (1.7.0)
KDE Platform Version: 4.5.1 (KDE 4.5.1)
Qt Version: 4.7.0
Operating System: Linux 2.6.35-24-generic x86_64
Distribution: Ubuntu 10.10

-- Information about the crash:
- What I was doing when the application crashed:

I was rebuilding the fingerprint database for all the pictures. When it got close to 95%, it crashed. It might be related to the number of pictures (thousands), but I think it is crashing on a specific one near the end each time. I am unable to determine the exact picture, since the crash closes the screen.

This happened with the current version of Digikam (1.7.0) and Kipi Plugins (1.7.0). It also happened when I had version 1.6.0 of each.

The crash can be reproduced every time.

-- Backtrace:
Application: digiKam (digikam), signal: Floating point exception
[Current thread is 1 (Thread 0x7f86393c07c0 (LWP 2536))]

Thread 19 (Thread 0x7f8625190700 (LWP 2537)):
#0  0x00007f8630c00203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f862deda009 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f862deda7b5 in g_main_loop_run () from /lib/libglib-2.0.so.0
#3  0x00007f86258c73c4 in ?? () from /usr/lib/libgio-2.0.so.0
#4  0x00007f862deff7e4 in ?? () from /lib/libglib-2.0.so.0
#5  0x00007f8632139971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#6  0x00007f8630c0c92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 18 (Thread 0x7f86189b5700 (LWP 2538)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f86323c4e3b in wait (this=<value optimized out>, mutex=0x2bc3250, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x2bc3250, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x0000000000627f0b in Digikam::ScanController::run (this=0x2b52470) at /build/buildd/digikam-1.7.0/digikam/scancontroller.cpp:571
#4  0x00007f86323c427e in QThreadPrivate::start (arg=0x2b52470) at thread/qthread_unix.cpp:266
#5  0x00007f8632139971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#6  0x00007f8630c0c92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 17 (Thread 0x7f86181b4700 (LWP 2676)):
#0  0x00007f8630c00203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f862deda009 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f862deda45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f86324e41e6 in QEventDispatcherGlib::processEvents (this=0x3107d70, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#4  0x00007f86324b6a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#5  0x00007f86324b6dec in QEventLoop::exec (this=0x7f86181b3d90, flags=) at kernel/qeventloop.cpp:201
#6  0x00007f86323c12fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#7  0x00007f86323c427e in QThreadPrivate::start (arg=0x2fe0af0) at thread/qthread_unix.cpp:266
#8  0x00007f8632139971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#9  0x00007f8630c0c92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 16 (Thread 0x7f8617759700 (LWP 2677)):
#0  0x00007f8630c00203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f862deda009 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f862deda45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f86324e41e6 in QEventDispatcherGlib::processEvents (this=0x3015810, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#4  0x00007f86324b6a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#5  0x00007f86324b6dec in QEventLoop::exec (this=0x7f8617758d90, flags=) at kernel/qeventloop.cpp:201
#6  0x00007f86323c12fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#7  0x00007f86323c427e in QThreadPrivate::start (arg=0x2da8480) at thread/qthread_unix.cpp:266
#8  0x00007f8632139971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#9  0x00007f8630c0c92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 15 (Thread 0x7f8616f02700 (LWP 2678)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f86323c4e3b in wait (this=<value optimized out>, mutex=0x2fdcde8, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x2fdcde8, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f8636889ec2 in Digikam::ParkingThread::run (this=0x2fdcdd0) at /build/buildd/digikam-1.7.0/libs/threads/threadmanager.cpp:119
#4  0x00007f86323c427e in QThreadPrivate::start (arg=0x2fdcdd0) at thread/qthread_unix.cpp:266
#5  0x00007f8632139971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#6  0x00007f8630c0c92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 14 (Thread 0x7f8616701700 (LWP 2679)):
#0  0x00007f8630c00203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f862deda009 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f862deda45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f86324e41e6 in QEventDispatcherGlib::processEvents (this=0x2ec8ff0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#4  0x00007f86324b6a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#5  0x00007f86324b6dec in QEventLoop::exec (this=0x7f8616700d90, flags=) at kernel/qeventloop.cpp:201
#6  0x00007f86323c12fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#7  0x00007f86323c427e in QThreadPrivate::start (arg=0x2ec55d0) at thread/qthread_unix.cpp:266
#8  0x00007f8632139971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#9  0x00007f8630c0c92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 13 (Thread 0x7f8615f00700 (LWP 2680)):
#0  0x00007f8630c00203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f862deda009 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f862deda45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f86324e41e6 in QEventDispatcherGlib::processEvents (this=0x3106f90, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#4  0x00007f86324b6a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#5  0x00007f86324b6dec in QEventLoop::exec (this=0x7f8615effd90, flags=) at kernel/qeventloop.cpp:201
#6  0x00007f86323c12fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#7  0x00007f86323c427e in QThreadPrivate::start (arg=0x2eca710) at thread/qthread_unix.cpp:266
#8  0x00007f8632139971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#9  0x00007f8630c0c92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 12 (Thread 0x7f8603ffe700 (LWP 2697)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:212
#1  0x00007f86141a00d1 in ?? () from /usr/lib/libxine.so.1
#2  0x00007f8632139971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#3  0x00007f8630c0c92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 11 (Thread 0x7f86031d0700 (LWP 2698)):
#0  0x00007f8630c052c3 in select () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007f86141c9385 in xine_usec_sleep () from /usr/lib/libxine.so.1
#2  0x00007f86141add09 in ?? () from /usr/lib/libxine.so.1
#3  0x00007f8632139971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#4  0x00007f8630c0c92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 10 (Thread 0x7f86029cf700 (LWP 2699)):
#0  isEmpty (src=0x370a000) at ../../include/QtCore/../../src/corelib/tools/qlist.h:95
#1  isEmpty (src=0x370a000) at ../../include/QtCore/../../src/corelib/tools/qlist.h:139
#2  timerSourceCheckHelper (src=0x370a000) at kernel/qeventdispatcher_glib.cpp:146
#3  0x00007f862ded966a in g_main_context_check () from /lib/libglib-2.0.so.0
#4  0x00007f862deda023 in ?? () from /lib/libglib-2.0.so.0
#5  0x00007f862deda45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#6  0x00007f86324e41e6 in QEventDispatcherGlib::processEvents (this=0x3708b20, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#7  0x00007f86324b6a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#8  0x00007f86324b6dec in QEventLoop::exec (this=0x7f86029ced30, flags=) at kernel/qeventloop.cpp:201
#9  0x00007f86323c12fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#10 0x00007f860e4562b0 in ?? () from /usr/lib/qt4/plugins/phonon_backend/phonon_xine.so
#11 0x00007f86323c427e in QThreadPrivate::start (arg=0x37084e0) at thread/qthread_unix.cpp:266
#12 0x00007f8632139971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#13 0x00007f8630c0c92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#14 0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7f86021ce700 (LWP 2700)):
#0  0x00007f8630c00203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f863091140f in ?? () from /usr/lib/libpulse.so.0
#2  0x00007f8630900d76 in pa_mainloop_poll () from /usr/lib/libpulse.so.0
#3  0x00007f86309027f9 in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
#4  0x00007f86309028b0 in pa_mainloop_run () from /usr/lib/libpulse.so.0
#5  0x00007f863091120b in ?? () from /usr/lib/libpulse.so.0
#6  0x00007f86288effb8 in ?? () from /usr/lib/libpulsecommon-0.9.21.so
#7  0x00007f8632139971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#8  0x00007f8630c0c92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7f85fd9cc700 (LWP 2701)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f86141b0e83 in ?? () from /usr/lib/libxine.so.1
#2  0x00007f8632139971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#3  0x00007f8630c0c92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7f85fd1cb700 (LWP 2703)):
#0  0x00007f8630c00203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f862deda009 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f862deda45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f86324e41e6 in QEventDispatcherGlib::processEvents (this=0x37d73e0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#4  0x00007f86324b6a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#5  0x00007f86324b6dec in QEventLoop::exec (this=0x7f85fd1cad50, flags=) at kernel/qeventloop.cpp:201
#6  0x00007f86323c12fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#7  0x00007f86324965f8 in QInotifyFileSystemWatcherEngine::run (this=0x37d6e20) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f86323c427e in QThreadPrivate::start (arg=0x37d6e20) at thread/qthread_unix.cpp:266
#9  0x00007f8632139971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#10 0x00007f8630c0c92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7f85fa85d700 (LWP 2711)):
#0  0xffffffffff60014c in ?? ()
#1  0x00007f85fa85ca30 in ?? ()
#2  0x00007fff786d8852 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 5 (Thread 0x7f85f8859700 (LWP 2719)):
#0  0x00007f863213cc9d in __pthread_mutex_unlock_usercnt (mutex=0x5220728) at pthread_mutex_unlock.c:52
#1  __pthread_mutex_unlock (mutex=0x5220728) at pthread_mutex_unlock.c:290
#2  0x00007f862ded9ded in ?? () from /lib/libglib-2.0.so.0
#3  0x00007f862deda45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#4  0x00007f86324e41e6 in QEventDispatcherGlib::processEvents (this=0x5293340, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#5  0x00007f86324b6a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#6  0x00007f86324b6dec in QEventLoop::exec (this=0x7f85f8858d50, flags=) at kernel/qeventloop.cpp:201
#7  0x00007f86323c12fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#8  0x00007f86324965f8 in QInotifyFileSystemWatcherEngine::run (this=0x5274f60) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x00007f86323c427e in QThreadPrivate::start (arg=0x5274f60) at thread/qthread_unix.cpp:266
#10 0x00007f8632139971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#11 0x00007f8630c0c92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f85d7427700 (LWP 2766)):
#0  0x00007f863213b665 in __pthread_mutex_lock (mutex=0x7f86083cb328) at pthread_mutex_lock.c:61
#1  0x00007f862ded9697 in g_main_context_check () from /lib/libglib-2.0.so.0
#2  0x00007f862deda023 in ?? () from /lib/libglib-2.0.so.0
#3  0x00007f862deda45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#4  0x00007f86324e41e6 in QEventDispatcherGlib::processEvents (this=0x7f86089aaf90, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#5  0x00007f86324b6a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#6  0x00007f86324b6dec in QEventLoop::exec (this=0x7f85d7426d50, flags=) at kernel/qeventloop.cpp:201
#7  0x00007f86323c12fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#8  0x00007f86324965f8 in QInotifyFileSystemWatcherEngine::run (this=0x7ba37e0) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x00007f86323c427e in QThreadPrivate::start (arg=0x7ba37e0) at thread/qthread_unix.cpp:266
#10 0x00007f8632139971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#11 0x00007f8630c0c92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f85d6c26700 (LWP 2774)):
#0  __libc_enable_asynccancel () at ../nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S:61
#1  0x00007f8630c001e8 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=<value optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:85
#2  0x00007f862deda009 in ?? () from /lib/libglib-2.0.so.0
#3  0x00007f862deda45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#4  0x00007f86324e41e6 in QEventDispatcherGlib::processEvents (this=0x8136de0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#5  0x00007f86324b6a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#6  0x00007f86324b6dec in QEventLoop::exec (this=0x7f85d6c25d50, flags=) at kernel/qeventloop.cpp:201
#7  0x00007f86323c12fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#8  0x00007f86324965f8 in QInotifyFileSystemWatcherEngine::run (this=0x8106840) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x00007f86323c427e in QThreadPrivate::start (arg=0x8106840) at thread/qthread_unix.cpp:266
#10 0x00007f8632139971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#11 0x00007f8630c0c92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f85d4c22700 (LWP 2781)):
#0  0x00007f8630c00203 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f862deda009 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f862deda45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f86324e41e6 in QEventDispatcherGlib::processEvents (this=0x851c000, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#4  0x00007f86324b6a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#5  0x00007f86324b6dec in QEventLoop::exec (this=0x7f85d4c21d50, flags=) at kernel/qeventloop.cpp:201
#6  0x00007f86323c12fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#7  0x00007f86324965f8 in QInotifyFileSystemWatcherEngine::run (this=0x8518190) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f86323c427e in QThreadPrivate::start (arg=0x8518190) at thread/qthread_unix.cpp:266
#9  0x00007f8632139971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#10 0x00007f8630c0c92d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f86393c07c0 (LWP 2536)):
[KCrash Handler]
#6  0x00007f86366edff5 in Digikam::DImgScale::dimgCalcYPoints (src=0x7f85bd077820, sw=134, sh=1, dh=0) at /build/buildd/digikam-1.7.0/libs/dimg/dimgscale.cpp:322
#7  0x00007f86366ee17a in Digikam::DImgScale::dimgCalcScaleInfo (img=..., sw=<value optimized out>, sh=1, dw=<value optimized out>, dh=<value optimized out>, aa=true) at /build/buildd/digikam-1.7.0/libs/dimg/dimgscale.cpp:462
#8  0x00007f86366ee7c5 in Digikam::DImg::smoothScale (this=0x7fff7868dae0, dw=<value optimized out>, dh=<value optimized out>, aspectRatioMode=<value optimized out>) at /build/buildd/digikam-1.7.0/libs/dimg/dimgscale.cpp:136
#9  0x0000000000503ac0 in Digikam::FingerPrintsGenerator::slotGotImagePreview (this=0x874e750, desc=..., img=<value optimized out>) at /build/buildd/digikam-1.7.0/utilities/batch/fingerprintsgenerator.cpp:183
#10 0x0000000000503c50 in Digikam::FingerPrintsGenerator::qt_metacall (this=0x874e750, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7f85bc9a9120) at /build/buildd/digikam-1.7.0/obj-x86_64-linux-gnu/digikam/fingerprintsgenerator.moc:83
#11 0x00007f86324c9bde in QObject::event (this=0x874e750, e=0x7f8630ea4e40) at kernel/qobject.cpp:1219
#12 0x00007f863311e6df in QWidget::event (this=0x874e750, event=0x7f85bd09da80) at kernel/qwidget.cpp:8646
#13 0x00007f86330c8fdc in QApplicationPrivate::notify_helper (this=0x2968bb0, receiver=0x874e750, e=0x7f85bd09da80) at kernel/qapplication.cpp:4396
#14 0x00007f86330ceaed in QApplication::notify (this=0x7fff7868e8b0, receiver=0x874e750, e=0x7f85bd09da80) at kernel/qapplication.cpp:4277
#15 0x00007f8633e1b156 in KApplication::notify (this=0x7fff7868e8b0, receiver=0x874e750, event=0x7f85bd09da80) at ../../kdeui/kernel/kapplication.cpp:310
#16 0x00007f86324b7cdc in QCoreApplication::notifyInternal (this=0x7fff7868e8b0, receiver=0x874e750, event=0x7f85bd09da80) at kernel/qcoreapplication.cpp:732
#17 0x00007f86324bac22 in sendEvent (receiver=0x0, event_type=<value optimized out>, data=0x2921b90) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#18 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=<value optimized out>, data=0x2921b90) at kernel/qcoreapplication.cpp:1373
#19 0x00007f86324e4653 in sendPostedEvents (s=0x296c720) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#20 postEventSourceDispatch (s=0x296c720) at kernel/qeventdispatcher_glib.cpp:277
#21 0x00007f862ded6342 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#22 0x00007f862deda2a8 in ?? () from /lib/libglib-2.0.so.0
#23 0x00007f862deda45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#24 0x00007f86324e4193 in QEventDispatcherGlib::processEvents (this=0x2921280, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:415
#25 0x00007f863317ba4e in QGuiEventDispatcherGlib::processEvents (this=0x7f8630ea4e40, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#26 0x00007f86324b6a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#27 0x00007f86324b6dec in QEventLoop::exec (this=0x7fff7868e720, flags=) at kernel/qeventloop.cpp:201
#28 0x00007f86324baebb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#29 0x000000000067a36d in main (argc=<value optimized out>, argv=<value optimized out>) at /build/buildd/digikam-1.7.0/digikam/main.cpp:216

Possible duplicates by query: bug 248037.

Reported using DrKonqi
Comment 1 caulier.gilles 2010-12-23 07:13:18 UTC
Stephen,

Can you identify the file which crash digiKam during duplicate scan ?

Enable debug output using kdebugdialog and turning digikam debug spaces. Run digiKam into a console and look messages printed.

Typically, we have fixed this problem with 1.6.0. Look report here :

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

Daniel,

I CC you for info. Look like not all case have been fixed in DImgScale implementation. Thanks in advance for your help...

Gilles Caulier
Comment 2 Daniel Scharrer 2010-12-23 13:12:14 UTC
The problem seems to be a 1-pixel high image being scaled down and the destination height being calculatet as 0, leading to divide by zero and possibly other errors later on.

This could be caused by Digikam::FingerPrintsGenerator::slotGotImagePreview passing 0 as the dh parameter.

More likely though, the this is caused by the newSize.scale( QSize(dw, dh), aspectRatioMode ); in Digikam::DImg::smoothScale always rounding down the result.

To solve this, you need to check if the calculated dh or dw are equal to zero and then either abort (since the new image has zero height/width there is nothing to du) or better yet just bump the height/width up to a minimum of one (a thumbnail with only one row of pixels is still more useful than an empty thumbnail, no?).

So that would mean to add in Digikam::DImg::smoothScale after
dw = newSize.width();
dh = newSize.height();
add
if(dw == 0) {
 dw = 1;
}
if(dh == 0) {
 dh = 1;
}

Because I don't have the source code checked out right now (and don't have time to do so) I can't provide proper diff file or test the changes myself, but just adding thos chechs for dw == 0 and dh == 0 should fix this crash.

Note that this change will result in Digikam::DImg::smoothScale always returning an image width width and height of at least one, even if the passed dw and/or dh are zero, which may or may not be desirable. However, this should not break any existing uses of the smoothScale, as passing 0 as dw or dh results in a crash without this change.

Happy holidays,
Daniel
Comment 3 caulier.gilles 2010-12-23 13:41:09 UTC
Thanks Daniel for this solution.

Marcel, Andi, your viewpoint ?

Gilles
Comment 4 Marcel Wiesweg 2010-12-23 14:30:49 UTC
Stephen: It's a picture with width=134 and height=1 or multiples thereof. Panorama?

Daniel: I think passing an image of width or height 0 is caught somewhere. It's simple, when given a null image it returns a null image.
Comment 5 Daniel Scharrer 2010-12-28 02:42:08 UTC
(In reply to comment #4)
> Daniel: I think passing an image of width or height 0 is caught somewhere. It's
> simple, when given a null image it returns a null image.
Yes, passing dw=0 an/or dh=0 is handled by smoothScale().

However, when passing Qt::KeepAspectRatio as aspectRatioMode (the fringerprinter does this when generating the status thumbnail), dw or dh may still be scaled down to zero and this is not handled.
Comment 6 Daniel Scharrer 2010-12-28 02:45:02 UTC
Created attachment 55307 [details]
Testcase that crashes the fingerprinter.

This image crashes digikam when generating fingerprints with the same backtrace as provided in this bug. The crash only happens the once when rebuilding fingerprints (until 'touch fingerprinter-test.png'-ing it so it will be fingerprinted again).
Comment 7 Daniel Scharrer 2010-12-28 02:48:31 UTC
Created attachment 55308 [details]
Handle Qt::KeepAspectRatio scaling the destination width/height to zero in DImg::smoothScale

This fixes the crash caused by attached image.
Comment 8 caulier.gilles 2010-12-29 15:44:54 UTC
SVN commit 1210103 by cgilles:

apply patch #55308
BUGS: 261015


 M  +1 -1      dimgscale.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1210103
Comment 9 Vasile Jureschi 2011-03-06 13:15:27 UTC
Created attachment 57719 [details]
New crash information added by DrKonqi

digikam (1.4.0) on KDE Platform 4.5.1 (KDE 4.5.1) using Qt 4.7.0

Crashed while rebuilding the fingerprints database.

-- Backtrace (Reduced):
#7  0x0509f233 in Digikam::DImgScale::dimgCalcYPoints (src=0x97ccb860, sw=138, sh=1, dh=0) at /build/buildd/digikam-1.4.0/libs/dimg/dimgscale.cpp:296
#8  0x0509f462 in Digikam::DImgScale::dimgCalcScaleInfo (img=..., sw=138, sh=1, dw=128, dh=0, aa=true) at /build/buildd/digikam-1.4.0/libs/dimg/dimgscale.cpp:417
#9  0x0509f9f6 in Digikam::DImg::smoothScale (this=0xbfb1dcfc, dw=128, dh=128, aspectRatioMode=Qt::KeepAspectRatio) at /build/buildd/digikam-1.4.0/libs/dimg/dimgscale.cpp:128
#10 0x08186956 in Digikam::FingerPrintsGenerator::slotGotImagePreview (this=0xb2cb1438, desc=..., img=...) at /build/buildd/digikam-1.4.0/utilities/batch/fingerprintsgenerator.cpp:174
#11 0x08186b0b in Digikam::FingerPrintsGenerator::qt_metacall (this=0xb2cb1438, _c=QMetaObject::InvokeMetaMethod, _id=86, _a=0xa0b18520) at /build/buildd/digikam-1.4.0/obj-i686-linux-gnu/digikam/fingerprintsgenerator.moc:83
Comment 10 caulier.gilles 2011-03-06 14:54:35 UTC
It's have been already fixed. Please update to last stable 1.9.0. digiKam 1.4.0 is too old

Gilles Caulier