Bug 176045 - Crash after clicking around in message list
Summary: Crash after clicking around in message list
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: new message list (show other bugs)
Version: 1.10.90
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Szymon Stefanek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-25 11:35 UTC by Sebastian Kügler
Modified: 2008-11-26 02:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
backtrace from the crash (4.68 KB, application/octet-stream)
2008-11-25 11:36 UTC, Sebastian Kügler
Details
fix crash in qtreeview (1.22 KB, patch)
2008-11-25 23:23 UTC, Sebastian Kügler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Kügler 2008-11-25 11:35:23 UTC
Version:           1.10.90 (using Devel)
Compiler:          gcc 4.3.1 20080507 
OS:                Linux
Installed from:    Compiled sources

After clicking on a couple of items in the treeview, kmail reliably crashes for me. All it takes is to quickly select a couple of emails in the treeview. It happens with the Oxygen, but not with the plastique style. I'm using up to date qt-copy.

Backtrace attached.
Comment 1 Sebastian Kügler 2008-11-25 11:36:14 UTC
Created attachment 28811 [details]
backtrace from the crash
Comment 2 Jaime Torres 2008-11-25 12:00:38 UTC
Plase, next time paste the backtrace in the bug report. bugzilla is not able to search for duplicates in the attached files.
Comment 3 Thomas McGuire 2008-11-25 13:22:01 UTC
#11 0xb57d3ac4 in qt_assert_x (where=0xb562890a "QVector<T>::at", what=0xb56288f7 "index out of range", file=0xb56288c0 "../../include/QtCore/../../src/corelib/tools/qvector.h", line=317)
    at global/qglobal.cpp:1880
#12 0xb54f0c21 in QVector<QTreeViewItem>::at (this=0x8ac1f98, i=2) at ../../include/QtCore/../../src/corelib/tools/qvector.h:317
#13 0xb54e1ccf in QTreeViewPrivate::_q_endAnimatedOperation (this=0x8ac1d40) at itemviews/qtreeview.cpp:2922
#14 0xb54eea9a in QTreeView::qt_metacall (this=0x8ac1d18, _c=QMetaObject::InvokeMetaMethod, _id=18, _a=0xbfd7e3a4) at .moc/debug-shared/moc_qtreeview.cpp:144
#15 0xb5523f7c in QTreeWidget::qt_metacall (this=0x8ac1d18, _c=QMetaObject::InvokeMetaMethod, _id=86, _a=0xbfd7e3a4) at .moc/debug-shared/moc_qtreewidget.cpp:122
#16 0xb729aeea in KPIM::TreeWidget::qt_metacall (this=0x8ac1d18, _c=QMetaObject::InvokeMetaMethod, _id=86, _a=0xbfd7e3a4) at /home/sebas/kdesvn/build/kdepim/libkdepim/moc_treewidget.cpp:67
#17 0xb76b0d82 in KMMimePartTree::qt_metacall (this=0x8ac1d18, _c=QMetaObject::InvokeMetaMethod, _id=86, _a=0xbfd7e3a4) at /home/sebas/kdesvn/build/kdepim/kmail/kmmimeparttree.moc:78
#18 0xb58e10ae in QMetaObject::activate (sender=0x8ac1f7c, from_signal_index=7, to_signal_index=7, argv=0x0) at kernel/qobject.cpp:3028
#19 0xb58e153b in QMetaObject::activate (sender=0x8ac1f7c, m=0xb5978f14, local_signal_index=3, argv=0x0) at kernel/qobject.cpp:3101
#20 0xb591c6f9 in QTimeLine::finished (this=0x8ac1f7c) at .moc/debug-shared/moc_qtimeline.cpp:169
#21 0xb58331af in QTimeLinePrivate::setCurrentTime (this=0x8ac2018, msecs=291) at tools/qtimeline.cpp:171
#22 0xb583323b in QTimeLine::timerEvent (this=0x8ac1f7c, event=0xbfd7e9e4) at tools/qtimeline.cpp:763
#23 0xb58df3a6 in QObject::event (this=0x8ac1f7c, e=0xbfd7e9e4) at kernel/qobject.cpp:1120
#24 0xb4fb24d9 in QApplicationPrivate::notify_helper (this=0x806c488, receiver=0x8ac1f7c, e=0xbfd7e9e4) at kernel/qapplication.cpp:3803
#25 0xb4fb27ee in QApplication::notify (this=0xbfd7ed08, receiver=0x8ac1f7c, e=0xbfd7e9e4) at kernel/qapplication.cpp:3393
#26 0xb7eb5b83 in KApplication::notify (this=0xbfd7ed08, receiver=0x8ac1f7c, event=0xbfd7e9e4) at /home/sebas/kdesvn/src/kdelibs/kdeui/kernel/kapplication.cpp:307
#27 0xb58cc9ff in QCoreApplication::notifyInternal (this=0xbfd7ed08, receiver=0x8ac1f7c, event=0xbfd7e9e4) at kernel/qcoreapplication.cpp:583
#28 0xb70ce16b in QCoreApplication::sendEvent (receiver=0x8ac1f7c, event=0xbfd7e9e4) at ../../../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:209
#29 0xb58fd9d3 in QTimerInfoList::activateTimers (this=0x806f354) at kernel/qeventdispatcher_unix.cpp:557
#30 0xb58fb380 in timerSourceDispatch (source=0x806f320) at kernel/qeventdispatcher_glib.cpp:160
#31 0xb47542d9 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#32 0xb475785b in ?? () from /usr/lib/libglib-2.0.so.0
#33 0xb47579d8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#34 0xb58fa6b2 in QEventDispatcherGlib::processEvents (this=0x806a868, flags={i = -1076368536}) at kernel/qeventdispatcher_glib.cpp:319
#35 0xb5057268 in QGuiEventDispatcherGlib::processEvents (this=0x806a868, flags={i = -1076368488}) at kernel/qguieventdispatcher_glib.cpp:198
#36 0xb58c9a20 in QEventLoop::processEvents (this=0xbfd7ec10, flags={i = -1076368428}) at kernel/qeventloop.cpp:143
#37 0xb58c9c5d in QEventLoop::exec (this=0xbfd7ec10, flags={i = -1076368360}) at kernel/qeventloop.cpp:190
#38 0xb58cd1fb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:845
#39 0xb4fb21f2 in QApplication::exec () at kernel/qapplication.cpp:3331
#40 0x0804b729 in main (argc=3, argv=0xbfd7ede4) at /home/sebas/kdesvn/src/kdepim/kmail/main.cpp:146

