Bug 226509

Summary: [testcase] Dolphin crashes when trying to add tags to a second file [Nepomuk::ResourceData::type, Nepomuk::ResourceManagerPrivate::allResourceDataOfType, epomuk::ResourceManager::allResourcesOfType, Nepomuk::Tag::allTags]
Product: [Applications] dolphin Reporter: mark
Component: generalAssignee: Peter Penz <peter.penz19>
Status: RESOLVED FIXED    
Severity: crash CC: andresbajotierra, droopy159, iferca, keller1976, null, sebastian, trueg
Priority: NOR    
Version: 16.12.2   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description mark 2010-02-12 12:05:54 UTC
Application: dolphin (1.4)
KDE Platform Version: 4.4.00 (KDE 4.4.0) (Compiled from sources)
Qt Version: 4.6.1
Operating System: Linux 2.6.32.7 x86_64
Distribution: "Gentoo Base System release 2.0.1"

-- Information about the crash:
I have the following scenario:
1) open dolphin
2) open a folder with mostly picture files and other stuff (several formats like png, jpg, svg, html, txt, pdf)
3) move mouse over one picture that has no metainformation, add metainformation on the right side of dolphin (e.g. "wallpaper")
4) move mouse to the next picture without metainformation and try to click the metinformation link on the right side...
=> dolphin crashes (see included backtrace)

I repeated this several times with several picture files and it happens every time.
I did not try this with other files, because I wanted to reproduce it consistently.

The crash can be reproduced every time.

 -- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.2200.4-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
[Current thread is 1 (Thread 0x7fa686bd2760 (LWP 1735))]

Thread 2 (Thread 0x7fa680ae3710 (LWP 2390)):
#0  0x0000003edf80b5a9 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x0000003ee9614cf9 in ?? () from /usr/lib64/libxine.so.1
#2  0x0000003edf806894 in start_thread () from /lib/libpthread.so.0
#3  0x0000003edf0d0f9d in clone () from /lib/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fa686bd2760 (LWP 1735)):
[KCrash Handler]
#5  Nepomuk::ResourceData::type (this=0x30) at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0/nepomuk/core/resourcedata.cpp:128
#6  0x00007fa689a53619 in Nepomuk::ResourceData::type (this=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0/nepomuk/core/resourcedata.cpp:129
#7  0x00007fa689a53619 in Nepomuk::ResourceData::type (this=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0/nepomuk/core/resourcedata.cpp:129
#8  0x00007fa689a5717a in Nepomuk::ResourceManagerPrivate::allResourceDataOfType (this=<value optimized out>, type=...)
    at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0/nepomuk/core/resourcemanager.cpp:140
#9  0x00007fa689a5723d in Nepomuk::ResourceManager::allResourcesOfType (this=0x1732c60, type=...) at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0/nepomuk/core/resourcemanager.cpp:340
#10 0x00007fa689a71896 in Nepomuk::Tag::allTags () at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0/nepomuk/core/tag.cpp:130
#11 0x0000000000461811 in KEditTagsDialog::loadTags (this=0x7fffde4196e0) at /var/tmp/portage/kde-base/dolphin-4.4.0/work/dolphin-4.4.0/dolphin/src/panels/information/kedittagsdialog.cpp:229
#12 0x0000000000462876 in KEditTagsDialog (this=0x7fffde4196e0, tags=<value optimized out>, parent=<value optimized out>, flags=<value optimized out>)
    at /var/tmp/portage/kde-base/dolphin-4.4.0/work/dolphin-4.4.0/dolphin/src/panels/information/kedittagsdialog.cpp:87
#13 0x0000000000465ec9 in KTaggingWidget::slotLinkActivated (this=0x1737a10, link=<value optimized out>)
    at /var/tmp/portage/kde-base/dolphin-4.4.0/work/dolphin-4.4.0/dolphin/src/panels/information/ktaggingwidget.cpp:127
#14 0x0000000000466239 in KTaggingWidget::qt_metacall (this=0x1737a10, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffde419960)
    at /var/tmp/portage/kde-base/dolphin-4.4.0/work/dolphin-4.4.0_build/dolphin/src/ktaggingwidget_p.moc:81
