Application: digikam (4.5.0) KDE Platform Version: 4.14.3 Qt Version: 4.8.6 Operating System: Linux 3.17.6-300.fc21.x86_64 x86_64 Distribution: "Fedora release 21 (Twenty One)" -- Information about the crash: after adding a new collection, digikam crashes every time a few minutes after startup The crash can be reproduced every time. -- Backtrace: Application: digiKam (digikam), signal: Aborted Using host libthread_db library "/lib64/libthread_db.so.1". pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185 185 62: movl (%rsp), %edi [Current thread is 1 (Thread 0x7f51e3819b00 (LWP 7431))] Thread 4 (Thread 0x7f51dd29d700 (LWP 7432)): #0 0x000000395b00f5fd in recvmsg () at ../sysdeps/unix/syscall-template.S:81 #1 0x000000396b005bdc in udev_monitor_receive_device () at /lib64/libudev.so.1 #2 0x00007f51e5828618 in linux_udev_event_thread_main () at /lib64/libusb-1.0.so.0 #3 0x000000395b00752a in start_thread (arg=0x7f51dd29d700) at pthread_create.c:310 #4 0x000000395a90077d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 Thread 3 (Thread 0x7f51d67ca700 (LWP 7433)): [KCrash Handler] #6 0x000000395a8348c7 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55 #7 0x000000395a83652a in __GI_abort () at abort.c:89 #8 0x000000395a878513 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x395a987830 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175 #9 0x000000395a884165 in __GI___libc_free (ptr=<optimized out>, str=0x395a987878 "free(): invalid next size (fast)", action=<optimized out>) at malloc.c:4974 #10 0x000000395a884165 in __GI___libc_free (have_lock=0, p=<optimized out>, av=<optimized out>) at malloc.c:3841 #11 0x000000395a884165 in __GI___libc_free (mem=<optimized out>) at malloc.c:2951 #12 0x00007f51e92454e9 in Exiv2::RiffVideo::infoTagsHandler() () at /lib64/libexiv2.so.13 #13 0x00007f51e9249345 in Exiv2::RiffVideo::decodeBlock() () at /lib64/libexiv2.so.13 #14 0x00007f51e9248f78 in Exiv2::RiffVideo::tagDecoder(Exiv2::DataBuf&, unsigned long) () at /lib64/libexiv2.so.13 #15 0x00007f51e9249345 in Exiv2::RiffVideo::decodeBlock() () at /lib64/libexiv2.so.13 #16 0x00007f51e92496e8 in Exiv2::RiffVideo::readMetadata() () at /lib64/libexiv2.so.13 #17 0x00007f51eea19dcd in KExiv2Iface::KExiv2::load(QString const&) const (this=this@entry=0x7f51d072d9c0, filePath=...) at /usr/src/debug/libkexiv2-4.14.3/libkexiv2/kexiv2.cpp:304 #18 0x00007f51ee0a9c66 in Digikam::DMetadata::load(QString const&) const (this=this@entry=0x7f51d072d9c0, filePath=...) at /usr/src/debug/digikam-4.5.0/core/libs/dmetadata/dmetadata.cpp:110 #19 0x00007f51edac9617 in Digikam::ImageScanner::loadFromDisk() (this=this@entry=0x7f51d67c9440) at /usr/src/debug/digikam-4.5.0/core/libs/database/imagescanner.cpp:1525 #20 0x00007f51edac9800 in Digikam::ImageScanner::newFile(int) (this=this@entry=0x7f51d67c9440, albumId=albumId@entry=10299) at /usr/src/debug/digikam-4.5.0/core/libs/database/imagescanner.cpp:285 #21 0x00007f51eda5af16 in Digikam::CollectionScanner::scanNewFile(QFileInfo const&, int) (this=this@entry=0x7f51d67c9a90, info=..., albumId=10299) at /usr/src/debug/digikam-4.5.0/core/libs/database/collectionscanner.cpp:1247 #22 0x00007f51eda5e5f2 in Digikam::CollectionScanner::scanAlbum(Digikam::CollectionLocation const&, QString const&) (this=this@entry=0x7f51d67c9a90, location=..., album=...) at /usr/src/debug/digikam-4.5.0/core/libs/database/collectionscanner.cpp:1089 #23 0x00007f51eda5e4af in Digikam::CollectionScanner::scanAlbum(Digikam::CollectionLocation const&, QString const&) (this=this@entry=0x7f51d67c9a90, location=..., album=...) at /usr/src/debug/digikam-4.5.0/core/libs/database/collectionscanner.cpp:1112 #24 0x00007f51eda5ee43 in Digikam::CollectionScanner::scanAlbumRoot(Digikam::CollectionLocation const&) (this=this@entry=0x7f51d67c9a90, location=...) at /usr/src/debug/digikam-4.5.0/core/libs/database/collectionscanner.cpp:828 #25 0x00007f51eda6068d in Digikam::CollectionScanner::completeScan() (this=this@entry=0x7f51d67c9a90) at /usr/src/debug/digikam-4.5.0/core/libs/database/collectionscanner.cpp:489 #26 0x00000000005e8270 in Digikam::ScanController::run() (this=0xf51ab0) at /usr/src/debug/digikam-4.5.0/core/app/database/scancontroller.cpp:756 #27 0x000000396b27c3bf in QThreadPrivate::start(void*) (arg=0xf51ab0) at thread/qthread_unix.cpp:349 #28 0x000000395b00752a in start_thread (arg=0x7f51d67ca700) at pthread_create.c:310 #29 0x000000395a90077d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 Thread 2 (Thread 0x7f51d5fc9700 (LWP 7434)): #0 0x000000395b00f1cd in read () at ../sysdeps/unix/syscall-template.S:81 #1 0x000000395cc8cd30 in g_wakeup_acknowledge () at /lib64/libglib-2.0.so.0 #2 0x000000395cc498ec in g_main_context_check () at /lib64/libglib-2.0.so.0 #3 0x000000395cc49dc3 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0 #4 0x000000395cc49f3c in g_main_context_iteration () at /lib64/libglib-2.0.so.0 #5 0x000000396b3b4a3e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7f51c80008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:452 #6 0x000000396b384261 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f51d5fc8a80, flags=...) at kernel/qeventloop.cpp:149 #7 0x000000396b3845c5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7f51d5fc8a80, flags=...) at kernel/qeventloop.cpp:204 #8 0x000000396b279b59 in QThread::exec() (this=this@entry=0xfa25d0) at thread/qthread.cpp:538 #9 0x000000396b364cc3 in QInotifyFileSystemWatcherEngine::run() (this=0xfa25d0) at io/qfilesystemwatcher_inotify.cpp:265 #10 0x000000396b27c3bf in QThreadPrivate::start(void*) (arg=0xfa25d0) at thread/qthread_unix.cpp:349 #11 0x000000395b00752a in start_thread (arg=0x7f51d5fc9700) at pthread_create.c:310 #12 0x000000395a90077d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 Thread 1 (Thread 0x7f51e3819b00 (LWP 7431)): #0 0x000000395b00c590 in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185 #1 0x000000396b27c916 in QWaitCondition::wait(QMutex*, unsigned long) (time=18446744073709551615, this=0xf51be0) at thread/qwaitcondition_unix.cpp:86 #2 0x000000396b27c916 in QWaitCondition::wait(QMutex*, unsigned long) (this=this@entry=0xf51b90, mutex=mutex@entry=0xf51b68, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158 #3 0x000000396b27bf4e in QThread::wait(unsigned long) (this=this@entry=0xf51ab0, time=time@entry=18446744073709551615) at thread/qthread_unix.cpp:720 #4 0x00000000005e37d9 in Digikam::ScanController::shutDown() (this=this@entry=0xf51ab0) at /usr/src/debug/digikam-4.5.0/core/app/database/scancontroller.cpp:361 #5 0x00000000005e682b in Digikam::ScanController::~ScanController() (this=0xf51ab0, __in_chrg=<optimized out>) at /usr/src/debug/digikam-4.5.0/core/app/database/scancontroller.cpp:337 #6 0x00000000005e6af7 in destroy() (this=0xf51ab0, __in_chrg=<optimized out>) at /usr/src/debug/digikam-4.5.0/core/app/database/scancontroller.cpp:277 #7 0x00000000005e6af7 in destroy() () at /usr/src/debug/digikam-4.5.0/core/app/database/scancontroller.cpp:284 #8 0x000000395a839382 in __run_exit_handlers (status=1, listp=0x395abb76a0 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:82 #9 0x000000395a8393d5 in __GI_exit (status=<optimized out>) at exit.c:104 #10 0x000000396dc334d8 in qt_xio_errhandler(Display*) () at kernel/qapplication_x11.cpp:773 #11 0x000000397364d440 in KApplication::xioErrhandler(_XDisplay*) (this=0x7fff323a9fe0, dpy=0xdbfb40) at /usr/src/debug/kdelibs-4.14.3/kdeui/kernel/kapplication.cpp:419 #12 0x000000395e04557e in _XIOError () at /lib64/libX11.so.6 #13 0x000000395e042ebd in _XEventsQueued () at /lib64/libX11.so.6 #14 0x000000395e034760 in XEventsQueued () at /lib64/libX11.so.6 #15 0x000000396dc6ab8c in x11EventSourceCheck(GSource*) (s=0xdbd960) at kernel/qguieventdispatcher_glib.cpp:85 #16 0x000000395cc49841 in g_main_context_check () at /lib64/libglib-2.0.so.0 #17 0x000000395cc49dc3 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0 #18 0x000000395cc49f3c in g_main_context_iteration () at /lib64/libglib-2.0.so.0 #19 0x000000396b3b4a1e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0xd0f220, flags=...) at kernel/qeventdispatcher_glib.cpp:450 #20 0x000000396dc6b136 in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207 #21 0x000000396b384261 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0xec3070, flags=...) at kernel/qeventloop.cpp:149 #22 0x000000396b3845c5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0xec3070, flags=...) at kernel/qeventloop.cpp:204 #23 0x00000000005e3c61 in Digikam::ScanController::completeCollectionScanCore(bool, bool) (this=0xf51ab0, needTotalFiles=needTotalFiles@entry=true, defer=defer@entry=false) at /usr/src/debug/digikam-4.5.0/core/app/database/scancontroller.cpp:486 #24 0x00000000005e3d7e in Digikam::ScanController::completeCollectionScanInBackground(bool) (this=<optimized out>, defer=defer@entry=false) at /usr/src/debug/digikam-4.5.0/core/app/database/scancontroller.cpp:471 #25 0x0000000000528f47 in Digikam::NewItemsFinder::slotStart() (this=0x3e60bc0) at /usr/src/debug/digikam-4.5.0/core/utilities/maintenance/newitemsfinder.cpp:112 #26 0x000000396b39e951 in QObject::event(QEvent*) (this=0x3e60bc0, e=<optimized out>) at kernel/qobject.cpp:1222 #27 0x000000396dbc7efc in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0xdc3ab0, receiver=receiver@entry=0x3e60bc0, e=e@entry=0xf58280) at kernel/qapplication.cpp:4565 #28 0x000000396dbce958 in QApplication::notify(QObject*, QEvent*) (this=this@entry=0x7fff323a9fe0, receiver=receiver@entry=0x3e60bc0, e=e@entry=0xf58280) at kernel/qapplication.cpp:4351 #29 0x000000397364e9ea in KApplication::notify(QObject*, QEvent*) (this=0x7fff323a9fe0, receiver=0x3e60bc0, event=0xf58280) at /usr/src/debug/kdelibs-4.14.3/kdeui/kernel/kapplication.cpp:311 #30 0x000000396b38570d in QCoreApplication::notifyInternal(QObject*, QEvent*) (this=0x7fff323a9fe0, receiver=receiver@entry=0x3e60bc0, event=event@entry=0xf58280) at kernel/qcoreapplication.cpp:953 #31 0x000000396b3889d1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (event=0xf58280, receiver=0x3e60bc0) at kernel/qcoreapplication.h:231 #32 0x000000396b3889d1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0xd0dd00) at kernel/qcoreapplication.cpp:1577 #33 0x000000396b388e63 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1470 #34 0x000000396b3b48ae in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) () at kernel/qcoreapplication.h:236 #35 0x000000396b3b48ae in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0xdae720) at kernel/qeventdispatcher_glib.cpp:300 #36 0x000000395cc49aeb in g_main_context_dispatch () at /lib64/libglib-2.0.so.0 #37 0x000000395cc49e88 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0 #38 0x000000395cc49f3c in g_main_context_iteration () at /lib64/libglib-2.0.so.0 #39 0x000000396b3b4a1e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0xd0f220, flags=...) at kernel/qeventdispatcher_glib.cpp:450 #40 0x000000396dc6b136 in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207 #41 0x000000396b384261 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fff323a9ad0, flags=...) at kernel/qeventloop.cpp:149 #42 0x000000396b3845c5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fff323a9ad0, flags=...) at kernel/qeventloop.cpp:204 #43 0x000000396b389ca9 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1225 #44 0x000000396dbc639c in QApplication::exec() () at kernel/qapplication.cpp:3823 #45 0x0000000000495e16 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/digikam-4.5.0/core/app/main/main.cpp:236 Possible duplicates by query: bug 309216, bug 306284, bug 303119, bug 302750, bug 302581. Reported using DrKonqi
The culprit is an .AVI file that was present in the new collection. Once removed, digikam starts up fine. exiv2 crashes in a similar way when run on that file: $ exiv2 /tmp/bad.AVI *** Error in `exiv2': free(): invalid next size (fast): 0x0000000000c21db0 *** ======= Backtrace: ========= /lib64/libc.so.6[0x395a87850e] /lib64/libc.so.6(cfree+0x5b5)[0x395a884165] /lib64/libexiv2.so.13(_ZN5Exiv29RiffVideo15infoTagsHandlerEv+0x269)[0x7f3b2a2684e9] /lib64/libexiv2.so.13(_ZN5Exiv29RiffVideo11decodeBlockEv+0x125)[0x7f3b2a26c345] /lib64/libexiv2.so.13(_ZN5Exiv29RiffVideo10tagDecoderERNS_7DataBufEm+0x58)[0x7f3b2a26bf78] /lib64/libexiv2.so.13(_ZN5Exiv29RiffVideo11decodeBlockEv+0x125)[0x7f3b2a26c345] /lib64/libexiv2.so.13(_ZN5Exiv29RiffVideo12readMetadataEv+0x348)[0x7f3b2a26c6e8] exiv2[0x41778b] exiv2[0x41a0dc] exiv2[0x4057de] /lib64/libc.so.6(__libc_start_main+0xf0)[0x395a81ffe0] exiv2[0x405aca] ======= Memory map: ======== 00400000-0042a000 r-xp 00000000 08:12 2101380 /usr/bin/exiv2 00629000-0062a000 r--p 00029000 08:12 2101380 /usr/bin/exiv2 0062a000-0062b000 rw-p 0002a000 08:12 2101380 /usr/bin/exiv2 00c1d000-00c3e000 rw-p 00000000 00:00 0 [heap] 395a000000-395a021000 r-xp 00000000 08:12 2097360 /usr/lib64/ld-2.20.so ...
Apparently, this issue is fixed in a recent exiv2 release (see http://dev.exiv2.org/issues/1002). However, I would consider making digikam resilient to such 3rd party software issues (e.g. by forking a process).
*** This bug has been marked as a duplicate of bug 340373 ***
With 6.0.0, we have now a FFMpeg low level metadata parser based on libav C API for video files database registration. The Exiv2 video support is not used anymore as this code is buggous and nobody sound motivated in Exiv2 to finalize the code. The original post for this file must be fixed now and video metadata support with ffmpeg must be enough to populate database entries. Gilles Caulier
Fixed with the new support of ExifTool to read metadata in place of Exiv2 with video files.