Bug 218278 - KMail crashes when starting because akonadi does not start up fast enough
Summary: KMail crashes when starting because akonadi does not start up fast enough
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: HI crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 226982 232805 246574 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-11 14:43 UTC by Allan Sandfeld
Modified: 2012-06-25 12:04 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Allan Sandfeld 2009-12-11 14:43:14 UTC
Application that crashed: kmail
Version of the application: 1.12.4
KDE Version: 4.3.4 (KDE 4.3.4)
Qt Version: 4.5.2
Operating System: Linux 2.6.31-local-1 i686
Distribution: Debian GNU/Linux unstable (sid)

What I was doing when the application crashed:
The akonadiserver has never been able to start reliably and crashes all the time. This bug however is not about akonadi, but that kmail sometimes crashes when the akonadiserver fails to start. 

This happens quite often when merely reading an email that contains an invite to a meeting.

 -- Backtrace:
Application: KMail (kmail), signal: Segmentation fault
[KCrash Handler]
#6  0xb6d26622 in partNode::nodeId (this=0x85cfea8) at /src/kde/kdepim-4.3/kmail/partNode.cpp:347
#7  0xb6e264de in KMail::PartNodeBodyPart::makeLink (this=0xbfc6b7b4, path=...) at /src/kde/kdepim-4.3/kmail/partnodebodypart.cpp:54
#8  0xaea04d43 in generateLinkURL (this=0xbfc6b6f0, id=...) at /src/kde/kdepim-4.3/plugins/kmail/bodypartformatter/text_calendar.cpp:134
#9  0xb655d656 in KCal::InvitationFormatterHelper::makeLink (this=0xbfc6b6f0, id=..., text=...) at /src/kde/kdepimlibs-4.3/kcal/incidenceformatter.cpp:1428
#10 0xb65639a6 in formatICalInvitationHelper (invitation=..., mCalendar=0xbfc6b6d4, helper=0xbfc6b6f0, noHtmlMode=true) at /src/kde/kdepimlibs-4.3/kcal/incidenceformatter.cpp:1559
#11 0xb65644fa in KCal::IncidenceFormatter::formatICalInvitationNoHtml (invitation=..., mCalendar=0xbfc6b6d4, helper=0xbfc6b6f0) at /src/kde/kdepimlibs-4.3/kcal/incidenceformatter.cpp:1670
#12 0xaea057a2 in format (this=0x9357218, bodyPart=0xbfc6b7b4, writer=0x909ddc0) at /src/kde/kdepim-4.3/plugins/kmail/bodypartformatter/text_calendar.cpp:161
#13 0xb6d13677 in KMail::ObjectTreeParser::parseObjectTree (this=0xbfc6b830, node=0x85cfea8) at /src/kde/kdepim-4.3/kmail/objecttreeparser.cpp:274
#14 0xb6d14498 in KMail::ObjectTreeParser::stdChildHandling (this=0xbfc6b9f0, child=0xaa88218) at /src/kde/kdepim-4.3/kmail/objecttreeparser.cpp:1146
#15 0xb6d1469e in KMail::ObjectTreeParser::processMultiPartAlternativeSubtype (this=0xbfc6b9f0, node=0xa3106c8) at /src/kde/kdepim-4.3/kmail/objecttreeparser.cpp:1193
#16 0xb6d22cbc in process (this=0x87383e0, otp=0xbfc6b9f0, node=0xa3106c8, result=...) at /src/kde/kdepim-4.3/kmail/bodypartformatter.cpp:119
#17 0xb6d13a70 in KMail::ObjectTreeParser::parseObjectTree (this=0xbfc6b9f0, node=0xa3106c8) at /src/kde/kdepim-4.3/kmail/objecttreeparser.cpp:296
#18 0xb6d14498 in KMail::ObjectTreeParser::stdChildHandling (this=0xbfc6bc50, child=0xa3106c8) at /src/kde/kdepim-4.3/kmail/objecttreeparser.cpp:1146
#19 0xb6d1484e in KMail::ObjectTreeParser::processMultiPartMixedSubtype (this=0xbfc6bc50, node=0x85f8d80) at /src/kde/kdepim-4.3/kmail/objecttreeparser.cpp:1159
#20 0xb6d22d7c in process (this=0xa70cea8, otp=0xbfc6bc50, node=0x85f8d80, result=...) at /src/kde/kdepim-4.3/kmail/bodypartformatter.cpp:118
#21 0xb6d13a70 in KMail::ObjectTreeParser::parseObjectTree (this=0xbfc6bc50, node=0x85f8d80) at /src/kde/kdepim-4.3/kmail/objecttreeparser.cpp:296
#22 0xb6b733be in KMReaderWin::parseMsg (this=0x904ca98, aMsg=0xabf3c28) at /src/kde/kdepim-4.3/kmail/kmreaderwin.cpp:1682
#23 0xb6b6122b in KMReaderWin::displayMessage (this=0x904ca98) at /src/kde/kdepim-4.3/kmail/kmreaderwin.cpp:1608
#24 0xb6b61459 in KMReaderWin::updateReaderWin (this=0x904ca98) at /src/kde/kdepim-4.3/kmail/kmreaderwin.cpp:1548
#25 0xb6b61850 in KMReaderWin::update (this=0x904ca98, observable=0x1) at /src/kde/kdepim-4.3/kmail/kmreaderwin.cpp:950
#26 0xb6dcb5aa in KMail::ISubject::notify (this=0xabf3c98) at /src/kde/kdepim-4.3/kmail/isubject.cpp:33
#27 0xb6a66e3f in KMMessage::updateBodyPart (this=0xabf3c28, partSpecifier=..., data=...) at /src/kde/kdepim-4.3/kmail/kmmessage.cpp:3237
#28 0xb6d9c9e7 in KMail::ImapJob::slotGetMessageResult (this=0xaba8de0, job=0xa981930) at /src/kde/kdepim-4.3/kmail/imapjob.cpp:435
#29 0xb6da0fb4 in KMail::ImapJob::qt_metacall (this=0xaba8de0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbfc6c16c) at /src/kde/kdepim-4.3/build2/kmail/imapjob.moc:82
#30 0xb5f9bb4b in QMetaObject::activate(QObject*, int, int, void**) () from /opt/qt-4.5/lib/libQtCore.so.4
#31 0xb5f9bf43 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /opt/qt-4.5/lib/libQtCore.so.4
#32 0xb72695e4 in KJob::result (this=0xa981930, _t1=0xa981930) at /src/kde/kdelibs-4.3/build2/kdecore/kjob.moc:188
#33 0xb7269aba in KJob::emitResult (this=0xa981930) at /src/kde/kdelibs-4.3/kdecore/jobs/kjob.cpp:304
#34 0xb61ba795 in KIO::SimpleJob::slotFinished (this=0xa981930) at /src/kde/kdelibs-4.3/kio/kio/job.cpp:477
#35 0xb61bb36e in KIO::TransferJob::slotFinished (this=0xa981930) at /src/kde/kdelibs-4.3/kio/kio/job.cpp:948
#36 0xb61bf1b3 in KIO::TransferJob::qt_metacall (this=0xa981930, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0xbfc6c3c8) at /src/kde/kdelibs-4.3/build2/kio/jobclasses.moc:343
#37 0xb5f9bb4b in QMetaObject::activate(QObject*, int, int, void**) () from /opt/qt-4.5/lib/libQtCore.so.4
#38 0xb5f9bf43 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /opt/qt-4.5/lib/libQtCore.so.4
#39 0xb6294668 in KIO::SlaveInterface::finished (this=0x9355d40) at /src/kde/kdelibs-4.3/build2/kio/slaveinterface.moc:165
#40 0xb6298a5c in KIO::SlaveInterface::dispatch (this=0x9355d40, _cmd=104, rawdata=...) at /src/kde/kdelibs-4.3/kio/kio/slaveinterface.cpp:175
#41 0xb6294b96 in KIO::SlaveInterface::dispatch (this=0x9355d40) at /src/kde/kdelibs-4.3/kio/kio/slaveinterface.cpp:91
#42 0xb628439e in KIO::Slave::gotInput (this=0x9355d40) at /src/kde/kdelibs-4.3/kio/kio/slave.cpp:323
#43 0xb62866fb in KIO::Slave::qt_metacall (this=0x9355d40, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0xbfc6c6a8) at /src/kde/kdelibs-4.3/build2/kio/slave.moc:76
#44 0xb5f9bb4b in QMetaObject::activate(QObject*, int, int, void**) () from /opt/qt-4.5/lib/libQtCore.so.4
#45 0xb5f9bf43 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /opt/qt-4.5/lib/libQtCore.so.4
#46 0xb617d758 in KIO::Connection::readyRead (this=0x9389aa0) at /src/kde/kdelibs-4.3/build2/kio/connection.moc:86
#47 0xb617fa7f in KIO::ConnectionPrivate::dequeue (this=0x938ea80) at /src/kde/kdelibs-4.3/kio/kio/connection.cpp:82
#48 0xb618053e in KIO::Connection::qt_metacall (this=0x9389aa0, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x9b8b4f8) at /src/kde/kdelibs-4.3/build2/kio/connection.moc:73
#49 0xb5f98c3b in QMetaCallEvent::placeMetaCall(QObject*) () from /opt/qt-4.5/lib/libQtCore.so.4
#50 0xb5f9cf70 in QObject::event(QEvent*) () from /opt/qt-4.5/lib/libQtCore.so.4
#51 0xb551a59c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /opt/qt-4.5/lib/libQtGui.so.4
#52 0xb551cff3 in QApplication::notify(QObject*, QEvent*) () from /opt/qt-4.5/lib/libQtGui.so.4
#53 0xb75dcc1e in KApplication::notify (this=0xbfc6cf18, receiver=0x9389aa0, event=0x9609a98) at /src/kde/kdelibs-4.3/kdeui/kernel/kapplication.cpp:302
#54 0xb5f885a2 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /opt/qt-4.5/lib/libQtCore.so.4
#55 0xb5f8b2a9 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /opt/qt-4.5/lib/libQtCore.so.4
#56 0xb5f8b43e in QCoreApplication::sendPostedEvents(QObject*, int) () from /opt/qt-4.5/lib/libQtCore.so.4
#57 0xb5fb67e0 in ?? () from /opt/qt-4.5/lib/libQtCore.so.4
#58 0xb38c8e98 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#59 0xb38cc623 in ?? () from /lib/libglib-2.0.so.0
#60 0xb38cc7a8 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#61 0xb5fb6439 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/qt-4.5/lib/libQtCore.so.4
#62 0xb55c0856 in ?? () from /opt/qt-4.5/lib/libQtGui.so.4
#63 0xb5f8706b in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/qt-4.5/lib/libQtCore.so.4
#64 0xb5f8752a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/qt-4.5/lib/libQtCore.so.4
#65 0xb5f8b501 in QCoreApplication::exec() () from /opt/qt-4.5/lib/libQtCore.so.4
#66 0xb551a418 in QApplication::exec() () from /opt/qt-4.5/lib/libQtGui.so.4
#67 0x0804abc0 in main (argc=156810320, argv=0xaa88210) at /src/kde/kdepim-4.3/kmail/main.cpp:146