#15 0x00007fa6882e7ddf in QMetaObject::activate (sender=0x1737d90, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x47) at kernel/qobject.cpp:3267
#16 0x00007fa687b42b12 in QLabel::linkActivated (this=0x7fffde4191f0, _t1=<value optimized out>) at .moc/release-shared/moc_qlabel.cpp:175
#17 0x00007fa687b443cc in QLabel::qt_metacall (this=0x1737d90, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffde419ae0) at .moc/release-shared/moc_qlabel.cpp:107
#18 0x00007fa6882e7ddf in QMetaObject::activate (sender=0x172e840, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x47) at kernel/qobject.cpp:3267
#19 0x00007fa6879b20f5 in QTextControl::linkActivated (this=0x7fffde4191f0, _t1=<value optimized out>) at .moc/release-shared/moc_qtextcontrol_p.cpp:320
#20 0x00007fa6879b9ae4 in QTextControlPrivate::activateLinkUnderCursor (this=0x1738930, href=) at text/qtextcontrol.cpp:2616
#21 0x00007fa6879ba72f in QTextControlPrivate::mouseReleaseEvent (this=0x1738930, button=<value optimized out>, pos=...) at text/qtextcontrol.cpp:1705
#22 0x00007fa6879bce96 in QTextControl::processEvent (this=0x172e840, e=0x7fffde41abf0, matrix=..., contextWidget=0x1737d90) at text/qtextcontrol.cpp:931
#23 0x00007fa6879b3e3c in QTextControl::processEvent (this=0x172e840, e=<value optimized out>, coordinateOffset=..., contextWidget=<value optimized out>) at text/qtextcontrol.cpp:880
#24 0x00007fa687b44ccd in QLabelPrivate::sendControlEvent (this=0x1737e00, e=0x7fffde41abf0) at widgets/qlabel.cpp:1530
#25 0x00007fa6877f2df9 in QWidget::event (this=0x1737d90, event=0x7fffde41abf0) at kernel/qwidget.cpp:7978
#26 0x00007fa687b40256 in QFrame::event (this=0x1737d90, e=0x7fffde41abf0) at widgets/qframe.cpp:557
#27 0x00007fa68779ebfc in QApplicationPrivate::notify_helper (this=0x12ce290, receiver=0x1737d90, e=0x7fffde41abf0) at kernel/qapplication.cpp:4298
#28 0x00007fa6877a68cc in QApplication::notify (this=<value optimized out>, receiver=<value optimized out>, e=0x7fffde41abf0) at kernel/qapplication.cpp:3863
#29 0x00007fa688c9a416 in KApplication::notify (this=0x7fffde41b770, receiver=0x1737d90, event=0x7fffde41abf0)
    at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0/kdeui/kernel/kapplication.cpp:302
#30 0x00007fa6882d54ab in QCoreApplication::notifyInternal (this=0x7fffde41b770, receiver=0x1737d90, event=0x7fffde41abf0) at kernel/qcoreapplication.cpp:704
#31 0x00007fa6877a5986 in QCoreApplication::sendSpontaneousEvent (receiver=0x1737d90, event=0x7fffde41abf0, alienWidget=0x0, nativeWidget=0x1737d90, buttonDown=<value optimized out>, 
    lastMouseReceiver=<value optimized out>, spontaneous=true) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#32 QApplicationPrivate::sendMouseEvent (receiver=0x1737d90, event=0x7fffde41abf0, alienWidget=0x0, nativeWidget=0x1737d90, buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>, 
    spontaneous=true) at kernel/qapplication.cpp:2961
#33 0x00007fa687815663 in QETWidget::translateMouseEvent (this=0x1737d90, event=<value optimized out>) at kernel/qapplication_x11.cpp:4368
#34 0x00007fa687814839 in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fffde41b390) at kernel/qapplication_x11.cpp:3501
#35 0x00007fa68783a78c in x11EventSourceDispatch (s=0x12d3e90, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146
#36 0x0000003ede2388eb in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#37 0x0000003ede23c1f0 in ?? () from /usr/lib/libglib-2.0.so.0
#38 0x0000003ede23c320 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#39 0x00007fa6882fdfd3 in QEventDispatcherGlib::processEvents (this=0x12a6c40, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
#40 0x00007fa68783a0ae in QGuiEventDispatcherGlib::processEvents (this=0x7fffde4191f0, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#41 0x00007fa6882d3e42 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#42 0x00007fa6882d421d in QEventLoop::exec (this=0x7fffde41b6c0, flags=) at kernel/qeventloop.cpp:201
#43 0x00007fa6882d7e63 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#44 0x000000000043a0b5 in main (argc=<value optimized out>, argv=<value optimized out>) at /var/tmp/portage/kde-base/dolphin-4.4.0/work/dolphin-4.4.0/dolphin/src/main.cpp:101

Reported using DrKonqi
Comment 1 Dario Andres 2010-02-12 13:14:08 UTC
- Which other tags do you have ?
- Are you using Virtuoso 6.1 ?
Regards
Comment 2 mark 2010-02-12 13:23:18 UTC
(In reply to comment #1)
> - Which other tags do you have ?

I have 4 tags: "Demotivator", "Hintergrundbild", "sinfest", "xkcd" :-)
I now touch'ed two empty files 'a' and 'b' in my home and the crash happens with every tag as soon as I try to tag the second file, so I guess it's independent from the content and the tags (names, order) itself.