Comment 4 Thomas McGuire 2008-11-25 14:18:38 UTC
From the testcase Szymon sent to kde-pim, it seems that this happens when expanding an item, and then deleting it, before entering the event-loop.

In which situation in KMail does this happen? Or could this bug be triggered by more actions?
Comment 5 Sebastian Kügler 2008-11-25 14:45:29 UTC
It's very easy to trigger here (happens all the time when browsing my email and skipping quickly through some of them).

I just have to quickly click on the treeview for about 5 seconds, and kmail goes booooom.
Comment 6 Sebastian Kügler 2008-11-25 16:41:36 UTC
Interestingly, I'm getting a crash with a very similar backtrace in kwrite, apparently somewhere in the word completion plugin:

#9  0xb6c56a1b in qt_message_output (msgType=QtFatalMsg, 
    buf=0xbfa69470 "ASSERT failure in QVector<T>::at: \"index out of range\", file ../../include/QtCore/../../src/corelib/tools/qvector.h, line 317") at global/qglobal.cpp:2102
#10 0xb6c56a7f in qFatal (msg=0xb6da2a3c "ASSERT failure in %s: \"%s\", file %s, line %d") at global/qglobal.cpp:2303
#11 0xb6c56ac4 in qt_assert_x (where=0xb75c990a "QVector<T>::at", what=0xb75c98f7 "index out of range", file=0xb75c98c0 "../../include/QtCore/../../src/corelib/tools/qvector.h", line=317)
    at global/qglobal.cpp:1880
