Bug 248689 - Dolphin crashed when deleting a tag [QListWidgetItem::text, KEditTagsDialog::deleteTag]
Summary: Dolphin crashed when deleting a tag [QListWidgetItem::text, KEditTagsDialog::...
Status: RESOLVED FIXED
Alias: None
Product: nepomuk
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Vishesh Handa
URL:
Keywords:
: 259768 275859 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-22 12:27 UTC by sircoram
Modified: 2011-11-21 15:31 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (10.66 KB, text/plain)
2011-02-03 19:19 UTC, zless
Details
New crash information added by DrKonqi (11.76 KB, text/plain)
2011-02-21 19:46 UTC, Martin Kampas
Details
New crash information added by DrKonqi (10.16 KB, text/plain)
2011-05-20 16:06 UTC, Steffen Ohrendorf
Details
New crash information added by DrKonqi (10.67 KB, text/plain)
2011-06-22 23:29 UTC, Tomas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sircoram 2010-08-22 12:27:42 UTC
Application: dolphin (1.5)
KDE Platform Version: 4.5.00 (KDE 4.5.0)
Qt Version: 4.7.0
Operating System: Linux 2.6.32-24-generic i686
Distribution: Ubuntu 10.04.1 LTS

-- Information about the crash:
- What I was doing when the application crashed:
I had two tag in dolphin created by me.
When I deleted the last one it crashed.

-- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
[Current thread is 1 (Thread 0xb77e8710 (LWP 3248))]

Thread 3 (Thread 0xb54ddb70 (LWP 3254)):
#0  0x00bbde16 in clock_gettime () from /lib/tls/i686/cmov/librt.so.1
#1  0x01e57edb in do_gettime () at tools/qelapsedtimer_unix.cpp:105
#2  qt_gettime () at tools/qelapsedtimer_unix.cpp:119
#3  0x01f2e2f5 in QTimerInfoList::updateCurrentTime (this=0x90189e4) at kernel/qeventdispatcher_unix.cpp:339
#4  0x01f2e33a in QTimerInfoList::timerWait (this=0x90189e4, tm=...) at kernel/qeventdispatcher_unix.cpp:442
#5  0x01f2c3d8 in timerSourcePrepareHelper (src=<value optimized out>, timeout=0xb54dd0bc) at kernel/qeventdispatcher_glib.cpp:136
#6  0x01f2c465 in timerSourcePrepare (source=0x0, timeout=0xbc1ff4) at kernel/qeventdispatcher_glib.cpp:169
#7  0x01622aca in g_main_context_prepare () from /lib/libglib-2.0.so.0
#8  0x01622ee9 in ?? () from /lib/libglib-2.0.so.0
#9  0x016234b8 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#10 0x01f2c1cf in QEventDispatcherGlib::processEvents (this=0x8e1ff50, flags=...) at kernel/qeventdispatcher_glib.cpp:414
#11 0x01efc419 in QEventLoop::processEvents (this=0xb54dd290, flags=) at kernel/qeventloop.cpp:149
#12 0x01efc89a in QEventLoop::exec (this=0xb54dd290, flags=...) at kernel/qeventloop.cpp:201
#13 0x01df9b5e in QThread::exec (this=0x90a4838) at thread/qthread.cpp:490
#14 0x01edb55b in QInotifyFileSystemWatcherEngine::run (this=0x90a4838) at io/qfilesystemwatcher_inotify.cpp:248
#15 0x01dfce39 in QThreadPrivate::start (arg=0x90a4838) at thread/qthread_unix.cpp:266
#16 0x0087896e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#17 0x007dca4e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread 0xb2ca1b70 (LWP 3285)):
#0  0x00385422 in __kernel_vsyscall ()
#1  0x0087d342 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x007e9a34 in pthread_cond_timedwait () from /lib/tls/i686/cmov/libc.so.6
#3  0x052e8ce7 in ?? () from /usr/lib/libxine.so.1
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 1 (Thread 0xb77e8710 (LWP 3248)):
[KCrash Handler]
#7  QListWidgetItem::text (this=0xbf82d95c) at /usr/include/qt4/QtGui/qlistwidget.h:90
#8  KEditTagsDialog::deleteTag (this=0xbf82d95c) at ../../nepomuk/ui/kedittagsdialog.cpp:206
#9  0x00291553 in KEditTagsDialog::qt_metacall (this=0xbf82d95c, _c=QMetaObject::InvokeMetaMethod, _id=77, _a=0xbf82c9b8) at ./kedittagsdialog_p.moc:83
#10 0x01f036ca in QMetaObject::metacall (object=0xbf82d95c, cl=3213019576, idx=77, argv=0xbf82c9b8) at kernel/qmetaobject.cpp:237
#11 0x01f16455 in QMetaObject::activate (sender=0x96806f0, m=0x2f80724, local_signal_index=2, argv=0xbf82c9b8) at kernel/qobject.cpp:3280
#12 0x02d5f5e9 in QAbstractButton::clicked (this=0x96806f0, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:206
#13 0x02a20e39 in QAbstractButtonPrivate::emitClicked (this=0x9680ab0) at widgets/qabstractbutton.cpp:546
#14 0x02a22544 in QAbstractButtonPrivate::click (this=0x9680ab0) at widgets/qabstractbutton.cpp:539
#15 0x02a227fe in QAbstractButton::mouseReleaseEvent (this=0x96806f0, e=0xbf82d0f0) at widgets/qabstractbutton.cpp:1121
#16 0x02654c48 in QWidget::event (this=0x96806f0, event=0xbf82d0f0) at kernel/qwidget.cpp:8157
#17 0x02a20cde in QAbstractButton::event (this=0x96806f0, e=0xbf82d95c) at widgets/qabstractbutton.cpp:1080
#18 0x02ace782 in QPushButton::event (this=0x96806f0, e=0xbf82d0f0) at widgets/qpushbutton.cpp:683
#19 0x025f70cc in QApplicationPrivate::notify_helper (this=0x8e22658, receiver=0x96806f0, e=0xbf82d0f0) at kernel/qapplication.cpp:4389
#20 0x025fdab7 in QApplication::notify (this=0xbf82efe0, receiver=0x96806f0, e=0xbf82d0f0) at kernel/qapplication.cpp:3952
#21 0x011a482a in KApplication::notify (this=0xbf82efe0, receiver=0x96806f0, event=0xbf82d0f0) at ../../kdeui/kernel/kapplication.cpp:310
#22 0x01efd96b in QCoreApplication::notifyInternal (this=0xbf82efe0, receiver=0x96806f0, event=0xbf82d0f0) at kernel/qcoreapplication.cpp:732
#23 0x025fc162 in QCoreApplication::sendEvent (receiver=0x96806f0, event=0xbf82d0f0, alienWidget=0x96806f0, nativeWidget=0x95ddf58, buttonDown=0x2f89300, lastMouseReceiver=..., spontaneous=true)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#24 QApplicationPrivate::sendMouseEvent (receiver=0x96806f0, event=0xbf82d0f0, alienWidget=0x96806f0, nativeWidget=0x95ddf58, buttonDown=0x2f89300, lastMouseReceiver=..., spontaneous=true)
    at kernel/qapplication.cpp:3051
#25 0x0268a6b8 in QETWidget::translateMouseEvent (this=0x95ddf58, event=0xbf82d60c) at kernel/qapplication_x11.cpp:4403
#26 0x02689b49 in QApplication::x11ProcessEvent (this=0xbf82efe0, event=0xbf82d60c) at kernel/qapplication_x11.cpp:3414
#27 0x026b8b3a in x11EventSourceDispatch (s=0x8e1ec40, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#28 0x0161f5e5 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#29 0x016232d8 in ?? () from /lib/libglib-2.0.so.0
#30 0x016234b8 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#31 0x01f2c195 in QEventDispatcherGlib::processEvents (this=0x8e1b480, flags=...) at kernel/qeventdispatcher_glib.cpp:412
#32 0x026b83b5 in QGuiEventDispatcherGlib::processEvents (this=0x8e1b480, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#33 0x01efc419 in QEventLoop::processEvents (this=0xbf82d900, flags=) at kernel/qeventloop.cpp:149
#34 0x01efc89a in QEventLoop::exec (this=0xbf82d900, flags=...) at kernel/qeventloop.cpp:201
#35 0x02b5cfb3 in QDialog::exec (this=0xbf82d95c) at dialogs/qdialog.cpp:546
#36 0x0028ed8c in Nepomuk::TagWidget::slotShowAll (this=0x914c110) at ../../nepomuk/ui/tagwidget.cpp:379
#37 0x0028f2c3 in Nepomuk::TagWidget::qt_metacall (this=0x914c110, _c=QMetaObject::InvokeMetaMethod, _id=36, _a=0xbf82daf8) at ./tagwidget.moc:104
#38 0x01f036ca in QMetaObject::metacall (object=0x914c110, cl=3213019576, idx=36, argv=0xbf82daf8) at kernel/qmetaobject.cpp:237
#39 0x01f16455 in QMetaObject::activate (sender=0x914ff18, m=0x2f7328c, local_signal_index=0, argv=0xbf82daf8) at kernel/qobject.cpp:3280
#40 0x02a75893 in QLabel::linkActivated (this=0x914ff18, _t1=...) at .moc/release-shared/moc_qlabel.cpp:180
#41 0x02a79fed in QLabel::qt_metacall (this=0x914ff18, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbf82dc48) at .moc/release-shared/moc_qlabel.cpp:110
#42 0x01f036ca in QMetaObject::metacall (object=0x914ff18, cl=3213019576, idx=27, argv=0xbf82dc48) at kernel/qmetaobject.cpp:237
#43 0x01f16455 in QMetaObject::activate (sender=0x96471d0, m=0x2f709ac, local_signal_index=13, argv=0xbf82dc48) at kernel/qobject.cpp:3280
#44 0x0287e033 in QTextControl::linkActivated (this=0x96471d0, _t1=...) at .moc/release-shared/moc_qtextcontrol_p.cpp:322
#45 0x02886f05 in QTextControlPrivate::activateLinkUnderCursor (this=0x963be18, href=...) at text/qtextcontrol.cpp:2635
#46 0x02887f8f in QTextControlPrivate::mouseReleaseEvent (this=0x963be18, button=<value optimized out>, pos=...) at text/qtextcontrol.cpp:1724
#47 0x0288b384 in QTextControl::processEvent (this=0x96471d0, e=0xbf82e720, matrix=..., contextWidget=0x914ff18) at text/qtextcontrol.cpp:943
#48 0x02880460 in QTextControl::processEvent (this=0x96471d0, e=0xbf82e720, coordinateOffset=..., contextWidget=0x914ff18) at text/qtextcontrol.cpp:890
#49 0x02a77429 in QLabelPrivate::sendControlEvent (this=0x95ebd48, e=0xbf82e720) at widgets/qlabel.cpp:1622
#50 0x02654c48 in QWidget::event (this=0x914ff18, event=0xbf82e720) at kernel/qwidget.cpp:8157
#51 0x02a725e3 in QFrame::event (this=0x914ff18, e=0xbf82e720) at widgets/qframe.cpp:557
#52 0x02a7664a in QLabel::event (this=0x914ff18, e=0xbf82e720) at widgets/qlabel.cpp:1049
#53 0x025f70cc in QApplicationPrivate::notify_helper (this=0x8e22658, receiver=0x914ff18, e=0xbf82e720) at kernel/qapplication.cpp:4389
#54 0x025fdab7 in QApplication::notify (this=0xbf82efe0, receiver=0x914ff18, e=0xbf82e720) at kernel/qapplication.cpp:3952
#55 0x011a482a in KApplication::notify (this=0xbf82efe0, receiver=0x914ff18, event=0xbf82e720) at ../../kdeui/kernel/kapplication.cpp:310
#56 0x01efd96b in QCoreApplication::notifyInternal (this=0xbf82efe0, receiver=0x914ff18, event=0xbf82e720) at kernel/qcoreapplication.cpp:732
#57 0x025fc162 in QCoreApplication::sendEvent (receiver=0x914ff18, event=0xbf82e720, alienWidget=0x0, nativeWidget=0x914ff18, buttonDown=0x2f89300, lastMouseReceiver=..., spontaneous=true)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#58 QApplicationPrivate::sendMouseEvent (receiver=0x914ff18, event=0xbf82e720, alienWidget=0x0, nativeWidget=0x914ff18, buttonDown=0x2f89300, lastMouseReceiver=..., spontaneous=true)
    at kernel/qapplication.cpp:3051
#59 0x0268a6b8 in QETWidget::translateMouseEvent (this=0x914ff18, event=0xbf82ec3c) at kernel/qapplication_x11.cpp:4403
#60 0x02689b49 in QApplication::x11ProcessEvent (this=0xbf82efe0, event=0xbf82ec3c) at kernel/qapplication_x11.cpp:3414
#61 0x026b8b3a in x11EventSourceDispatch (s=0x8e1ec40, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#62 0x0161f5e5 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#63 0x016232d8 in ?? () from /lib/libglib-2.0.so.0
#64 0x016234b8 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#65 0x01f2c195 in QEventDispatcherGlib::processEvents (this=0x8e1b480, flags=...) at kernel/qeventdispatcher_glib.cpp:412
#66 0x026b83b5 in QGuiEventDispatcherGlib::processEvents (this=0x8e1b480, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#67 0x01efc419 in QEventLoop::processEvents (this=0xbf82ef34, flags=) at kernel/qeventloop.cpp:149
#68 0x01efc89a in QEventLoop::exec (this=0xbf82ef34, flags=...) at kernel/qeventloop.cpp:201
#69 0x01f00e4f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#70 0x025f5ef7 in QApplication::exec () at kernel/qapplication.cpp:3665
#71 0x009322bb in kdemain (argc=6, argv=0xbf82f1d4) at ../../../../apps/dolphin/src/main.cpp:98
#72 0x080485fb in main (argc=6, argv=0xbf82f1d4) at dolphin_dummy.cpp:3

Reported using DrKonqi
Comment 1 Dario Andres 2010-12-14 16:02:49 UTC
*** Bug 259768 has been marked as a duplicate of this bug. ***
Comment 2 zless 2011-02-03 19:19:24 UTC
Created attachment 56831 [details]
New crash information added by DrKonqi

dolphin (1.6) on KDE Platform 4.6.00 (4.6.0) using Qt 4.7.0

- What I was doing when the application crashed:
As the OP I deleted some tags :) I promise I won't do that again.

