Bug 333508

Summary: Crash in Digikam::DigikamApp::slotRebuildAlbumThumbnails
Product: [Applications] digikam Reporter: kdebugsuser
Component: Maintenance-ThumbsAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles, richard2002
Priority: NOR Keywords: drkonqi
Version: 3.5.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 5.1.0
Sentry Crash Report:

Description kdebugsuser 2014-04-16 15:29:04 UTC
Application: digikam (3.5.0)
KDE Platform Version: 4.12.3
Qt Version: 4.8.5
Operating System: Linux 3.13.9-200.fc20.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
- What I was doing when the application crashed:
Trying to generate thumbnails
Installed digikam 3.5 using yum in Fedora 20. Configured to use mysql. Afer several program starts, it finally finished the scanning a folder-tree with more than 500k images. I tried to start thumbnail generation and it crashed almost immediately.

-- Backtrace:
Application: digiKam (digikam), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
81	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[Current thread is 1 (Thread 0x7f807d9f1ac0 (LWP 4683))]

Thread 5 (Thread 0x7f8052fa9700 (LWP 4685)):
#0  0x00007f807175e9dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f80686afd7c in poll (__timeout=-1, __nfds=2, __fds=0x7f8052fa8b60) at /usr/include/bits/poll2.h:46
#2  linux_udev_event_thread_main (arg=<optimized out>) at os/linux_udev.c:175
#3  0x00007f80724c4f33 in start_thread (arg=0x7f8052fa9700) at pthread_create.c:309
#4  0x00007f8071768ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 4 (Thread 0x7f804b4f9700 (LWP 4686)):
#0  0x00007f80724cb87d in read () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f8049633a40 in read (__nbytes=16384, __buf=0x7f8044003dd0, __fd=<optimized out>) at /usr/include/bits/unistd.h:44
#2  vio_read (vio=vio@entry=0x7f80440a7110, buf=0x7f8044003dd0 "\210\a", size=size@entry=16384) at /usr/src/debug/mariadb-5.5.36/vio/viosocket.c:72
#3  0x00007f8049633ac1 in vio_read_buff (vio=0x7f80440a7110, buf=0x7f80440fa5b0 "\030\a", size=4) at /usr/src/debug/mariadb-5.5.36/vio/viosocket.c:112
#4  0x00007f804961806a in my_real_read (net=0x7f8044027710, complen=complen@entry=0x7f804b4f6c00) at /usr/src/debug/mariadb-5.5.36/sql/net_serv.cc:840
#5  0x00007f8049618edc in my_net_read (net=net@entry=0x7f8044027710) at /usr/src/debug/mariadb-5.5.36/sql/net_serv.cc:1026
#6  0x00007f804960bb2c in cli_safe_read (mysql=<optimized out>) at /usr/src/debug/mariadb-5.5.36/sql-common/client.c:740
#7  0x00007f804960e3e8 in mysql_real_connect (mysql=<optimized out>, host=<optimized out>, user=<optimized out>, passwd=<optimized out>, db=<optimized out>, port=<optimized out>, unix_socket=<optimized out>, client_flag=65536) at /usr/src/debug/mariadb-5.5.36/sql-common/client.c:3336
#8  0x00007f8049aee99f in QMYSQLDriver::open (this=0x7f8044002920, db=..., user=..., password=..., host=..., port=3306, connOpts=...) at ../../../sql/drivers/mysql/qsql_mysql.cpp:1289
#9  0x00007f807d61c091 in QSqlDatabase::open (this=this@entry=0x7f804b4f7510) at kernel/qsqldatabase.cpp:839
#10 0x00007f807a453167 in Digikam::DatabaseCoreBackendPrivate::open (this=this@entry=0x24537c0, db=...) at /usr/src/debug/digikam-3.5.0/core/libs/database/core/databasecorebackend.cpp:213
#11 0x00007f807a45374b in Digikam::DatabaseCoreBackendPrivate::databaseForThread (this=0x24537c0) at /usr/src/debug/digikam-3.5.0/core/libs/database/core/databasecorebackend.cpp:119
#12 0x00007f807a453a4a in Digikam::DatabaseCoreBackend::getQuery (this=this@entry=0x245a510) at /usr/src/debug/digikam-3.5.0/core/libs/database/core/databasecorebackend.cpp:1511
#13 0x00007f807a453ad7 in Digikam::DatabaseCoreBackend::copyQuery (this=this@entry=0x245a510, old=...) at /usr/src/debug/digikam-3.5.0/core/libs/database/core/databasecorebackend.cpp:1490
#14 0x00007f807a4550d7 in Digikam::DatabaseCoreBackend::queryErrorHandling (this=this@entry=0x245a510, query=..., retries=retries@entry=0) at /usr/src/debug/digikam-3.5.0/core/libs/database/core/databasecorebackend.cpp:1329
#15 0x00007f807a45628c in Digikam::DatabaseCoreBackend::prepareQuery (this=this@entry=0x245a510, sql=...) at /usr/src/debug/digikam-3.5.0/core/libs/database/core/databasecorebackend.cpp:1476
#16 0x00007f807a4565cb in Digikam::DatabaseCoreBackend::execQuery (this=this@entry=0x245a510, sql=..., boundValue1=..., boundValue2=...) at /usr/src/debug/digikam-3.5.0/core/libs/database/core/databasecorebackend.cpp:1012
#17 0x00007f807a45663a in Digikam::DatabaseCoreBackend::execSql (this=0x245a510, sql=..., boundValue1=..., boundValue2=..., values=values@entry=0x7f804b4f7770, lastInsertId=lastInsertId@entry=0x0) at /usr/src/debug/digikam-3.5.0/core/libs/database/core/databasecorebackend.cpp:910
#18 0x00007f8079de54be in Digikam::AlbumDB::getAlbumForPath (this=0x23deac0, albumRootId=albumRootId@entry=2, folder=..., create=create@entry=false) at /usr/src/debug/digikam-3.5.0/core/libs/database/albumdb.cpp:3577
#19 0x00007f8079df85d0 in Digikam::CollectionScanner::checkAlbum (this=this@entry=0x7f804b4f8ad0, location=..., album=...) at /usr/src/debug/digikam-3.5.0/core/libs/database/collectionscanner.cpp:974
#20 0x00007f8079dfd991 in Digikam::CollectionScanner::scanAlbum (this=this@entry=0x7f804b4f8ad0, location=..., album=...) at /usr/src/debug/digikam-3.5.0/core/libs/database/collectionscanner.cpp:1026
#21 0x00007f8079dfe094 in Digikam::CollectionScanner::scanAlbum (this=this@entry=0x7f804b4f8ad0, location=..., album=...) at /usr/src/debug/digikam-3.5.0/core/libs/database/collectionscanner.cpp:1112
#22 0x00007f8079dfe094 in Digikam::CollectionScanner::scanAlbum (this=this@entry=0x7f804b4f8ad0, location=..., album=...) at /usr/src/debug/digikam-3.5.0/core/libs/database/collectionscanner.cpp:1112
#23 0x00007f8079dfe094 in Digikam::CollectionScanner::scanAlbum (this=this@entry=0x7f804b4f8ad0, location=..., album=...) at /usr/src/debug/digikam-3.5.0/core/libs/database/collectionscanner.cpp:1112
#24 0x00007f8079dfe094 in Digikam::CollectionScanner::scanAlbum (this=this@entry=0x7f804b4f8ad0, location=..., album=...) at /usr/src/debug/digikam-3.5.0/core/libs/database/collectionscanner.cpp:1112
#25 0x00007f8079dfe094 in Digikam::CollectionScanner::scanAlbum (this=this@entry=0x7f804b4f8ad0, location=..., album=...) at /usr/src/debug/digikam-3.5.0/core/libs/database/collectionscanner.cpp:1112
#26 0x00007f8079dfe094 in Digikam::CollectionScanner::scanAlbum (this=this@entry=0x7f804b4f8ad0, location=..., album=...) at /usr/src/debug/digikam-3.5.0/core/libs/database/collectionscanner.cpp:1112
#27 0x00007f8079dfe094 in Digikam::CollectionScanner::scanAlbum (this=this@entry=0x7f804b4f8ad0, location=..., album=...) at /usr/src/debug/digikam-3.5.0/core/libs/database/collectionscanner.cpp:1112
#28 0x00007f8079dfea43 in Digikam::CollectionScanner::scanAlbumRoot (this=this@entry=0x7f804b4f8ad0, location=...) at /usr/src/debug/digikam-3.5.0/core/libs/database/collectionscanner.cpp:828
#29 0x00007f8079dff69d in Digikam::CollectionScanner::completeScan (this=this@entry=0x7f804b4f8ad0) at /usr/src/debug/digikam-3.5.0/core/libs/database/collectionscanner.cpp:489
#30 0x00000000005e2216 in Digikam::ScanController::run (this=0x243b390) at /usr/src/debug/digikam-3.5.0/core/digikam/database/scancontroller.cpp:756
#31 0x00007f80727563af in QThreadPrivate::start (arg=0x243b390) at thread/qthread_unix.cpp:338
#32 0x00007f80724c4f33 in start_thread (arg=0x7f804b4f9700) at pthread_create.c:309
#33 0x00007f8071768ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 3 (Thread 0x7f804acf8700 (LWP 4687)):
#0  0x00007f807175e9dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f806d5925b4 in g_main_context_poll (priority=2147483647, n_fds=2, fds=0x7f803c0028c0, timeout=-1, context=0x7f803c0009a0) at gmain.c:4007
#2  g_main_context_iterate (context=context@entry=0x7f803c0009a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3708
#3  0x00007f806d5926dc in g_main_context_iteration (context=0x7f803c0009a0, may_block=1) at gmain.c:3774
#4  0x00007f807288cec6 in QEventDispatcherGlib::processEvents (this=0x7f803c0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:427
#5  0x00007f807285cedf in QEventLoop::processEvents (this=this@entry=0x7f804acf7ac0, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007f807285d22d in QEventLoop::exec (this=this@entry=0x7f804acf7ac0, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007f8072753baf in QThread::exec (this=this@entry=0x243dbb0) at thread/qthread.cpp:536
#8  0x00007f807283d863 in QInotifyFileSystemWatcherEngine::run (this=0x243dbb0) at io/qfilesystemwatcher_inotify.cpp:265
#9  0x00007f80727563af in QThreadPrivate::start (arg=0x243dbb0) at thread/qthread_unix.cpp:338
#10 0x00007f80724c4f33 in start_thread (arg=0x7f804acf8700) at pthread_create.c:309
#11 0x00007f8071768ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7f804a4f7700 (LWP 4819)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f80727568d6 in wait (time=18446744073709551615, this=0x245eef0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x245e610, mutex=mutex@entry=0x245e608, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f807a49e74a in Digikam::ParkingThread::run (this=0x245e5f0) at /usr/src/debug/digikam-3.5.0/core/libs/threads/threadmanager.cpp:119
#4  0x00007f80727563af in QThreadPrivate::start (arg=0x245e5f0) at thread/qthread_unix.cpp:338
#5  0x00007f80724c4f33 in start_thread (arg=0x7f804a4f7700) at pthread_create.c:309
#6  0x00007f8071768ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7f807d9f1ac0 (LWP 4683)):
[KCrash Handler]
#6  Digikam::Album::id (this=0x0) at /usr/src/debug/digikam-3.5.0/core/digikam/album/album.cpp:253
#7  0x0000000000589c0b in Digikam::DigikamApp::slotRebuildAlbumThumbnails (this=<optimized out>) at /usr/src/debug/digikam-3.5.0/core/digikam/main/digikamapp.cpp:2512
#8  0x00000000005a3245 in Digikam::DigikamApp::qt_static_metacall (_o=0x22a2610, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /usr/src/debug/digikam-3.5.0/x86_64-redhat-linux-gnu/core/digikam/digikamapp.moc:208
#9  0x00007f8072872cf8 in QMetaObject::activate (sender=sender@entry=0x30aa3f0, m=m@entry=0x7f8073fa0c40 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fff59b40f60) at kernel/qobject.cpp:3547
#10 0x00007f80734c6782 in QAction::triggered (this=this@entry=0x30aa3f0, _t1=false) at .moc/release-shared/moc_qaction.cpp:276
#11 0x00007f80734c8337 in QAction::activate (this=this@entry=0x30aa3f0, event=event@entry=QAction::Trigger) at kernel/qaction.cpp:1257
#12 0x00007f80739112bd in QMenuPrivate::activateCausedStack (this=this@entry=0x3975bf0, causedStack=..., action=action@entry=0x30aa3f0, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1038
#13 0x00007f8073915b49 in QMenuPrivate::activateAction (this=0x3975bf0, action=0x30aa3f0, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1130
#14 0x00007f80739196a5 in QMenu::mouseReleaseEvent (this=this@entry=0x2fec760, e=e@entry=0x7fff59b41710) at widgets/qmenu.cpp:2372
#15 0x00007f80742ebbbb in KMenu::mouseReleaseEvent (this=0x2fec760, e=0x7fff59b41710) at /usr/src/debug/kdelibs-4.12.3/kdeui/widgets/kmenu.cpp:464
#16 0x00007f807351fc58 in QWidget::event (this=this@entry=0x2fec760, event=event@entry=0x7fff59b41710) at kernel/qwidget.cpp:8376
#17 0x00007f8073919b0b in QMenu::event (this=0x2fec760, e=0x7fff59b41710) at widgets/qmenu.cpp:2481
#18 0x00007f80734ccd8c in QApplicationPrivate::notify_helper (this=0x217f670, receiver=0x2fec760, e=0x7fff59b41710) at kernel/qapplication.cpp:4562
#19 0x00007f80734d3879 in QApplication::notify (this=this@entry=0x7fff59b42a80, receiver=receiver@entry=0x2fec760, e=e@entry=0x7fff59b41710) at kernel/qapplication.cpp:4105
#20 0x00007f807422ab0a in KApplication::notify (this=0x7fff59b42a80, receiver=0x2fec760, event=0x7fff59b41710) at /usr/src/debug/kdelibs-4.12.3/kdeui/kernel/kapplication.cpp:311
#21 0x00007f807285e39d in QCoreApplication::notifyInternal (this=0x7fff59b42a80, receiver=0x2fec760, event=0x7fff59b41710) at kernel/qcoreapplication.cpp:949
#22 0x00007f80734d2fa7 in QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x2fec760, event=event@entry=0x7fff59b41710, alienWidget=alienWidget@entry=0x0, nativeWidget=nativeWidget@entry=0x2fec760, buttonDown=buttonDown@entry=0x7f8073fdc258 <qt_button_down>, lastMouseReceiver=..., spontaneous=spontaneous@entry=true) at ../../src/corelib/kernel/qcoreapplication.h:231
#23 0x00007f80735489dc in QETWidget::translateMouseEvent (this=this@entry=0x2fec760, event=event@entry=0x7fff59b41a50) at kernel/qapplication_x11.cpp:4472
#24 0x00007f807354711c in QApplication::x11ProcessEvent (this=0x7fff59b42a80, event=event@entry=0x7fff59b41a50) at kernel/qapplication_x11.cpp:3661
#25 0x00007f807356eb24 in x11EventSourceDispatch (s=s@entry=0x2181510, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:148
#26 0x00007f806d5922a6 in g_main_dispatch (context=0x217e8a0) at gmain.c:3066
#27 g_main_context_dispatch (context=context@entry=0x217e8a0) at gmain.c:3642
#28 0x00007f806d592628 in g_main_context_iterate (context=context@entry=0x217e8a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3713
#29 0x00007f806d5926dc in g_main_context_iteration (context=0x217e8a0, may_block=1) at gmain.c:3774
#30 0x00007f807288cea5 in QEventDispatcherGlib::processEvents (this=0x20ea9b0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#31 0x00007f807356eca6 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207
#32 0x00007f807285cedf in QEventLoop::processEvents (this=this@entry=0x243b8c0, flags=...) at kernel/qeventloop.cpp:149
#33 0x00007f807285d22d in QEventLoop::exec (this=0x243b8c0, flags=...) at kernel/qeventloop.cpp:204
#34 0x00000000005ddb05 in Digikam::ScanController::completeCollectionScanCore (this=0x243b390, needTotalFiles=needTotalFiles@entry=true, defer=defer@entry=false) at /usr/src/debug/digikam-3.5.0/core/digikam/database/scancontroller.cpp:486
#35 0x00000000005ddc2e in Digikam::ScanController::completeCollectionScanInBackground (this=<optimized out>, defer=defer@entry=false) at /usr/src/debug/digikam-3.5.0/core/digikam/database/scancontroller.cpp:471
#36 0x000000000051e10a in Digikam::NewItemsFinder::slotStart (this=0x26de260) at /usr/src/debug/digikam-3.5.0/core/utilities/maintenance/newitemsfinder.cpp:106
#37 0x00007f807287727e in QObject::event (this=0x26de260, e=<optimized out>) at kernel/qobject.cpp:1194
#38 0x00007f80734ccd8c in QApplicationPrivate::notify_helper (this=0x217f670, receiver=0x26de260, e=0xa298ed0) at kernel/qapplication.cpp:4562
#39 0x00007f80734d3725 in QApplication::notify (this=this@entry=0x7fff59b42a80, receiver=receiver@entry=0x26de260, e=e@entry=0xa298ed0) at kernel/qapplication.cpp:4348
#40 0x00007f807422ab0a in KApplication::notify (this=0x7fff59b42a80, receiver=0x26de260, event=0xa298ed0) at /usr/src/debug/kdelibs-4.12.3/kdeui/kernel/kapplication.cpp:311
#41 0x00007f807285e39d in QCoreApplication::notifyInternal (this=0x7fff59b42a80, receiver=receiver@entry=0x26de260, event=event@entry=0xa298ed0) at kernel/qcoreapplication.cpp:949
#42 0x00007f8072861485 in sendEvent (event=0xa298ed0, receiver=0x26de260) at kernel/qcoreapplication.h:231
#43 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x20e9470) at kernel/qcoreapplication.cpp:1573
#44 0x00007f8072861923 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1466
#45 0x00007f807288d623 in sendPostedEvents () at kernel/qcoreapplication.h:236
#46 postEventSourceDispatch (s=s@entry=0x217d2f0) at kernel/qeventdispatcher_glib.cpp:280
#47 0x00007f806d5922a6 in g_main_dispatch (context=0x217e8a0) at gmain.c:3066
#48 g_main_context_dispatch (context=context@entry=0x217e8a0) at gmain.c:3642
#49 0x00007f806d592628 in g_main_context_iterate (context=context@entry=0x217e8a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3713
#50 0x00007f806d5926dc in g_main_context_iteration (context=0x217e8a0, may_block=1) at gmain.c:3774
#51 0x00007f807288cea5 in QEventDispatcherGlib::processEvents (this=0x20ea9b0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#52 0x00007f807356eca6 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207
#53 0x00007f807285cedf in QEventLoop::processEvents (this=this@entry=0x7fff59b42550, flags=...) at kernel/qeventloop.cpp:149
#54 0x00007f807285d22d in QEventLoop::exec (this=this@entry=0x7fff59b42550, flags=...) at kernel/qeventloop.cpp:204
#55 0x00007f8072862749 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1221
#56 0x00007f80734cb3fc in QApplication::exec () at kernel/qapplication.cpp:3823
#57 0x000000000049232d in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/digikam-3.5.0/core/digikam/main/main.cpp:235