#12 0xb7491c21 in QVector<QTreeViewItem>::at (this=0x82e3630, i=2) at ../../include/QtCore/../../src/corelib/tools/qvector.h:317
#13 0xb7482ccf in QTreeViewPrivate::_q_endAnimatedOperation (this=0x82e33d8) at itemviews/qtreeview.cpp:2922
#14 0xb748fa9a in QTreeView::qt_metacall (this=0x8290210, _c=QMetaObject::InvokeMetaMethod, _id=18, _a=0xbfa6b5b4) at .moc/debug-shared/moc_qtreeview.cpp:144
#15 0xb4992dc4 in KateCompletionTree::qt_metacall (this=0x8290210, _c=QMetaObject::InvokeMetaMethod, _id=86, _a=0xbfa6b5b4) at /home/sebas/kdesvn/build/kdelibs/kate/katecompletiontree.moc:60
#16 0xb6d640ae in QMetaObject::activate (sender=0x82e3614, from_signal_index=7, to_signal_index=7, argv=0x0) at kernel/qobject.cpp:3028
#17 0xb6d6453b in QMetaObject::activate (sender=0x82e3614, m=0xb6dfbf14, local_signal_index=3, argv=0x0) at kernel/qobject.cpp:3101
#18 0xb6d9f6f9 in QTimeLine::finished (this=0x82e3614) at .moc/debug-shared/moc_qtimeline.cpp:169
#19 0xb6cb61af in QTimeLinePrivate::setCurrentTime (this=0x828ace0, msecs=284) at tools/qtimeline.cpp:171
#20 0xb6cb623b in QTimeLine::timerEvent (this=0x82e3614, event=0xbfa6bbf4) at tools/qtimeline.cpp:763
#21 0xb6d623a6 in QObject::event (this=0x82e3614, e=0xbfa6bbf4) at kernel/qobject.cpp:1120
#22 0xb6f534d9 in QApplicationPrivate::notify_helper (this=0x805b018, receiver=0x82e3614, e=0xbfa6bbf4) at kernel/qapplication.cpp:3803
#23 0xb6f537ee in QApplication::notify (this=0xbfa6beb8, receiver=0x82e3614, e=0xbfa6bbf4) at kernel/qapplication.cpp:3393
#24 0xb7acbb83 in KApplication::notify (this=0xbfa6beb8, receiver=0x82e3614, event=0xbfa6bbf4) at /home/sebas/kdesvn/src/kdelibs/kdeui/kernel/kapplication.cpp:307
#25 0xb6d4f9ff in QCoreApplication::notifyInternal (this=0xbfa6beb8, receiver=0x82e3614, event=0xbfa6bbf4) at kernel/qcoreapplication.cpp:583
#26 0xb6f503df in QCoreApplication::sendEvent (receiver=0x82e3614, event=0xbfa6bbf4) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:209
#27 0xb6d809d3 in QTimerInfoList::activateTimers (this=0x805e0bc) at kernel/qeventdispatcher_unix.cpp:557
#28 0xb6d7e380 in timerSourceDispatch (source=0x805e088) at kernel/qeventdispatcher_glib.cpp:160
#29 0xb657b2d9 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#30 0xb657e85b in ?? () from /usr/lib/libglib-2.0.so.0
#31 0xb657e9d8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#32 0xb6d7d6b2 in QEventDispatcherGlib::processEvents (this=0x805b0d8, flags={i = -1079591560}) at kernel/qeventdispatcher_glib.cpp:319
#33 0xb6ff8268 in QGuiEventDispatcherGlib::processEvents (this=0x805b0d8, flags={i = -1079591512}) at kernel/qguieventdispatcher_glib.cpp:198
#34 0xb6d4ca20 in QEventLoop::processEvents (this=0xbfa6be20, flags={i = -1079591452}) at kernel/qeventloop.cpp:143
#35 0xb6d4cc5d in QEventLoop::exec (this=0xbfa6be20, flags={i = -1079591384}) at kernel/qeventloop.cpp:190
#36 0xb6d501fb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:845
#37 0xb6f531f2 in QApplication::exec () at kernel/qapplication.cpp:3331
#38 0xb804a964 in kdemain (argc=2, argv=0xbfa6c2b4) at /home/sebas/kdesvn/src/kdebase/apps/kwrite/kwritemain.cpp:776
#39 0x080486f6 in main (argc=) at /home/sebas/kdesvn/build/kdebase/apps/kwrite/kwrite_dummy.cpp:3

Comment 7 Szymon Stefanek 2008-11-25 20:53:27 UTC
Exactly the same crash.
I suggest:
- explicitly disabling animation in the KMail folder list
- notifying the kwrite mantainer of the problem
- forwarding the testcase to trolltech
Comment 8 Sebastian Kügler 2008-11-25 23:17:26 UTC
Gof, one of my favourite trolls ... eeh cuties got me trying the patch to qt-copy in the next attachment. I've not yet been able to reproduce it, so it looks really good. I'm closing the bug for now, we can always re-open it.

Szymon, can you give the patch a whirl as well? (Your testcase still segfaults on my machine.)
Comment 9 Sebastian Kügler 2008-11-25 23:23:37 UTC
Created attachment 28825 [details]
fix crash in qtreeview

By Olivier Goffart, Qt tasktracker ID: 236454, will be in the qt snapshots soon
Comment 10 Szymon Stefanek 2008-11-25 23:39:49 UTC
The patch looks fine to me as concerning this bug: it just emits the signals before the item is deleted and avoids referencing it in the later slot.
I'll apply it, recompile and test. If you don't hear from me within tomorrow then it works :)

As concerning the testcase I've screwed the first submission to the kdepim ml by tarballing a file without saving it after a modification. Shame on me :D
There is a second submission on the list which triggers the bug without introducing the SEGV.