Bug 131554 - Crash after selecting mail in IMAP folder (assertion on "unknown uid")
Summary: Crash after selecting mail in IMAP folder (assertion on "unknown uid")
Status: RESOLVED INTENTIONAL
Alias: None
Product: kmail
Classification: Applications
Component: IMAP (show other bugs)
Version: 1.9.3
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-30 19:15 UTC by Malte S. Stretz
Modified: 2007-09-14 12:17 UTC (History)
0 users

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 Malte S. Stretz 2006-07-30 19:15:36 UTC
Version:           1.9.3 (using KDE 3.5.3, Gentoo)
Compiler:          gcc version 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)
OS:                Linux (i686) release 2.6.16-gentoo-r9-bug5964-try2

Seems like there are already some similar bugs, I'll see what the Dup Finder says as their description was different.

I've got sub-folders in my sent-mail folder in which I categorize the mail (manually) by year.  Today I sent a mail and afterwards moved a bunch including that one) into the 2006 sub folder.  When I tried to view that mail a few minutes later, KMail crashed.  This was reprodcable after a few restarts.

The debug output says (why "iso-9959-15"??):

kmail: ImapJob::slotGetMessageResult - retrieved part
kmail: (139387412, last 0) Microsoft & Standards Malte S. Stretz, readyToShow true
kmail: [const QTextCodec* KMReaderWin::overrideCodec() const]  mOverrideEncoding == ''
kmail: [const QTextCodec* KMReaderWin::overrideCodec() const]  mOverrideEncoding == ''
kmail: parseMsg(KMMessage* aMsg == aMsg )
kmail: + Text/Plain
kmail:       Inserting one item into MimePartTree
kmail:                 Content-Type: Text/Plain
kmail: partNode::findType() is looking at Text/Plain
kmail: [static KMail::SpamScores KMail::SpamHeaderAnalyzer::getSpamScores(const KMMessage*)]
kmail: ObjectTreeParser::parseObjectTree( node OK, showOnlyOneMimePart: FALSE )
kmail: [const QTextCodec* KMReaderWin::overrideCodec() const]  mOverrideEncoding == ''
kmail: KMMsgIndex::startQuery( . )
kmail: [QString KMail::SearchJob::searchStringFromPattern(const KMSearchPattern*)] NOT HEADER Content-Type "iso-8859-1" NOT HEADER Content-Type "iso-9959-15" HEADER Content-Type "text/plain" NOT HEADER Content-Type "utf-8" NOT HEADER Content-Type "windows-1252";localSearch=(match all of the following)
kmail: [QString KMail::SearchJob::searchStringFromPattern(const KMSearchPattern*)] NOT HEADER Content-Type "iso-8859-1" NOT HEADER Content-Type "iso-9959-15" HEADER Content-Type "text/plain" NOT HEADER Content-Type "utf-8" NOT HEADER Content-Type "windows-1252";localSearch=(match all of the following)
kmail: KMReaderWin  -  finished parsing and displaying of message.
kmail: [QString KMail::SearchJob::searchStringFromPattern(const KMSearchPattern*)] NOT HEADER Content-Type "iso-8859-1" NOT HEADER Content-Type "iso-9959-15" HEADER Content-Type "text/plain" NOT HEADER Content-Type "utf-8" NOT HEADER Content-Type "windows-1252";localSearch=(match all of the following)
kmail: [QString KMail::SearchJob::searchStringFromPattern(const KMSearchPattern*)] NOT HEADER Content-Type "iso-8859-1" NOT HEADER Content-Type "iso-9959-15" HEADER Content-Type "text/plain" NOT HEADER Content-Type "utf-8" NOT HEADER Content-Type "windows-1252";localSearch=(match all of the following)
kmail: 2006: serNum 139387412 matches?false
kmail: 2006: serNum 139387412 matches?false
kmail: serNumForUID: unknown uid 429
kmail: KMFolderImap::checkValidity of: /Sent/
kmail: [void KMSearch::slotSearchFolderResult(KMFolder*, QValueList<Q_UINT32>, const KMSearchPattern*, bool)] 2006 found 5
kmail: KMFolderImap::slotCheckValidityResult of: Sent
kmail: serNumForUID: unknown uid 429
kmail: [void KMSearch::slotSearchFolderResult(KMFolder*, QValueList<Q_UINT32>, const KMSearchPattern*, bool)] Sent found 1
kmail: kmfoldersearch.cpp:432: void KMFolderSearch::addSerNum(Q_UINT32): Assertion `aFolder && (idx != -1)' failed.
*** KMail got signal 6 (Crashing)
KCrash: Application 'kmail' crashing...

The backtrace:

(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(no debugging symbols found)
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1519765840 (LWP 1298)]
[New Thread -1546376272 (LWP 1302)]
[New Thread -1537983568 (LWP 1301)]
[New Thread -1529590864 (LWP 1300)]
[New Thread -1521198160 (LWP 1299)]
[KCrash handler]
#6  0xffffe410 in __kernel_vsyscall ()
#7  0xa5703021 in raise () from /lib/libc.so.6
#8  0xa570473d in abort () from /lib/libc.so.6
#9  0xa56fc8e2 in __assert_fail () from /lib/libc.so.6
#10 0xa7d9c22b in KMFolderSearch::addSerNum ()
   from /usr/kde/3.5/lib/libkmailprivate.so
#11 0xa7d9e303 in KMFolderSearch::qt_invoke ()
   from /usr/kde/3.5/lib/libkmailprivate.so
#12 0xa5e9fca4 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#13 0xa7d99a05 in KMSearch::found () from /usr/kde/3.5/lib/libkmailprivate.so
#14 0xa7d9d639 in KMSearch::slotSearchFolderResult ()
   from /usr/kde/3.5/lib/libkmailprivate.so
#15 0xa7d9d872 in KMSearch::qt_invoke ()
   from /usr/kde/3.5/lib/libkmailprivate.so
#16 0xa5e9fca4 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#17 0xa7c4a046 in FolderStorage::searchResult ()
   from /usr/kde/3.5/lib/libkmailprivate.so
#18 0xa7cd06e4 in KMFolderImap::slotSearchDone ()
   from /usr/kde/3.5/lib/libkmailprivate.so
#19 0xa7cd917f in KMFolderImap::qt_invoke ()
   from /usr/kde/3.5/lib/libkmailprivate.so
#20 0xa5e9fca4 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#21 0xa7e11edc in KMail::SearchJob::searchDone ()
   from /usr/kde/3.5/lib/libkmailprivate.so
#22 0xa7e13ef9 in KMail::SearchJob::slotSearchFolder ()
   from /usr/kde/3.5/lib/libkmailprivate.so
#23 0xa7e1471b in KMail::SearchJob::qt_invoke ()
   from /usr/kde/3.5/lib/libkmailprivate.so
#24 0xa5e9fc2d in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#25 0xa7ccdc1c in KMFolderImap::folderComplete ()
   from /usr/kde/3.5/lib/libkmailprivate.so
#26 0xa7ccdc91 in KMFolderImap::finishMailCheck ()
   from /usr/kde/3.5/lib/libkmailprivate.so
#27 0xa7cd6952 in KMFolderImap::slotListFolderResult ()
   from /usr/kde/3.5/lib/libkmailprivate.so
#28 0xa7cd8ecc in KMFolderImap::qt_invoke ()
   from /usr/kde/3.5/lib/libkmailprivate.so
#29 0xa5e9fca4 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#30 0xa6aa7b7d in KIO::Job::result () from /usr/kde/3.5/lib/libkio.so.4
#31 0xa6aa7c1c in KIO::Job::emitResult () from /usr/kde/3.5/lib/libkio.so.4
#32 0xa6aaa13c in KIO::SimpleJob::slotFinished ()
   from /usr/kde/3.5/lib/libkio.so.4
#33 0xa6ab7fe6 in KIO::ListJob::slotFinished ()
   from /usr/kde/3.5/lib/libkio.so.4
#34 0xa6ac1c0b in KIO::ListJob::qt_invoke () from /usr/kde/3.5/lib/libkio.so.4
#35 0xa5e9fca4 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#36 0xa5ea03c2 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#37 0xa6a9532c in KIO::SlaveInterface::finished ()
   from /usr/kde/3.5/lib/libkio.so.4
#38 0xa6a9817f in KIO::SlaveInterface::dispatch ()
   from /usr/kde/3.5/lib/libkio.so.4
#39 0xa6a96a63 in KIO::SlaveInterface::dispatch ()
   from /usr/kde/3.5/lib/libkio.so.4
#40 0xa6a9296b in KIO::Slave::gotInput () from /usr/kde/3.5/lib/libkio.so.4
#41 0xa6a92d18 in KIO::Slave::qt_invoke () from /usr/kde/3.5/lib/libkio.so.4
#42 0xa5e9fca4 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#43 0xa5ea026a in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#44 0xa61f8450 in QSocketNotifier::activated ()
   from /usr/qt/3/lib/libqt-mt.so.3
#45 0xa5ebc6df in QSocketNotifier::event () from /usr/qt/3/lib/libqt-mt.so.3
#46 0xa5e3b68f in QApplication::internalNotify ()
   from /usr/qt/3/lib/libqt-mt.so.3
#47 0xa5e3b82c in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3
#48 0xa64c4546 in KApplication::notify ()
   from /usr/kde/3.5/lib/libkdecore.so.4
#49 0xa5e2ec03 in QEventLoop::activateSocketNotifiers ()
   from /usr/qt/3/lib/libqt-mt.so.3
#50 0xa5de7dab in QEventLoop::processEvents ()
   from /usr/qt/3/lib/libqt-mt.so.3
#51 0xa5e51d62 in QEventLoop::enterLoop () from /usr/qt/3/lib/libqt-mt.so.3
#52 0xa5e51cb6 in QEventLoop::exec () from /usr/qt/3/lib/libqt-mt.so.3
#53 0xa5e3a83f in QApplication::exec () from /usr/qt/3/lib/libqt-mt.so.3
#54 0x0804aa6e in ?? ()
#55 0xaff3ed80 in ?? ()
#56 0x00000000 in ?? ()
Comment 1 Malte S. Stretz 2006-07-31 09:13:10 UTC
Great.  Now even sending a Mail crashes KMail (after the mail was moved there it seems), not to mention a visit to the sent-mail folder.
Comment 2 Ingo Klöcker 2006-07-31 12:06:44 UTC
You seem to have a search folder. Try whether removing it fixes your problems.
Comment 3 Malte S. Stretz 2006-07-31 12:15:57 UTC
You're right, I have a Search Folder "Wrong CT", didn't notice that.  Seems like I used that one once to find broken mails in my sent mail folder (I think it was that weird Turkish locale bug), thats also the reason for the weird CT in the debug output.

But:  I can't delete it, at least via the GUI, because as soon as I open it, KMail crashes with the same backtrace as before.  I guess I could delete it from the kmailrc but maybe you'd like to debug something before all evidence is gone?
Comment 4 Ingo Klöcker 2006-07-31 14:44:59 UTC
The search folders are stored in ~/.kde/share/apps/kmail/search/. You can simply delete it there.

Wrt debugging, I currently don't have the time and in view of Akonadi it's also probably not worth it. We are well aware of the fact that KMail has several deficiencies but despite of this it's still working pretty good most of the time. So we'd rather spend our limited time getting Akonadi (the real solution for many of KMail's problems) ready than adding more hacks to the stable version of KMail.
Comment 5 Malte S. Stretz 2006-07-31 16:02:13 UTC
Ok, I removed the search folder in question and everything works fine again.  Closing as WONTFIX and will wait a year or so for Akonadi...