-- Backtrace (Reduced):
#6  text (this=0x7fff76564040) at /usr/include/qt4/QtGui/qlistwidget.h:90
#7  KEditTagsDialog::deleteTag (this=0x7fff76564040) at ../../nepomuk/ui/kedittagsdialog.cpp:217
#8  0x00007f2aa2a06584 in KEditTagsDialog::qt_metacall (this=0x7fff76564040, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff76562a30) at ./kedittagsdialog_p.moc:83
[...]
#10 0x00007f2aa1267402 in QAbstractButton::clicked (this=0x7fff76564040, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:206
#11 0x00007f2aa0f61eeb in QAbstractButtonPrivate::emitClicked (this=0x1e24880) at widgets/qabstractbutton.cpp:546
Comment 3 Martin Kampas 2011-02-21 19:46:41 UTC
Created attachment 57423 [details]
New crash information added by DrKonqi

dolphin (1.6) on KDE Platform 4.6.00 (4.6.0) using Qt 4.7.1

- What I was doing when the application crashed:

Trying to remove couple of tags. It crashes when you use keyboard to confirm the operation and do not move mouse cursor between deleting two tags. I.e. (1) click on the X button, (2) press Alt+D to confirm the operation (3) click again without moving cursor (next tag is under cursor)

-- Backtrace (Reduced):
#6  text (this=0x7fffab4a5a90) at /usr/include/qt4/QtGui/qlistwidget.h:90
#7  KEditTagsDialog::deleteTag (this=0x7fffab4a5a90) at /var/tmp/portage/kde-base/kdelibs-4.6.0-r1/work/kdelibs-4.6.0/nepomuk/ui/kedittagsdialog.cpp:217
#8  0x0000003ef626b214 in KEditTagsDialog::qt_metacall (this=0x7fffab4a5a90, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffab4a4470) at /var/tmp/portage/kde-base/kdelibs-4.6.0-r1/work/kdelibs-4.6.0_build/nepomuk/kedittagsdialog_p.moc:83
[...]
#10 0x0000003ef32126c3 in QAbstractButton::clicked (this=<value optimized out>, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:206
#11 0x0000003ef2f5e07c in QAbstractButtonPrivate::emitClicked (this=<value optimized out>) at widgets/qabstractbutton.cpp:546
Comment 4 Steffen Ohrendorf 2011-05-20 16:06:03 UTC
Created attachment 60185 [details]
New crash information added by DrKonqi