> - Are you using Virtuoso 6.1 ?

yes, I am using virtuoso 6.1.0
Comment 3 Dario Andres 2010-02-12 13:34:52 UTC
I could reproduce the bug here using:

Qt: 4.6.1 (kde-qt master commit 46ef51d8bf520bda3eea9e996349694ce1ff3959
        Date:   Sat Jan 30 02:23:21 2010 +0100)
KDE Development Platform: 4.4.63 (KDE 4.4.63 (KDE 4.5 >= 20100209))
kdelibs svn rev. 1088295 / kdebase svn rev. 1088295
on ArchLinux i686 - Kernel 2.6.32.3

Using two empty files (created with touch) and some already-existent random tags..

Backtrace:
---

Application: Dolphin (dolphin), signal: Segmentation fault
[KCrash Handler]
#6  0xb74af8c5 in Nepomuk::ResourceData::type (this=0x1840000) at /home/kde-devel/kde/src/KDE/kdelibs/nepomuk/core/resourcedata.cpp:128
#7  0xb74af8e0 in Nepomuk::ResourceData::type (this=0x94591b8) at /home/kde-devel/kde/src/KDE/kdelibs/nepomuk/core/resourcedata.cpp:129
#8  0xb74b5dff in Nepomuk::ResourceManagerPrivate::allResourceDataOfType (this=0x8fc3c98, type=...) at /home/kde-devel/kde/src/KDE/kdelibs/nepomuk/core/resourcemanager.cpp:140
#9  0xb74b71d2 in Nepomuk::ResourceManager::allResourcesOfType (this=0x8fc3c28, type=...) at /home/kde-devel/kde/src/KDE/kdelibs/nepomuk/core/resourcemanager.cpp:340
#10 0xb74d25c6 in Nepomuk::Tag::allTags () at /home/kde-devel/kde/src/KDE/kdelibs/nepomuk/core/tag.cpp:130
#11 0x080ac5ce in KEditTagsDialog::loadTags (this=0xbf946d48) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/panels/information/kedittagsdialog.cpp:229
#12 0x080abae8 in KEditTagsDialog (this=0xbf946d48, tags=..., parent=0x8fc1010, flags=...) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/panels/information/kedittagsdialog.cpp:87
#13 0x080b001a in KTaggingWidget::slotLinkActivated (this=0x8fc1010, link=...) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/panels/information/ktaggingwidget.cpp:127
#14 0x080b0326 in KTaggingWidget::qt_metacall (this=0x8fc1010, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0xbf946eb8)
    at /home/kde-devel/kde/build/KDE/kdebase/apps/dolphin/src/ktaggingwidget_p.moc:81
