Bug 335667

Summary: digiKam crash on tag delete
Product: [Applications] digikam Reporter: Egbert Gerber <e.gerber>
Component: Database-SqliteAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles
Priority: NOR Keywords: drkonqi
Version: 4.0.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 7.3.0
Sentry Crash Report:

Description Egbert Gerber 2014-06-01 22:12:01 UTC
Application: digikam (4.0.0)
KDE Platform Version: 4.13.1
Qt Version: 4.8.6
Operating System: Linux 3.13.0-29-generic x86_64
Distribution: Ubuntu 14.04 LTS

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

In the "People" view, I deleted a tag from my "People" category (top-level). The tag had previously been assigned to one or more images. After I removed the relevant collection, the tag was no longer associated with any image (hence the idea to remove it).
Doing the same with other (unused) tags only sometimes lead to a crash.
I did not try removing a still-used tag...

The crash can be reproduced sometimes.

-- Backtrace:
Application: digiKam (digikam), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f6f57141ac0 (LWP 8180))]

Thread 8 (Thread 0x7f6f312a9700 (LWP 8183)):
#0  0x00007f6f502acfbd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f6f35e54248 in ?? () from /lib/x86_64-linux-gnu/libusb-1.0.so.0
#2  0x00007f6f4c2d5182 in start_thread (arg=0x7f6f312a9700) at pthread_create.c:312
#3  0x00007f6f502ba30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 7 (Thread 0x7f6f25cd3700 (LWP 8184)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f6f5109b816 in wait (time=18446744073709551615, this=0x12cf360) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x11919b0, mutex=mutex@entry=0x11919a8, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00000000005e3d9e in Digikam::ScanController::run (this=0x12cea30) at /build/buildd/digikam-4.0.0/core/digikam/database/scancontroller.cpp:725
#4  0x00007f6f5109b32f in QThreadPrivate::start (arg=0x12cea30) at thread/qthread_unix.cpp:349
#5  0x00007f6f4c2d5182 in start_thread (arg=0x7f6f25cd3700) at pthread_create.c:312
#6  0x00007f6f502ba30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 6 (Thread 0x7f6f254d2700 (LWP 8185)):
#0  0x00007fffad9fe988 in ?? ()
#1  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f6f24cd1700 (LWP 8194)):
#0  0x00007f6f502acfbd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f6f49387fe4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f6f4938830a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f6f37866e16 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007f6f493acf15 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f6f4c2d5182 in start_thread (arg=0x7f6f24cd1700) at pthread_create.c:312
#6  0x00007f6f502ba30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 4 (Thread 0x7f6f13f03700 (LWP 8195)):
#0  0x00007f6f502acfbd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f6f49387fe4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f6f493880ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f6f49388129 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f6f493acf15 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f6f4c2d5182 in start_thread (arg=0x7f6f13f03700) at pthread_create.c:312
#6  0x00007f6f502ba30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 3 (Thread 0x7f6f12700700 (LWP 8201)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f6f5109b816 in wait (time=18446744073709551615, this=0x18b5970) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x1845050, mutex=mutex@entry=0x1845048, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f6f547d88aa in Digikam::ParkingThread::run (this=0x1845030) at /build/buildd/digikam-4.0.0/core/libs/threads/threadmanager.cpp:119
#4  0x00007f6f5109b32f in QThreadPrivate::start (arg=0x1845030) at thread/qthread_unix.cpp:349
#5  0x00007f6f4c2d5182 in start_thread (arg=0x7f6f12700700) at pthread_create.c:312
#6  0x00007f6f502ba30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7f6f117ec700 (LWP 8202)):
#0  0x00007f6f502ab6bd in read () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f6f426b6f45 in ?? () from /usr/lib/nvidia-337/tls/libnvidia-tls.so.337.25
#2  0x00007f6f493c8c20 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f6f49387b14 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f6f49387f7b in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f6f493880ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f6f511ca7be in QEventDispatcherGlib::processEvents (this=0x7f6f000008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#7  0x00007f6f5119c0af in QEventLoop::processEvents (this=this@entry=0x7f6f117ebae0, flags=...) at kernel/qeventloop.cpp:149
#8  0x00007f6f5119c3a5 in QEventLoop::exec (this=this@entry=0x7f6f117ebae0, flags=...) at kernel/qeventloop.cpp:204
#9  0x00007f6f51098c5f in QThread::exec (this=this@entry=0x6070570) at thread/qthread.cpp:537
#10 0x00007f6f5117d823 in QInotifyFileSystemWatcherEngine::run (this=0x6070570) at io/qfilesystemwatcher_inotify.cpp:265
#11 0x00007f6f5109b32f in QThreadPrivate::start (arg=0x6070570) at thread/qthread_unix.cpp:349
#12 0x00007f6f4c2d5182 in start_thread (arg=0x7f6f117ec700) at pthread_create.c:312
#13 0x00007f6f502ba30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7f6f57141ac0 (LWP 8180)):
[KCrash Handler]
#6  0x0000001b00000000 in ?? ()
#7  0x00007f6f3a358e85 in sqlite3MemCompare (pMem1=pMem1@entry=0x7fffad9d5e80, pMem2=0x7708a08, pColl=0xbb1b258) at sqlite3.c:60470
#8  0x00007f6f3a358f63 in sqlite3VdbeRecordCompare (nKey1=17, pKey1=0x18e7647, pPKey2=pPKey2@entry=0x7fffad9d6188) at sqlite3.c:64162
#9  0x00007f6f3a36d579 in sqlite3BtreeMovetoUnpacked (pCur=0xbda1748, pIdxKey=0x7fffad9d6188, intKey=0, biasRight=<optimized out>, pRes=0x7fffad9d6180) at sqlite3.c:55077
#10 0x00007f6f3a39886c in sqlite3VdbeExec (p=p@entry=0xc594c68) at sqlite3.c:71235
#11 0x00007f6f3a39ded7 in sqlite3Step (p=0xc594c68) at sqlite3.c:64828
#12 sqlite3_step (pStmt=<optimized out>) at sqlite3.c:64894
#13 0x00007f6f242cc11c in QSQLiteResultPrivate::fetchNext (this=this@entry=0xa291ba0, values=..., idx=idx@entry=0, initialFetch=initialFetch@entry=true) at ../../../sql/drivers/sqlite/qsql_sqlite.cpp:235
#14 0x00007f6f242cce48 in QSQLiteResult::exec (this=0xb197f00) at ../../../sql/drivers/sqlite/qsql_sqlite.cpp:447
#15 0x00007f6f56d8ab7d in QSqlQuery::exec (this=this@entry=0x7fffad9d6918) at kernel/qsqlquery.cpp:949
#16 0x00007f6f54791a46 in Digikam::DatabaseCoreBackend::exec (this=0x11be080, query=...) at /build/buildd/digikam-4.0.0/core/libs/database/core/databasecorebackend.cpp:1415
#17 0x00007f6f54793f5f in Digikam::DatabaseCoreBackend::execQuery (this=this@entry=0x11be080, sql=..., bindingMap=...) at /build/buildd/digikam-4.0.0/core/libs/database/core/databasecorebackend.cpp:1247
#18 0x00007f6f54795479 in Digikam::DatabaseCoreBackend::execSql (this=this@entry=0x11be080, sql=..., bindingMap=..., values=values@entry=0x0, lastInsertId=lastInsertId@entry=0x0) at /build/buildd/digikam-4.0.0/core/libs/database/core/databasecorebackend.cpp:945
#19 0x00007f6f5479561d in Digikam::DatabaseCoreBackend::execDBAction (this=0x11be080, action=..., bindingMap=..., values=values@entry=0x0, lastInsertId=lastInsertId@entry=0x0) at /build/buildd/digikam-4.0.0/core/libs/database/core/databasecorebackend.cpp:654
#20 0x00007f6f54151adf in Digikam::AlbumDB::deleteTag (this=0x12d3630, tagID=tagID@entry=516) at /build/buildd/digikam-4.0.0/core/libs/database/albumdb.cpp:704
#21 0x00000000005b3b60 in Digikam::AlbumManager::deleteTAlbum (this=0x1428a10, album=album@entry=0x77759e0, errMsg=...) at /build/buildd/digikam-4.0.0/core/digikam/album/albummanager.cpp:2370
#22 0x0000000000645891 in Digikam::TagModificationHelper::slotTagDelete (this=0x6907cf0, t=<optimized out>) at /build/buildd/digikam-4.0.0/core/digikam/tags/tagmodificationhelper.cpp:281
#23 0x0000000000647ba5 in Digikam::TagModificationHelper::qt_static_metacall (_o=0x6907cf0, _c=11, _id=26113611, _a=0x7fffad9d7070) at /build/buildd/digikam-4.0.0/obj-x86_64-linux-gnu/core/digikam/tagmodificationhelper.moc:94
#24 0x00007f6f511b187a in QMetaObject::activate (sender=sender@entry=0x76ddee0, m=m@entry=0x7f6f52639de0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffad9d7070) at kernel/qobject.cpp:3539
#25 0x00007f6f51b89a62 in QAction::triggered (this=this@entry=0x76ddee0, _t1=false) at .moc/release-shared/moc_qaction.cpp:276
#26 0x00007f6f51b8b433 in QAction::activate (this=this@entry=0x76ddee0, event=event@entry=QAction::Trigger) at kernel/qaction.cpp:1257
#27 0x00007f6f51fb9489 in QMenuPrivate::activateCausedStack (this=this@entry=0x5ffdf00, causedStack=..., action=action@entry=0x76ddee0, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1038
#28 0x00007f6f51fbd9b9 in QMenuPrivate::activateAction (this=0x5ffdf00, action=0x76ddee0, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1130
#29 0x00007f6f51fc1385 in QMenu::mouseReleaseEvent (this=this@entry=0x7fffad9d8030, e=e@entry=0x7fffad9d77a0) at widgets/qmenu.cpp:2372
#30 0x00007f6f52951665 in KMenu::mouseReleaseEvent (this=0x7fffad9d8030, e=0x7fffad9d77a0) at ../../kdeui/widgets/kmenu.cpp:464
#31 0x00007f6f51bdf50a in QWidget::event (this=this@entry=0x7fffad9d8030, event=event@entry=0x7fffad9d77a0) at kernel/qwidget.cpp:8376
#32 0x00007f6f51fc17bb in QMenu::event (this=0x7fffad9d8030, e=0x7fffad9d77a0) at widgets/qmenu.cpp:2481
#33 0x00007f6f51b8fe2c in QApplicationPrivate::notify_helper (this=this@entry=0x10c1d60, receiver=receiver@entry=0x7fffad9d8030, e=e@entry=0x7fffad9d77a0) at kernel/qapplication.cpp:4567
#34 0x00007f6f51b965dd in QApplication::notify (this=this@entry=0x7fffad9d9350, receiver=receiver@entry=0x7fffad9d8030, e=e@entry=0x7fffad9d77a0) at kernel/qapplication.cpp:4110
#35 0x00007f6f5289ad1a in KApplication::notify (this=0x7fffad9d9350, receiver=0x7fffad9d8030, event=0x7fffad9d77a0) at ../../kdeui/kernel/kapplication.cpp:311
#36 0x00007f6f5119d4dd in QCoreApplication::notifyInternal (this=0x7fffad9d9350, receiver=receiver@entry=0x7fffad9d8030, event=event@entry=0x7fffad9d77a0) at kernel/qcoreapplication.cpp:953
#37 0x00007f6f51b95d93 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#38 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x7fffad9d8030, event=event@entry=0x7fffad9d77a0, alienWidget=alienWidget@entry=0x0, nativeWidget=nativeWidget@entry=0x7fffad9d8030, buttonDown=buttonDown@entry=0x7f6f52675318 <qt_button_down>, lastMouseReceiver=..., spontaneous=spontaneous@entry=true) at kernel/qapplication.cpp:3178
#39 0x00007f6f51c0acfc in QETWidget::translateMouseEvent (this=this@entry=0x7fffad9d8030, event=event@entry=0x7fffad9d7af0) at kernel/qapplication_x11.cpp:4568
#40 0x00007f6f51c0a269 in QApplication::x11ProcessEvent (this=0x7fffad9d9350, event=event@entry=0x7fffad9d7af0) at kernel/qapplication_x11.cpp:3627
#41 0x00007f6f51c31b02 in x11EventSourceDispatch (s=0x10d5870, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#42 0x00007f6f49387e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007f6f49388048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#44 0x00007f6f493880ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007f6f511ca7be in QEventDispatcherGlib::processEvents (this=0x10c5020, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#46 0x00007f6f51c31bb6 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#47 0x00007f6f5119c0af in QEventLoop::processEvents (this=this@entry=0x7fffad9d7ed0, flags=...) at kernel/qeventloop.cpp:149
#48 0x00007f6f5119c3a5 in QEventLoop::exec (this=this@entry=0x7fffad9d7ed0, flags=...) at kernel/qeventloop.cpp:204
#49 0x00007f6f51fc0587 in QMenu::exec (this=0x7fffad9d8030, p=..., action=action@entry=0x0) at widgets/qmenu.cpp:2125
#50 0x0000000000664c98 in Digikam::ContextMenuHelper::exec (this=this@entry=0x7fffad9d8010, pos=..., at=at@entry=0x0) at /build/buildd/digikam-4.0.0/core/digikam/utils/contextmenuhelper.cpp:1135
#51 0x0000000000638c7d in Digikam::TagFolderView::contextMenuEvent (this=0x68fff60, event=<optimized out>) at /build/buildd/digikam-4.0.0/core/digikam/tags/tagfolderview.cpp:333
#52 0x00007f6f51bdf7d2 in QWidget::event (this=this@entry=0x68fff60, event=event@entry=0x7fffad9d8710) at kernel/qwidget.cpp:8554
#53 0x00007f6f51f80fce in QFrame::event (this=0x68fff60, e=0x7fffad9d8710) at widgets/qframe.cpp:557
#54 0x00007f6f520905b3 in QAbstractItemView::viewportEvent (this=this@entry=0x68fff60, event=event@entry=0x7fffad9d8710) at itemviews/qabstractitemview.cpp:1644
#55 0x00007f6f520cf190 in QTreeView::viewportEvent (this=0x68fff60, event=0x7fffad9d8710) at itemviews/qtreeview.cpp:1252
#56 0x00007f6f5119d646 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=this@entry=0x10c1d60, receiver=receiver@entry=0x69006f0, event=event@entry=0x7fffad9d8710) at kernel/qcoreapplication.cpp:1063
#57 0x00007f6f51b8fe0c in QApplicationPrivate::notify_helper (this=this@entry=0x10c1d60, receiver=receiver@entry=0x69006f0, e=e@entry=0x7fffad9d8710) at kernel/qapplication.cpp:4563
#58 0x00007f6f51b971f8 in QApplication::notify (this=this@entry=0x7fffad9d9350, receiver=receiver@entry=0x69006f0, e=e@entry=0x7fffad9d8710) at kernel/qapplication.cpp:4189
#59 0x00007f6f5289ad1a in KApplication::notify (this=0x7fffad9d9350, receiver=0x69006f0, event=0x7fffad9d8710) at ../../kdeui/kernel/kapplication.cpp:311
#60 0x00007f6f5119d4dd in QCoreApplication::notifyInternal (this=0x7fffad9d9350, receiver=receiver@entry=0x69006f0, event=event@entry=0x7fffad9d8710) at kernel/qcoreapplication.cpp:953
#61 0x00007f6f51c0aa20 in sendSpontaneousEvent (event=0x7fffad9d8710, receiver=0x69006f0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#62 QETWidget::translateMouseEvent (this=this@entry=0x5f68ae0, event=event@entry=0x7fffad9d8a60) at kernel/qapplication_x11.cpp:4639
#63 0x00007f6f51c0a269 in QApplication::x11ProcessEvent (this=0x7fffad9d9350, event=event@entry=0x7fffad9d8a60) at kernel/qapplication_x11.cpp:3627
#64 0x00007f6f51c31b02 in x11EventSourceDispatch (s=0x10d5870, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#65 0x00007f6f49387e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#66 0x00007f6f49388048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#67 0x00007f6f493880ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#68 0x00007f6f511ca7a1 in QEventDispatcherGlib::processEvents (this=0x10c5020, flags=...) at kernel/qeventdispatcher_glib.cpp:434
#69 0x00007f6f51c31bb6 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#70 0x00007f6f5119c0af in QEventLoop::processEvents (this=this@entry=0x7fffad9d8e30, flags=...) at kernel/qeventloop.cpp:149
#71 0x00007f6f5119c3a5 in QEventLoop::exec (this=this@entry=0x7fffad9d8e30, flags=...) at kernel/qeventloop.cpp:204
#72 0x00007f6f511a1b79 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225
#73 0x00007f6f51b8e37c in QApplication::exec () at kernel/qapplication.cpp:3828
#74 0x00000000004948f0 in main (argc=<optimized out>, argv=<optimized out>) at /build/buildd/digikam-4.0.0/core/digikam/main/main.cpp:236

Possible duplicates by query: bug 335630, bug 335622, bug 335574, bug 335529, bug 335297.

Reported using DrKonqi
Comment 1 Jekyll Wu 2014-06-02 00:37:07 UTC

*** This bug has been marked as a duplicate of bug 329697 ***
Comment 2 caulier.gilles 2021-04-04 08:26:54 UTC
Fixed with #329697