dolphin (1.6) on KDE Platform 4.6.00 (4.6.0) "release 6" using Qt 4.7.1

- What I was doing when the application crashed:
Same as OP, removed mainly some "res://" tags.

- Unusual behavior I noticed:
Found many "res://" tags in the available tags.

-- Backtrace (Reduced):
#6  text (this=0x0) at /usr/include/QtGui/qlistwidget.h:90
#7  KEditTagsDialog::deleteTag (this=0x7fff1f45b710) at /usr/src/debug/kdelibs-4.6.0/nepomuk/ui/kedittagsdialog.cpp:217
#8  0x00007fca755f5c9c in KEditTagsDialog::qt_metacall (this=0x7fff1f45b710, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff1f45a0a0) at /usr/src/debug/kdelibs-4.6.0/build/nepomuk/kedittagsdialog_p.moc:83
[...]
#10 0x00007fca7bcc4a32 in QAbstractButton::clicked (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:206
#11 0x00007fca7ba0cd9b in QAbstractButtonPrivate::emitClicked (this=<optimized out>) at widgets/qabstractbutton.cpp:546
Comment 5 Tomas 2011-06-22 23:29:01 UTC
Created attachment 61259 [details]
New crash information added by DrKonqi

dolphin (1.6.1) on KDE Platform 4.6.4 (4.6.4) using Qt 4.7.2