The reporter indicates this bug may be a duplicate of or related to bug 307940.

Possible duplicates by query: bug 307940.

Reported using DrKonqi
Comment 1 caulier.gilles 2014-04-16 19:37:48 UTC
*** Bug 307940 has been marked as a duplicate of this bug. ***
Comment 2 caulier.gilles 2014-05-16 07:30:14 UTC
digiKam 4.0.0 is out :

http://www.digikam.org/node/713

Please check if this entry still valid with this new version.

Thanks in advance

Gilles Caulier
Comment 3 caulier.gilles 2014-08-21 21:46:24 UTC
FRom the crash trace :

#7  0x0000000000589c0b in Digikam::DigikamApp::slotRebuildAlbumThumbnails (this=<optimized out>) at /usr/src/debug/digikam-3.5.0/core/digikam/main/digikamapp.cpp:2512

Code do not exist anymore with current implementation from git/master (4.3.0)

Please to reproduce the problem with last stable 4.2.0 with a suitable backtrace.

Gilles Caulier
Comment 4 caulier.gilles 2015-06-25 13:10:58 UTC
New digiKam 4.11.0 is available with official PKG installer for OSX.

https://www.digikam.org/node/740

Can you reproduce the problem with this release ?
Comment 5 caulier.gilles 2015-08-20 06:48:34 UTC
digiKam 4.12.0 is out :

https://www.digikam.org/node/741

We need a fresh feedback using this release please...
Thanks in advance.

Gilles Caulier
Comment 6 caulier.gilles 2016-07-09 14:06:54 UTC
This problem is not reproducible with last 5.0.0.
I close this file now. Don't hesitate to re-open it if necessary.
Gilles Caulier