Bug 163200

Summary: Crash while doing a dimap refresh-cache [QVector out of range, KMFolderIndex::getMsgBase, FolderStorage::setStatus]
Product: [Unmaintained] kmail Reporter: Thomas Zander <zander>
Component: disconnected IMAPAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: crash CC: andresbajotierra, dawan, g4mba5, lemma, mboquien
Priority: NOR Keywords: triaged
Version: 1.9.51   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Thomas Zander 2008-06-04 12:44:33 UTC
Version:            (using Devel)
Installed from:    Compiled sources

I did a refresh-cache on an account with disconnected IMAP and after 2 seconds it crashed.
Notes;
* I use the d-imap just for my calender/etc folders. So I use the local subscription to remove all other folders from this account.
* I upgraded from kde3 just a couple of days ago.

Application: Kontact (kontact), signal SIGABRT
Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 47268629446704 (LWP 3091)]
[KCrash handler]
#5  0x00002afd93e36765 in raise () from /lib/libc.so.6
#6  0x00002afd93e381c0 in abort () from /lib/libc.so.6
#7  0x00002afd88af6a66 in qt_message_output (msgType=QtFatalMsg, 
    buf=0x7fff22231980 "ASSERT failure in QVector<T>::operator[]: \"index out of range\", file /usr/local/kde4/qt/include/QtCore/qvector.h, line 301")
    at /home/zander/work/kde/qt44/src/corelib/global/qglobal.cpp:2028
#8  0x00002afd88af6b87 in qFatal (
    msg=0x2afd88c6b778 "ASSERT failure in %s: \"%s\", file %s, line %d")
    at /home/zander/work/kde/qt44/src/corelib/global/qglobal.cpp:2230
#9  0x00002afd88af6bda in qt_assert_x (
    where=0x2afd9bbf38ce "QVector<T>::operator[]", 
    what=0x2afd9bbf38ac "index out of range", 
    file=0x2afd9bbf3880 "/usr/local/kde4/qt/include/QtCore/qvector.h", 
    line=301)
    at /home/zander/work/kde/qt44/src/corelib/global/qglobal.cpp:1806
#10 0x00002afd9b927e91 in QVector<KMMsgBase*>::operator[] (this=0xc8df28, i=8)
    at /usr/local/kde4/qt/include/QtCore/qvector.h:301
#11 0x00002afd9b9544f7 in KMFolderIndex::getMsgBase (this=0xc8deb0, idx=8)
    at /home/zander/work/kde/kdepim/kmail/kmfolderindex.h:73
#12 0x00002afd9b8b8fdb in FolderStorage::setStatus (this=0xc8deb0, idx=8, 
    status=@0x7fff22233cd0, toggle=false)
    at /home/zander/work/kde/kdepim/kmail/folderstorage.cpp:1053
#13 0x00002afd9b96bdbe in KMFolderCachedImap::setStatus (this=0xc8deb0, 
    idx=8, status=@0x7fff22233cd0, toggle=false)
    at /home/zander/work/kde/kdepim/kmail/kmfoldercachedimap.cpp:1436
#14 0x00002afd9ba8b3be in KMail::CachedImapJob::slotGetNextMessage (
    this=0x1365940, job=0x1188af0)
    at /home/zander/work/kde/kdepim/kmail/cachedimapjob.cpp:312
#15 0x00002afd9ba8c2a5 in KMail::CachedImapJob::qt_metacall (this=0x1365940, 
    _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7fff22233ea0)
    at /home/zander/work/kde/current/kdepim/kmail/cachedimapjob.moc:101
#16 0x00002afd88c22edf in QMetaObject::activate (sender=0x1188af0, 
    from_signal_index=7, to_signal_index=7, argv=0x7fff22233ea0)
    at /home/zander/work/kde/qt44/src/corelib/kernel/qobject.cpp:2971
#17 0x00002afd88c23465 in QMetaObject::activate (sender=0x1188af0, 
    m=0x2afd895daf60, local_signal_index=3, argv=0x7fff22233ea0)
    at /home/zander/work/kde/qt44/src/corelib/kernel/qobject.cpp:3041
#18 0x00002afd89272b23 in KJob::result ()
   from /usr/local/kde4/lib/libkdecore.so.5