- What I was doing when the application crashed:
Exactly as in the main bug already reported.

-- Backtrace (Reduced):
#7  text (this=0xbfde8d08) at /usr/include/qt4/QtGui/qlistwidget.h:90
#8  KEditTagsDialog::deleteTag (this=0xbfde8d08) at ../../nepomuk/ui/kedittagsdialog.cpp:217
#9  0x00558cb3 in KEditTagsDialog::qt_metacall (this=0xbfde8d08, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0xbfde7d58) at ./kedittagsdialog_p.moc:83
[...]
#12 0x0977bd39 in QAbstractButton::clicked (this=0x9f00c80, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:206
#13 0x09493896 in QAbstractButtonPrivate::emitClicked (this=0xa1cd798) at widgets/qabstractbutton.cpp:546
Comment 6 Vishesh Handa 2011-07-28 12:02:15 UTC
Confirmed.

I happened to stumble on this bug on my own.

Exacts steps to reproduce -

1. Open the "Edit Tags" dialog
2. Click on the 'X' to delete a tag, and donot move your mouse at all.
3. Press Alt+D ( The shortcut to confirm deletion )
4. Without moving the mouse, click on 'X' again.

I've looked at the code, and I'm not sure I can easily produce a simple fix. The problem is that m_deleteCandidate is not set since it is only set on mouse move events.