#15 0xb67ccb9c in QMetaObject::metacall (object=0x8fc1010, cl=QMetaObject::InvokeMetaMethod, idx=29, argv=0xbf946eb8) at kernel/qmetaobject.cpp:237
#16 0xb67e0c0e in QMetaObject::activate (sender=0x8fc1188, m=0x80dfb08, local_signal_index=0, argv=0xbf946eb8) at kernel/qobject.cpp:3275
#17 0xb5ffc51e in QLabel::linkActivated (this=0x8fc1188, _t1=...) at .moc/debug-shared/moc_qlabel.cpp:175
#18 0xb5ffc093 in QLabel::qt_metacall (this=0x8fc1188, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbf946fe8) at .moc/debug-shared/moc_qlabel.cpp:107
#19 0xb67ccb9c in QMetaObject::metacall (object=0x8fc1188, cl=QMetaObject::InvokeMetaMethod, idx=27, argv=0xbf946fe8) at kernel/qmetaobject.cpp:237
#20 0xb67e0c0e in QMetaObject::activate (sender=0x925aed8, m=0xb65d7028, local_signal_index=13, argv=0xbf946fe8) at kernel/qobject.cpp:3275
#21 0xb5dbc328 in QTextControl::linkActivated (this=0x925aed8, _t1=...) at .moc/debug-shared/moc_qtextcontrol_p.cpp:320
#22 0xb5db95fe in QTextControlPrivate::activateLinkUnderCursor (this=0x8fc18f8, href=...) at text/qtextcontrol.cpp:2616
#23 0xb5db3f70 in QTextControlPrivate::mouseReleaseEvent (this=0x8fc18f8, button=Qt::LeftButton, pos=...) at text/qtextcontrol.cpp:1705
#24 0xb5db09e8 in QTextControl::processEvent (this=0x925aed8, e=0xbf947d1c, matrix=..., contextWidget=0x8fc1188) at text/qtextcontrol.cpp:931
#25 0xb5db0723 in QTextControl::processEvent (this=0x925aed8, e=0xbf947d1c, coordinateOffset=..., contextWidget=0x8fc1188) at text/qtextcontrol.cpp:880
#26 0xb5ffb9e3 in QLabelPrivate::sendControlEvent (this=0x8fc11d8, e=0xbf947d1c) at widgets/qlabel.cpp:1530
#27 0xb5ff8b60 in QLabel::mouseReleaseEvent (this=0x8fc1188, ev=0xbf947d1c) at widgets/qlabel.cpp:844
#28 0xb5b72212 in QWidget::event (this=0x8fc1188, event=0xbf947d1c) at kernel/qwidget.cpp:7978
#29 0xb5ff34b0 in QFrame::event (this=0x8fc1188, e=0xbf947d1c) at widgets/qframe.cpp:557
#30 0xb5ff8fb5 in QLabel::event (this=0x8fc1188, e=0xbf947d1c) at widgets/qlabel.cpp:957
#31 0xb5b06b76 in QApplicationPrivate::notify_helper (this=0x8fbcec8, receiver=0x8fc1188, e=0xbf947d1c) at kernel/qapplication.cpp:4298
#32 0xb5b04bf5 in QApplication::notify (this=0xbf9485a4, receiver=0x8fc1188, e=0xbf947d1c) at kernel/qapplication.cpp:3863
#33 0xb6e53f54 in KApplication::notify (this=0xbf9485a4, receiver=0x8fc1188, event=0xbf947d1c) at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:302
#34 0xb67c55ed in QCoreApplication::notifyInternal (this=0xbf9485a4, receiver=0x8fc1188, event=0xbf947d1c) at kernel/qcoreapplication.cpp:704
#35 0xb5b0992d in QCoreApplication::sendSpontaneousEvent (receiver=0x8fc1188, event=0xbf947d1c) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#36 0xb5b0320f in QApplicationPrivate::sendMouseEvent (receiver=0x8fc1188, event=0xbf947d1c, alienWidget=0x0, nativeWidget=0x8fc1188, buttonDown=0xb65f6938, lastMouseReceiver=..., spontaneous=true)
    at kernel/qapplication.cpp:2961
#37 0xb5ba857a in QETWidget::translateMouseEvent (this=0x8fc1188, event=0xbf948240) at kernel/qapplication_x11.cpp:4368
#38 0xb5ba51ba in QApplication::x11ProcessEvent (this=0xbf9485a4, event=0xbf948240) at kernel/qapplication_x11.cpp:3379
#39 0xb5bdb7b9 in x11EventSourceDispatch (s=0x8fc88b0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#40 0xb4fd7378 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#41 0xb4fdabf0 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#42 0xb4fdad23 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#43 0xb67fcf74 in QEventDispatcherGlib::processEvents (this=0x8f85460, flags=...) at kernel/qeventdispatcher_glib.cpp:412
#44 0xb5bdbdee in QGuiEventDispatcherGlib::processEvents (this=0x8f85460, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#45 0xb67c29c7 in QEventLoop::processEvents (this=0xbf94851c, flags=...) at kernel/qeventloop.cpp:149
#46 0xb67c2b0c in QEventLoop::exec (this=0xbf94851c, flags=...) at kernel/qeventloop.cpp:201
#47 0xb67c5cc9 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#48 0xb5b03ec6 in QApplication::exec () at kernel/qapplication.cpp:3577
#49 0x0807c43c in main (argc=5, argv=0xbf948784) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/main.cpp:101
Comment 4 Frank Reininghaus 2010-02-13 13:18:44 UTC
*** Bug 226610 has been marked as a duplicate of this bug. ***
Comment 5 Sebastian Trueg 2010-02-17 14:11:08 UTC
SVN commit 1091752 by trueg:

Make sure no items from the temporary lists in ResourceManagerPrivate::allResourceDataOfType and 
ResourceManagerPrivate::allResourceDataWithProperty is deleted during the loop.

BUG: 226509


 M  +5 -1      resourcedata.h  
 M  +17 -6     resourcemanager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1091752
Comment 6 Dario Andres 2010-02-17 16:26:41 UTC
@Sebastian: are you going to backport the fix ? Regards
Comment 7 Sebastian Trueg 2010-02-17 17:35:16 UTC
This fix is already backported to the 4.4 branch and thus, will appear in 4.4.1.
Comment 8 Frank Reininghaus 2010-02-22 17:16:46 UTC
*** Bug 226312 has been marked as a duplicate of this bug. ***
Comment 9 Sebastian Trueg 2010-02-25 16:43:45 UTC
*** Bug 228069 has been marked as a duplicate of this bug. ***
Comment 10 Sebastian Trueg 2010-07-27 13:55:58 UTC
*** Bug 227804 has been marked as a duplicate of this bug. ***