Reported using DrKonqi
Comment 1 Allan Sandfeld 2009-12-16 16:59:06 UTC
It should be noted that after clicking on the message the focus is moved but the message does not appear in the message window. The crash happens when you select another message. If you instead wait 2 minutes the message does appear and no crash happens.

This is likely a case where the asynchronous processing can not properly deal with actions taken before it is finished. It might be hard to debug without a crashy akonadiserver, but it might be possible to replicate by just delaying the answer long enough that you can click on another message..
Comment 2 Maciej Mrozowski 2010-01-15 10:38:06 UTC
I can reliably reproduce the problem with kmail from KDE SC RC1 on Gentoo, using Qt 4.6.0.
Comment 3 jmaldrich 2010-02-25 15:02:10 UTC
I cannot even get KMail to start up properly on Fedora 11 as Akonadiserver tries to start up but hangs on startup and eventually crashes, taking KMail with it.
Comment 4 jmaldrich 2010-02-25 16:44:17 UTC
I was able to get KMail to work again by renaming ~/local/share/akonadi" to akonadi-old and starting KMail. I suspect something was hosed in the config, but I don't know what. I also suspect that the problem occurred because I had KMail open when the update was installed.
Comment 5 Björn Ruberg 2010-03-08 00:10:18 UTC
*** Bug 226982 has been marked as a duplicate of this bug. ***
Comment 6 Björn Ruberg 2010-04-02 12:27:27 UTC
*** Bug 232805 has been marked as a duplicate of this bug. ***
Comment 7 Björn Ruberg 2010-04-05 23:24:52 UTC
*** Bug 230247 has been marked as a duplicate of this bug. ***
Comment 8 Frédéric COIFFIER 2010-07-22 19:31:25 UTC
I have a similar problem with KDE 4.5rc2 : KMail stops even if Akonadi Self Test doesn't report any error.