Either way this code is very old, and should be using a proper asynchronous model.
Comment 7 Vishesh Handa 2011-07-29 12:20:41 UTC
Git commit c8fcee890200f39993b2131d0ac3697d5fddcf4d by Vishesh Handa.
Committed on 29/07/2011 at 14:13.
Pushed by vhanda into branch 'KDE/4.7'.

Allow deletion of multiple tags without moving the mouse

The dialog used the mouse move event to sent the m_deleteCandidate,
and then set m_deleteCandidate = 0. On trying to delete the next
tag, the deleteTag() function would assert as m_deleteCandidate was 0

m_deleteCandidate is now set to next tag after deletion of a tag.

BUG: 248689
REVIEW: 102111

M  +12   -7    nepomuk/ui/kedittagsdialog.cpp

http://commits.kde.org/kdelibs/c8fcee890200f39993b2131d0ac3697d5fddcf4d
Comment 8 Vishesh Handa 2011-07-29 12:20:53 UTC
Git commit 94c82bebe875d724522b809fe520bfda6570aed8 by Vishesh Handa.
Committed on 29/07/2011 at 14:13.
Pushed by vhanda into branch 'master'.

Allow deletion of multiple tags without moving the mouse

The dialog used the mouse move event to sent the m_deleteCandidate,
and then set m_deleteCandidate = 0. On trying to delete the next
tag, the deleteTag() function would assert as m_deleteCandidate was 0

m_deleteCandidate is now set to next tag after deletion of a tag.

BUG: 248689
REVIEW: 102111

M  +12   -7    nepomuk/ui/kedittagsdialog.cpp

http://commits.kde.org/kdelibs/94c82bebe875d724522b809fe520bfda6570aed8
Comment 9 Beat Wolf 2011-11-21 15:31:13 UTC
*** Bug 275859 has been marked as a duplicate of this bug. ***