#19 0x00002afd8927301e in KJob::emitResult ()
   from /usr/local/kde4/lib/libkdecore.so.5
#20 0x00002afd89cff89e in KIO::SimpleJob::slotFinished ()
   from /usr/local/kde4/lib/libkio.so.5
#21 0x00002afd89cffc69 in KIO::TransferJob::slotFinished ()
   from /usr/local/kde4/lib/libkio.so.5
#22 0x00002afd89d0639e in KIO::TransferJob::qt_metacall ()
   from /usr/local/kde4/lib/libkio.so.5
#23 0x00002afd88c22edf in QMetaObject::activate (sender=0x112f570, 
    from_signal_index=8, to_signal_index=8, argv=0x0)
    at /home/zander/work/kde/qt44/src/corelib/kernel/qobject.cpp:2971
#24 0x00002afd88c23465 in QMetaObject::activate (sender=0x112f570, 
    m=0x2afd8a0d0be0, local_signal_index=4, argv=0x0)
    at /home/zander/work/kde/qt44/src/corelib/kernel/qobject.cpp:3041
#25 0x00002afd89d9db2c in KIO::SlaveInterface::finished ()
   from /usr/local/kde4/lib/libkio.so.5
#26 0x00002afd89d9f56f in KIO::SlaveInterface::dispatch ()
   from /usr/local/kde4/lib/libkio.so.5
#27 0x00002afd89d9fee8 in KIO::SlaveInterface::dispatch ()
   from /usr/local/kde4/lib/libkio.so.5
#28 0x00002afd89d93745 in KIO::Slave::gotInput ()
   from /usr/local/kde4/lib/libkio.so.5
#29 0x00002afd89d9494d in KIO::Slave::qt_metacall ()
   from /usr/local/kde4/lib/libkio.so.5
#30 0x00002afd88c22edf in QMetaObject::activate (sender=0x1101f00, 
    from_signal_index=4, to_signal_index=4, argv=0x0)
    at /home/zander/work/kde/qt44/src/corelib/kernel/qobject.cpp:2971
#31 0x00002afd88c23465 in QMetaObject::activate (sender=0x1101f00, 
    m=0x2afd8a0ca580, local_signal_index=0, argv=0x0)
    at /home/zander/work/kde/qt44/src/corelib/kernel/qobject.cpp:3041
#32 0x00002afd89cd256a in KIO::Connection::readyRead ()
   from /usr/local/kde4/lib/libkio.so.5
#33 0x00002afd89cd343a in KIO::ConnectionPrivate::dequeue ()
   from /usr/local/kde4/lib/libkio.so.5
#34 0x00002afd89cd42bc in KIO::Connection::qt_metacall ()
   from /usr/local/kde4/lib/libkio.so.5
#35 0x00002afd88c1c86d in QMetaCallEvent::placeMetaCall (this=0xdb2a80, 
    object=0x1101f00)
    at /home/zander/work/kde/qt44/src/corelib/kernel/qobject.cpp:505
#36 0x00002afd88c21f2c in QObject::event (this=0x1101f00, e=0xdb2a80)
    at /home/zander/work/kde/qt44/src/corelib/kernel/qobject.cpp:1101
#37 0x00002afd922723a5 in QApplicationPrivate::notify_helper (this=0x62e180, 
    receiver=0x1101f00, e=0xdb2a80)
    at /home/zander/work/kde/qt44/src/gui/kernel/qapplication.cpp:3742
#38 0x00002afd922726c4 in QApplication::notify (this=0x7fff22235400, 
    receiver=0x1101f00, e=0xdb2a80)
    at /home/zander/work/kde/qt44/src/gui/kernel/qapplication.cpp:3336
#39 0x00002afd897fa220 in KApplication::notify ()
   from /usr/local/kde4/lib/libkdeui.so.5
#40 0x00002afd88c0bd99 in QCoreApplication::notifyInternal (
    this=0x7fff22235400, receiver=0x1101f00, event=0xdb2a80)
    at /home/zander/work/kde/qt44/src/corelib/kernel/qcoreapplication.cpp:557
#41 0x00002afd88c1034f in QCoreApplication::sendEvent (receiver=0x1101f00, 
    event=0xdb2a80)
    at /home/zander/work/kde/qt44/src/corelib/kernel/qcoreapplication.h:185
