Bug 225570 - ASSERT: "row >= 0" when deleting messages
Summary: ASSERT: "row >= 0" when deleting messages
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: libakonadi (show other bugs)
Version: 4.5
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Stephen Kelly
URL:
Keywords: akonadi-ports-regression
Depends on:
Blocks: 223438
  Show dependency treegraph
 
Reported: 2010-02-05 02:01 UTC by Christophe Marin
Modified: 2010-06-24 12:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Marin 2010-02-05 02:01:18 UTC
using trunk (r1085248)

I can't reliably reproduce the crash. I was just deleting the selected messages from my inbox folder. 

kmail(5566)/libakonadi Akonadi::EntityTreeModelPrivate::monitoredItemMoved: Got a stale notification for an item which was already removed. 2 "{02c54ae0-718f-4e55-bce5-9d0dd8e0f5d3}"
ASSERT: "row >= 0" in file /kde/src/KDE/kdepimlibs/akonadi/entitytreemodel.cpp, line 559

Application: KMail (kmail), signal: Aborted
[Current thread is 1 (Thread 0xb15db760 (LWP 5566))]

Thread 2 (Thread 0xaf8ebb70 (LWP 5574)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0xb56b1d95 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb5b6127c in pthread_cond_wait () from /lib/libc.so.6
#3  0xb378d947 in ?? () from /usr/lib/libQtWebKit.so.4
#4  0xb378d98f in ?? () from /usr/lib/libQtWebKit.so.4
#5  0xb56ad6e5 in start_thread () from /lib/libpthread.so.0
#6  0xb56ad600 in ?? () from /lib/libpthread.so.0

Thread 1 (Thread 0xb15db760 (LWP 5566)):
[KCrash Handler]
#6  0xffffe430 in __kernel_vsyscall ()
#7  0xb5aac0cf in raise () from /lib/libc.so.6
#8  0xb5aad9e7 in abort () from /lib/libc.so.6
#9  0xb5d4b7f4 in qt_message_output (msgType=QtFatalMsg, buf=0x6 <Address 0x6 out of bounds>) at global/qglobal.cpp:2250
#10 0xb5d4ba13 in qt_message (msgType=QtFatalMsg, msg=0xb5ec7bbc "ASSERT: \"%s\" in file %s, line %d", ap=0xbfb179d4 "\331\340\265\266\330\335\265\266/\002") at global/qglobal.cpp:2296
#11 0xb5d4bb38 in qFatal (msg=0xb5ec7bbc "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2479
#12 0xb5d4bbb5 in qt_assert (assertion=0xb6b5e0d9 "row >= 0", file=0xb6b5ddd8 "/kde/src/KDE/kdepimlibs/akonadi/entitytreemodel.cpp", line=559) at global/qglobal.cpp:2013
#13 0xb6aabdb2 in Akonadi::EntityTreeModel::parent (this=0x8370bf0, index=...) at /kde/src/KDE/kdepimlibs/akonadi/entitytreemodel.cpp:559
#14 0xb66deff7 in parent (this=<value optimized out>) at ../../src/corelib/kernel/qabstractitemmodel.h:389
#15 QSortFilterProxyModelPrivate::_q_sourceDataChanged (this=<value optimized out>) at itemviews/qsortfilterproxymodel.cpp:1064
#16 0xb66e0531 in QSortFilterProxyModel::qt_metacall (this=0x82d2948, _c=InvokeMetaMethod, _id=5, _a=0xbfb17c94) at .moc/release-shared/moc_qsortfilterproxymodel.cpp:128
#17 0xb6aa7497 in Akonadi::EntityMimeTypeFilterModel::qt_metacall (this=0x82d2948, _c=InvokeMetaMethod, _id=30, _a=0xbfb17c94) at /kde/build/KDE/kdepimlibs/akonadi/entitymimetypefiltermodel.moc:64
#18 0xb5e62f0d in QMetaObject::metacall (object=0x82d2948, cl=5566, idx=30, argv=0xbfb17c94) at kernel/qmetaobject.cpp:237
#19 0xb5e71d3a in QMetaObject::activate (sender=0x8370bf0, m=0xb5f74198, local_signal_index=0, argv=0xbfb17c94) at kernel/qobject.cpp:3285
#20 0xb5ec43bd in QAbstractItemModel::dataChanged (this=0x8370bf0, _t1=..., _t2=...) at .moc/release-shared/moc_qabstractitemmodel.cpp:148
#21 0xb6ab7c6d in Akonadi::EntityTreeModelPrivate::dataChanged (this=0x83710e0, top=..., bottom=...) at /kde/src/KDE/kdepimlibs/akonadi/entitytreemodel_p.cpp:1134
#22 0xb6ab40d6 in Akonadi::EntityTreeModelPrivate::monitoredCollectionStatisticsChanged (this=0x83710e0, id=4, statistics=...) at /kde/src/KDE/kdepimlibs/akonadi/entitytreemodel_p.cpp:626
#23 0xb6aae387 in Akonadi::EntityTreeModel::qt_metacall (this=0x8370bf0, _c=InvokeMetaMethod, _id=0, _a=0xbfb17e84) at /kde/build/KDE/kdepimlibs/akonadi/entitytreemodel.moc:115
#24 0xb5e62f0d in QMetaObject::metacall (object=0x8370bf0, cl=5566, idx=24, argv=0xbfb17e84) at kernel/qmetaobject.cpp:237
#25 0xb5e71d3a in QMetaObject::activate (sender=0x8189d28, m=0xb6bdb3cc, local_signal_index=11, argv=0xbfb17e84) at kernel/qobject.cpp:3285
#26 0xb6afd839 in Akonadi::Monitor::collectionStatisticsChanged (this=0x8189d28, _t1=4, _t2=...) at /kde/build/KDE/kdepimlibs/akonadi/monitor.moc:237
#27 0xb6affd28 in Akonadi::MonitorPrivate::slotStatisticsChangedFinished (this=0x824cca8, job=0x8817a08) at /kde/src/KDE/kdepimlibs/akonadi/monitor_p.cpp:238
#28 0xb6afd34b in Akonadi::Monitor::qt_metacall (this=0x8189d28, _c=InvokeMetaMethod, _id=18, _a=0xbfb18008) at /kde/build/KDE/kdepimlibs/akonadi/monitor.moc:145
#29 0xb6a693e5 in Akonadi::ChangeRecorder::qt_metacall (this=0x8189d28, _c=InvokeMetaMethod, _id=22, _a=0xbfb18008) at /kde/build/KDE/kdepimlibs/akonadi/changerecorder.moc:72
#30 0xb5e62f0d in QMetaObject::metacall (object=0x8189d28, cl=5566, idx=22, argv=0xbfb18008) at kernel/qmetaobject.cpp:237
#31 0xb5e71d3a in QMetaObject::activate (sender=0x8817a08, m=0xb72d5c48, local_signal_index=3, argv=0xbfb18008) at kernel/qobject.cpp:3285
#32 0xb71238b5 in KJob::result (this=0x8817a08, _t1=0x8817a08) at /usr/src/debug/kdelibs-4.4.62svn1084462/build/kdecore/kjob.moc:194
#33 0xb7123c88 in KJob::emitResult (this=0x8817a08) at /usr/src/debug/kdelibs-4.4.62svn1084462/kdecore/jobs/kjob.cpp:312
#34 0xb6af0c25 in Akonadi::JobPrivate::delayedEmitResult (this=0x883cc20) at /kde/src/KDE/kdepimlibs/akonadi/job.cpp:129
#35 0xb6af22a0 in Akonadi::Job::qt_metacall (this=0x8817a08, _c=InvokeMetaMethod, _id=6, _a=0xbfb1813c) at /kde/build/KDE/kdepimlibs/akonadi/job.moc:91
#36 0xb6a943db in Akonadi::CollectionStatisticsJob::qt_metacall (this=0x8817a08, _c=InvokeMetaMethod, _id=34, _a=0xbfb1813c) at /kde/build/KDE/kdepimlibs/akonadi/collectionstatisticsjob.moc:64
#37 0xb5e62f0d in QMetaObject::metacall (object=0x8817a08, cl=5566, idx=34, argv=0xbfb1813c) at kernel/qmetaobject.cpp:237
#38 0xb5e71d3a in QMetaObject::activate (sender=0x873c980, m=0xb5f731a4, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3285
#39 0xb5e79a25 in QSingleShotTimer::timeout (this=0x873c980) at .moc/release-shared/qtimer.moc:82
#40 0xb5e79b5c in QSingleShotTimer::timerEvent (this=0x873c980) at kernel/qtimer.cpp:308
#41 0xb5e6e844 in QObject::event (this=0x873c980, e=0x6) at kernel/qobject.cpp:1204
#42 0xb60a982c in QApplicationPrivate::notify_helper (this=0x8084df8, receiver=0x873c980, e=0xbfb18694) at kernel/qapplication.cpp:4300
#43 0xb60b0678 in QApplication::notify (this=0xbfb18a08, receiver=0x873c980, e=0xbfb18694) at kernel/qapplication.cpp:4183
#44 0xb74b28b1 in KApplication::notify (this=0xbfb18a08, receiver=0x873c980, event=0xbfb18694) at /usr/src/debug/kdelibs-4.4.62svn1084462/kdeui/kernel/kapplication.cpp:302
#45 0xb5e5db9e in QCoreApplication::notifyInternal (this=0xbfb18a08, receiver=0x873c980, event=0xbfb18694) at kernel/qcoreapplication.cpp:704
#46 0xb5e8dd8e in sendEvent (event=<value optimized out>, receiver=<value optimized out>) at kernel/qcoreapplication.h:215
#47 QTimerInfoList::activateTimers (event=<value optimized out>, receiver=<value optimized out>) at kernel/qeventdispatcher_unix.cpp:617
#48 0xb5e8e48f in QEventDispatcherUNIX::processEvents (this=0x8058a68, flags=) at kernel/qeventdispatcher_unix.cpp:938
#49 0xb616aaea in QEventDispatcherX11::processEvents (this=0x8058a68, flags=...) at kernel/qeventdispatcher_x11.cpp:152
#50 0xb5e5c20d in QEventLoop::processEvents (this=0xbfb18904, flags=) at kernel/qeventloop.cpp:149
#51 0xb5e5c659 in QEventLoop::exec (this=0xbfb18904, flags=...) at kernel/qeventloop.cpp:201
#52 0xb5e607d0 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#53 0xb60a98d4 in QApplication::exec () at kernel/qapplication.cpp:3579
#54 0x0804b1ba in main (argc=1, argv=0xbfb18b24) at /kde/src/KDE/kdepim/kmail/main.cpp:154
Comment 1 Thomas McGuire 2010-02-05 11:14:13 UTC
This might also be related to the storagemodel of the messagelist, which does funky stuff, especially with its ModelInvariantRowMapper.

CC'ing Steve, as this is a model bug.
Comment 2 Christophe Marin 2010-03-31 18:19:18 UTC
Strange, I'm now able to make kmail crash every time but I get a totally different backtrace:

Thread 1 (Thread 0xb2467700 (LWP 28763)):
[KCrash Handler]
#6  0xb5e6c075 in raise () from /lib/libc.so.6
#7  0xb5e6d907 in abort () from /lib/libc.so.6
#8  0xb610dc24 in qt_message_output (msgType=QtFatalMsg, buf=0x6 <Address 0x6 out of bounds>) at global/qglobal.cpp:2248
#9  0xb610de43 in qt_message (msgType=QtFatalMsg, msg=0xb628655c "ASSERT: \"%s\" in file %s, line %d", ap=0xbfea65b4 "9\236]\265\035\236]\265\a\001") at global/qglobal.cpp:2294
#10 0xb610df68 in qFatal (msg=0xb628655c "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2477
#11 0xb610dfe5 in qt_assert (assertion=0xb55d9e39 "!isEmpty()", file=0xb55d9e1d "/usr/include/QtCore/qlist.h", line=263) at global/qglobal.cpp:2011
#12 0xb556c667 in QList<QByteArray>::first() () from /kde/inst/kdepimlibs/lib/libakonadi-kde.so.4
#13 0xb556a474 in Akonadi::MonitorPrivate::emitItemNotification (this=0x827b6b8, msg=..., item=..., collection=..., collectionDest=...) at /kde/src/KDE/kdepimlibs/akonadi/monitor_p.cpp:326
#14 0xb5569652 in Akonadi::MonitorPrivate::emitNotification (this=0x827b6b8, msg=...) at /kde/src/KDE/kdepimlibs/akonadi/monitor_p.cpp:196
#15 0xb556921b in Akonadi::MonitorPrivate::dispatchNotifications (this=0x827b6b8) at /kde/src/KDE/kdepimlibs/akonadi/monitor_p.cpp:156
#16 0xb556a03e in Akonadi::MonitorPrivate::slotNotify (this=0x827b6b8, msgs=...) at /kde/src/KDE/kdepimlibs/akonadi/monitor_p.cpp:293
#17 0xb54cf98a in Akonadi::ChangeRecorderPrivate::slotNotify(QList<Akonadi::NotificationMessage> const&) () from /kde/inst/kdepimlibs/lib/libakonadi-kde.so.4
#18 0xb55670f3 in Akonadi::Monitor::qt_metacall (this=0x812da08, _c=InvokeMetaMethod, _id=20, _a=0xbfea6888) at /kde/build/KDE/kdepimlibs/akonadi/monitor.moc:147
#19 0xb54cf1c1 in Akonadi::ChangeRecorder::qt_metacall (this=0x812da08, _c=InvokeMetaMethod, _id=24, _a=0xbfea6888) at /kde/build/KDE/kdepimlibs/akonadi/changerecorder.moc:72
#20 0xb62208ed in QMetaObject::metacall (object=0x812da08, cl=28763, idx=24, argv=0xbfea6888) at kernel/qmetaobject.cpp:237
#21 0xb622fb00 in QMetaObject::activate (sender=0x81d1510, m=0xb564c78c, local_signal_index=0, argv=0xbfea6888) at kernel/qobject.cpp:3287
#22 0xb55b9aa1 in OrgFreedesktopAkonadiNotificationManagerInterface::notify (this=0x81d1510, _t1=...) at /kde/build/KDE/kdepimlibs/akonadi/notificationmanagerinterface.moc:85
#23 0xb55b9a44 in OrgFreedesktopAkonadiNotificationManagerInterface::qt_metacall (this=0x81d1510, _c=InvokeMetaMethod, _id=0, _a=0xbfea69ac)
    at /kde/build/KDE/kdepimlibs/akonadi/notificationmanagerinterface.moc:73
#24 0xb5bcbd4e in QDBusConnectionPrivate::deliverCall (this=0x807ae68, object=0x81d1510, msg=..., metaTypes=..., slotIdx=0) at qdbusintegrator.cpp:904
#25 0xb5bd82c6 in QDBusCallDeliveryEvent::placeMetaCall(QObject*) () from /usr/lib/libQtDBus.so.4
#26 0xb622c41f in QObject::event (this=0x81d1510, e=0x84bae80) at kernel/qobject.cpp:1240
#27 0xb64697fc in QApplicationPrivate::notify_helper (this=0x808abc0, receiver=0x81d1510, e=0x84bae80) at kernel/qapplication.cpp:4302
#28 0xb6470638 in QApplication::notify (this=0xbfead628, receiver=0x81d1510, e=0x84bae80) at kernel/qapplication.cpp:4185
#29 0xb765a731 in KApplication::notify (this=0xbfead628, receiver=0x81d1510, event=0x84bae80) at /usr/src/debug/kdelibs-4.4.70svn1108969/kdeui/kernel/kapplication.cpp:302
#30 0xb621b50e in QCoreApplication::notifyInternal (this=0xbfead628, receiver=0x81d1510, event=0x84bae80) at kernel/qcoreapplication.cpp:704
#31 0xb621efe7 in sendEvent (receiver=0x0, event_type=0, data=0x8058898) at kernel/qcoreapplication.h:215
#32 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x8058898) at kernel/qcoreapplication.cpp:1345
#33 0xb621f16c in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1238
#34 0xb652b0a9 in sendPostedEvents (this=0x80583a0, flags=...) at ../../src/corelib/kernel/qcoreapplication.h:220
#35 QEventDispatcherX11::processEvents (this=0x80583a0, flags=...) at kernel/qeventdispatcher_x11.cpp:75
#36 0xb6219b7d in QEventLoop::processEvents (this=0xbfea7104, flags=) at kernel/qeventloop.cpp:149
#37 0xb6219fc9 in QEventLoop::exec (this=0xbfea7104, flags=...) at kernel/qeventloop.cpp:201
#38 0xb72c934b in KJob::exec (this=0x8384b80) at /usr/src/debug/kdelibs-4.4.70svn1108969/kdecore/jobs/kjob.cpp:204
#39 0xb4c41f7f in MessageViewer::FancyHeaderStyle::format (this=0x8498408, message=..., strategy=0x849fdc8, vCardName=..., printing=false, topLevel=true)
    at /kde/src/KDE/kdepim/messageviewer/headerstyle.cpp:495
#40 0xb4c1d906 in MessageViewer::ViewerPrivate::writeMsgHeader (this=0x81844b8, aMsg=..., vCardNode=0x0, topLevel=true) at /kde/src/KDE/kdepim/messageviewer/viewer_p.cpp:1231
#41 0xb4c1c899 in MessageViewer::ViewerPrivate::parseMsg (this=0x81844b8) at /kde/src/KDE/kdepim/messageviewer/viewer_p.cpp:1126
#42 0xb4c1c063 in MessageViewer::ViewerPrivate::displayMessage (this=0x81844b8) at /kde/src/KDE/kdepim/messageviewer/viewer_p.cpp:1077
#43 0xb4c282e9 in MessageViewer::ViewerPrivate::updateReaderWin (this=0x81844b8) at /kde/src/KDE/kdepim/messageviewer/viewer_p.cpp:2293
#44 0xb4c2fc0f in MessageViewer::ViewerPrivate::qt_metacall (this=0x81844b8, _c=InvokeMetaMethod, _id=21, _a=0xbfeacd6c) at /kde/build/KDE/kdepim/messageviewer/viewer_p.moc:199
#45 0xb62208ed in QMetaObject::metacall (object=0x81844b8, cl=28763, idx=25, argv=0xbfeacd6c) at kernel/qmetaobject.cpp:237
#46 0xb622fb00 in QMetaObject::activate (sender=0x8184500, m=0xb63335a4, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3287
#47 0xb6283b15 in QTimer::timeout (this=0x8184500) at .moc/release-shared/moc_qtimer.cpp:134
#48 0xb6237aa6 in QTimer::timerEvent (this=0x8184500, e=0xbfead2c4) at kernel/qtimer.cpp:271
#49 0xb622c254 in QObject::event (this=0x8184500, e=0x6) at kernel/qobject.cpp:1204
#50 0xb64697fc in QApplicationPrivate::notify_helper (this=0x808abc0, receiver=0x8184500, e=0xbfead2c4) at kernel/qapplication.cpp:4302
#51 0xb6470638 in QApplication::notify (this=0xbfead628, receiver=0x8184500, e=0xbfead2c4) at kernel/qapplication.cpp:4185
#52 0xb765a731 in KApplication::notify (this=0xbfead628, receiver=0x8184500, event=0xbfead2c4) at /usr/src/debug/kdelibs-4.4.70svn1108969/kdeui/kernel/kapplication.cpp:302
#53 0xb621b50e in QCoreApplication::notifyInternal (this=0xbfead628, receiver=0x8184500, event=0xbfead2c4) at kernel/qcoreapplication.cpp:704
#54 0xb624b7ae in sendEvent (this=0x808b7f0) at kernel/qcoreapplication.h:215
#55 QTimerInfoList::activateTimers (this=0x808b7f0) at kernel/qeventdispatcher_unix.cpp:617
#56 0xb624beaf in QEventDispatcherUNIX::processEvents (this=0x80583a0, flags=) at kernel/qeventdispatcher_unix.cpp:938
#57 0xb652b2da in QEventDispatcherX11::processEvents (this=0x80583a0, flags=...) at kernel/qeventdispatcher_x11.cpp:152
#58 0xb6219b7d in QEventLoop::processEvents (this=0xbfead534, flags=) at kernel/qeventloop.cpp:149
#59 0xb6219fc9 in QEventLoop::exec (this=0xbfead534, flags=...) at kernel/qeventloop.cpp:201
#60 0xb621f240 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#61 0xb64698a4 in QApplication::exec () at kernel/qapplication.cpp:3581
#62 0x0804aeef in main (argc=1, argv=0xbfead724) at /kde/src/KDE/kdepim/kmail/main.cpp:147
Comment 3 Tobias Koenig 2010-06-24 11:34:24 UTC
Hej,

can you still reproduce it?

Ciao,
Tobias
Comment 4 Christophe Marin 2010-06-24 12:06:58 UTC
Nope, didn't see it for a while. Let's assume it was fixed.