When I restore my last KDE Session, KDE restores KMail which launch Akonadi and the Akonadi Self Test which reports no error.
But, by clicking Ok on the Akonadi Self Test, it closes KMail (but it seems there is no crash).

I don't if there is a link but Akonadi requires a KWallet access to retrieve a password for a resource. I don't know if this delay could explain why KMail stops whereas no Akonadi error is reported.
Comment 9 Björn Ruberg 2010-08-05 23:39:22 UTC
*** Bug 246627 has been marked as a duplicate of this bug. ***
Comment 10 Björn Ruberg 2010-08-05 23:41:21 UTC
*** Bug 246574 has been marked as a duplicate of this bug. ***
Comment 11 Björn Ruberg 2010-08-05 23:44:25 UTC
This is a big problem that I encounter on several systems. First start after logon in kmail fails because of akonadi - but akonadi runs fine later and the second start of kmail always works. 

I noticed that this does not happen if I start kmail without any other system load. But it does happen as soon as I start several applications in parallel. That makes me believe that the main problem is that akonadi is simply starting up slower than kmail expects it.
Comment 12 Shlomi Fish 2010-11-19 11:21:53 UTC
I'm getting a "KMail encountered a fatal error and will terminate now. The error was: Unknown resource". 

This bug still exists in kmail-4.5.76-0.svn1196728.1mdv2011.0 on Mandriva Linux Cooker. It makes me completely unable to use kmail. How come it wasn't fixed yet? There has been zero activity on this bug report for three months and it's marked "HI" and "Critical". Please fix this bug already.
Comment 13 Shlomi Fish 2010-11-19 12:47:38 UTC
(In reply to comment #12)
> I'm getting a "KMail encountered a fatal error and will terminate now. The
> error was: Unknown resource". 
> 
> This bug still exists in kmail-4.5.76-0.svn1196728.1mdv2011.0 on Mandriva Linux
> Cooker. It makes me completely unable to use kmail. How come it wasn't fixed
> yet? There has been zero activity on this bug report for three months and it's
> marked "HI" and "Critical". Please fix this bug already.

I found a workaround to this bug - what I did was run akonadiserver from a konsole command line and then KMail started without an error. However, now I don't see all my ~/.Mail maildirs, even after I enabled them explicitly in the configuration dialogue. But this seems like a different bug, which I'll report on a new bug.
Comment 14 Unknown 2012-06-24 17:09:36 UTC
This bug is now fixed. Look at release KDE 4.9 and https://bugs.kde.org/show_bug.cgi?id=124111