#42 0x00002afd88c0c3ec in QCoreApplicationPrivate::sendPostedEvents (
    receiver=0x0, event_type=0, data=0x60a160)
    at /home/zander/work/kde/qt44/src/corelib/kernel/qcoreapplication.cpp:1168
#43 0x00002afd88c0c6bc in QCoreApplication::sendPostedEvents (receiver=0x0, 
    event_type=0)
    at /home/zander/work/kde/qt44/src/corelib/kernel/qcoreapplication.cpp:1061
#44 0x00002afd88c416fd in QCoreApplication::sendPostedEvents ()
    at ../../include/QtCore/../../../../qt44/src/corelib/kernel/qcoreapplication.h:190
#45 0x00002afd88c40611 in postEventSourceDispatch (s=0x631840)
    at /home/zander/work/kde/qt44/src/corelib/kernel/qeventdispatcher_glib.cpp:181
#46 0x00002afd9459efd3 in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#47 0x00002afd945a22dd in ?? () from /usr/lib/libglib-2.0.so.0
#48 0x00002afd945a280e in g_main_context_iteration ()
   from /usr/lib/libglib-2.0.so.0
#49 0x00002afd88c3fb98 in QEventDispatcherGlib::processEvents (this=0x621620, 
    flags=@0x7fff22235240)
    at /home/zander/work/kde/qt44/src/corelib/kernel/qeventdispatcher_glib.cpp:295
#50 0x00002afd923281d7 in QGuiEventDispatcherGlib::processEvents (
    this=0x621620, flags=@0x7fff222352a0)
    at /home/zander/work/kde/qt44/src/gui/kernel/qguieventdispatcher_glib.cpp:174
#51 0x00002afd88c085fc in QEventLoop::processEvents (this=0x7fff22235350, 
    flags=@0x7fff22235310)
    at /home/zander/work/kde/qt44/src/corelib/kernel/qeventloop.cpp:119
#52 0x00002afd88c087f8 in QEventLoop::exec (this=0x7fff22235350, 
    flags=@0x7fff22235370)
    at /home/zander/work/kde/qt44/src/corelib/kernel/qeventloop.cpp:170
#53 0x00002afd88c0c7c9 in QCoreApplication::exec ()
    at /home/zander/work/kde/qt44/src/corelib/kernel/qcoreapplication.cpp:815
#54 0x00002afd92272106 in QApplication::exec ()
    at /home/zander/work/kde/qt44/src/gui/kernel/qapplication.cpp:3274
#55 0x0000000000404051 in main (argc=1, argv=0x7fff22235898)
    at /home/zander/work/kde/kdepim/kontact/src/main.cpp:199
#0  0x00002afd93e9f2b0 in nanosleep () from /lib/libc.so.6
Comment 1 Michael Leupold 2009-04-06 08:40:26 UTC
I remember those crashes back in the 4.1 times. However with recent releases I can't reproduce any longer. Did you see a related crash again Thomas?
Comment 2 Dario Andres 2009-05-16 19:54:01 UTC
@lemma: bug 192917 seems related to this (similar backtrace), on trunk. Thanks
Comment 3 Christophe Marin 2009-07-06 17:38:18 UTC
*** Bug 192917 has been marked as a duplicate of this bug. ***
Comment 4 Dario Andres 2009-09-19 21:18:11 UTC
*** Bug 207695 has been marked as a duplicate of this bug. ***
Comment 5 Dario Andres 2009-12-12 23:06:39 UTC
From bug 218411:
---
Kontact crashes when going to next folder in Kmail
It happened only once (I have used this version every day for one month), all I
was doing was reading emails.
Comment 6 Dario Andres 2009-12-12 23:06:41 UTC
*** Bug 218411 has been marked as a duplicate of this bug. ***
Comment 7 Myriam Schweingruber 2012-08-19 10:53:02 UTC
Thank you for your report. Kmail1 is currently unmaintained and the code has changed sufficiently in Kmail2 so the backtraces are not really useful anymore. Should you experience the same crash in Kmail 4.8.5 or later, please open a new report for Kmail2. Thank you for your understanding