Bug 227367

Summary: kmail crashes when I try to open one specific email
Product: [Applications] kontact Reporter: mark
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: crash CC: mail
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description mark 2010-02-17 15:14:48 UTC
Application: kontact (4.4)
KDE Platform Version: 4.4.00 (KDE 4.4.0) (Compiled from sources)
Qt Version: 4.6.1
Operating System: Linux 2.6.32.7 x86_64
Distribution: "Gentoo Base System release 2.0.1"

-- Information about the crash:
I wrote and sent an email but made a mistake in the receipient address. So the mailer daemon returned a "Delivery Notification: Delivery has failed" message to me.
In that moment when I try to open this email, kmail crashes.
Every other mail works just fine (I have ~2k mails in this folder and about 10k mails in other folders)

I opened this mail with mutt, where I can read it. It is the standard mail complaning about "Reason: Illegal host/domain name found".

Now I sent another testmail with a wrong domain name, received a "Delivery has failed", klick on it and kmail crashes again.

Then I saved this mail into a file and opened this file with kmail: no crash this time (but still crashing with the original mail)

The crash can be reproduced every time.

 -- Backtrace:
Application: Kontact (kontact), signal: Segmentation fault
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib64/libgobject-2.0.so.0.2200.4-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
[Current thread is 1 (Thread 0x7fc4b6482760 (LWP 11952))]

Thread 2 (Thread 0x7fc4ab710710 (LWP 11955)):
#0  0x000000311b80b5f9 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x0000003122c740e1 in QWaitConditionPrivate::wait (this=<value optimized out>, mutex=<value optimized out>, time=<value optimized out>) at thread/qwaitcondition_unix.cpp:85
#2  QWaitCondition::wait (this=<value optimized out>, mutex=<value optimized out>, time=<value optimized out>) at thread/qwaitcondition_unix.cpp:159
#3  0x0000003122c69708 in QThreadPoolThread::run (this=<value optimized out>) at concurrent/qthreadpool.cpp:140
#4  0x0000003122c731e5 in QThreadPrivate::start (arg=<value optimized out>) at thread/qthread_unix.cpp:248
#5  0x000000311b8068e4 in start_thread () from /lib/libpthread.so.0
#6  0x000000311acd0dfd in clone () from /lib/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fc4b6482760 (LWP 11952)):
[KCrash Handler]
#5  0x00000031262c74d0 in QTreeWidgetItem::addChild (this=<value optimized out>, child=<value optimized out>) at itemviews/qtreewidget.cpp:1882
#6  0x00007fc4ae04c9a9 in KMMimePartTreeItem (this=0x25bf880, parent=0x243ec70, node=0x2437ac0, description=..., mimetype=..., encoding=..., size=0, revertOrder=false)
    at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0/kmail/kmmimeparttree.cpp:378
#7  0x00007fc4ae08d8fc in partNode::fillMimePartTree (this=0x2437ac0, parentItem=0x243ec70, mimePartTree=0x0, labelDescr=..., labelCntType=..., labelEncoding=..., size=0, revertOrder=false)
    at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0/kmail/partNode.cpp:549
#8  0x00007fc4ae0698de in KMail::ObjectTreeParser::insertAndParseNewChildNode (this=0x7fff0571e730, startNode=..., content=0x3123074a18 "", cntDesc=0x7fc4ae2bb85c "encapsulated message", append=
    false, addToTextualContent=false) at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0/kmail/objecttreeparser.cpp:232
#9  0x00007fc4ae073593 in KMail::ObjectTreeParser::processMessageRfc822Subtype (this=0x7fff0571e730, node=0x2507830)
    at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0/kmail/objecttreeparser.cpp:1582
#10 0x00007fc4ae085a29 in process (this=0x1ef03e0, otp=0x7fff0571e730, node=0x2507830, result=...) at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0/kmail/bodypartformatter.cpp:116
#11 0x00007fc4ae06a203 in KMail::ObjectTreeParser::parseObjectTree (this=0x7fff0571e730, node=0x2507830) at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0/kmail/objecttreeparser.cpp:318
#12 0x00007fc4ae071a76 in KMail::ObjectTreeParser::stdChildHandling (this=0x7fff0571ea50, child=0x25bf380) at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0/kmail/objecttreeparser.cpp:1278
#13 0x00007fc4ae071c3d in KMail::ObjectTreeParser::processMultiPartMixedSubtype (this=0x7fff0571ea50, node=0x25bf250)
    at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0/kmail/objecttreeparser.cpp:1291
#14 0x00007fc4ae085acf in process (this=0x1ab5cf0, otp=0x7fff0571ea50, node=0x25bf250, result=...) at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0/kmail/bodypartformatter.cpp:118
#15 0x00007fc4ae06a203 in KMail::ObjectTreeParser::parseObjectTree (this=0x7fff0571ea50, node=0x25bf250) at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0/kmail/objecttreeparser.cpp:318
#16 0x00007fc4adedaccd in KMReaderWin::parseMsg (this=0x1b03fb0, aMsg=0x24329a0) at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0/kmail/kmreaderwin.cpp:1611
#17 0x00007fc4adeda201 in KMReaderWin::displayMessage (this=0x1b03fb0) at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0/kmail/kmreaderwin.cpp:1535
#18 0x00007fc4aded9cbe in KMReaderWin::updateReaderWin (this=0x1b03fb0) at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0/kmail/kmreaderwin.cpp:1478
#19 0x00007fc4aded64e7 in KMReaderWin::update (this=0x1b03fb0, observable=0x2432a70) at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0/kmail/kmreaderwin.cpp:903
#20 0x00007fc4ae1230ea in KMail::ISubject::notify (this=0x2432a70) at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0/kmail/isubject.cpp:33
#21 0x00007fc4adde591d in KMMessage::updateBodyPart (this=0x24329a0, partSpecifier=..., data=...) at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0/kmail/kmmessage.cpp:3185
#22 0x00007fc4ae0fce8f in KMail::ImapJob::slotGetMessageResult (this=0x1eeb740, job=0x24f2f60) at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0/kmail/imapjob.cpp:435
#23 0x00007fc4ae0fe604 in KMail::ImapJob::qt_metacall (this=0x1eeb740, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff0571f4e0)
    at /var/tmp/portage/kde-base/kmail-4.4.0/work/kmail-4.4.0_build/kmail/imapjob.moc:88
#24 0x0000003122d75ddf in QMetaObject::activate (sender=<value optimized out>, m=<value optimized out>, local_signal_index=<value optimized out>, argv=<value optimized out>)
    at kernel/qobject.cpp:3267
#25 0x00000031242f7a92 in KJob::result (this=<value optimized out>, _t1=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0_build/kdecore/kjob.moc:194
#26 0x00000031242f7d30 in KJob::emitResult (this=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0/kdecore/jobs/kjob.cpp:312
#27 0x0000003129cf045b in KIO::SimpleJob::slotFinished (this=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0/kio/kio/job.cpp:486
#28 0x0000003129cf0e17 in KIO::TransferJob::slotFinished (this=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0/kio/kio/job.cpp:1058
#29 0x0000003129ceeaa9 in KIO::TransferJob::qt_metacall (this=<value optimized out>, _c=<value optimized out>, _id=<value optimized out>, _a=<value optimized out>)
    at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0_build/kio/jobclasses.moc:367
#30 0x0000003122d75ddf in QMetaObject::activate (sender=<value optimized out>, m=<value optimized out>, local_signal_index=<value optimized out>, argv=<value optimized out>)
    at kernel/qobject.cpp:3267
#31 0x0000003129dafac9 in KIO::SlaveInterface::dispatch (this=<value optimized out>, _cmd=<value optimized out>, rawdata=<value optimized out>)
    at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0/kio/kio/slaveinterface.cpp:175
#32 0x0000003129dace8c in KIO::SlaveInterface::dispatch (this=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0/kio/kio/slaveinterface.cpp:91
#33 0x0000003129da1466 in KIO::Slave::gotInput (this=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0/kio/kio/slave.cpp:324
#34 0x0000003129da1644 in KIO::Slave::qt_metacall (this=<value optimized out>, _c=<value optimized out>, _id=<value optimized out>, _a=<value optimized out>)
    at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0_build/kio/slave.moc:82
#35 0x0000003122d75ddf in QMetaObject::activate (sender=<value optimized out>, m=<value optimized out>, local_signal_index=<value optimized out>, argv=<value optimized out>)
    at kernel/qobject.cpp:3267
#36 0x0000003129cc013d in KIO::ConnectionPrivate::dequeue (this=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0/kio/kio/connection.cpp:82
#37 0x0000003129cc024d in KIO::Connection::qt_metacall (this=<value optimized out>, _c=<value optimized out>, _id=<value optimized out>, _a=<value optimized out>)
    at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0_build/kio/connection.moc:79
#38 0x0000003122d72de9 in QObject::event (this=<value optimized out>, e=<value optimized out>) at kernel/qobject.cpp:1240
#39 0x0000003125da7bfc in QApplicationPrivate::notify_helper (this=<value optimized out>, receiver=<value optimized out>, e=<value optimized out>) at kernel/qapplication.cpp:4298
#40 0x0000003125daf138 in QApplication::notify (this=<value optimized out>, receiver=<value optimized out>, e=<value optimized out>) at kernel/qapplication.cpp:3702
#41 0x0000003127e1c416 in KApplication::notify (this=<value optimized out>, receiver=<value optimized out>, event=<value optimized out>)
    at /var/tmp/portage/kde-base/kdelibs-4.4.0/work/kdelibs-4.4.0/kdeui/kernel/kapplication.cpp:302
#42 0x0000003122d634ab in QCoreApplication::notifyInternal (this=<value optimized out>, receiver=<value optimized out>, event=<value optimized out>) at kernel/qcoreapplication.cpp:704
#43 0x0000003122d65bc6 in QCoreApplication::sendEvent (receiver=<value optimized out>, event_type=<value optimized out>, data=<value optimized out>)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#44 QCoreApplicationPrivate::sendPostedEvents (receiver=<value optimized out>, event_type=<value optimized out>, data=<value optimized out>) at kernel/qcoreapplication.cpp:1345
#45 0x0000003122d8c473 in QCoreApplication::sendPostedEvents (s=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#46 postEventSourceDispatch (s=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:276
#47 0x000000311dc388eb in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#48 0x000000311dc3c1f0 in ?? () from /usr/lib/libglib-2.0.so.0
#49 0x000000311dc3c320 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#50 0x0000003122d8bfd3 in QEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
#51 0x0000003125e430ae in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#52 0x0000003122d61e42 in QEventLoop::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:149
#53 0x0000003122d6221d in QEventLoop::exec (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:201
#54 0x0000003122d65e63 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#55 0x00000000004040ed in _start ()

Possible duplicates by query: bug 227207, bug 226977, bug 226956, bug 226456, bug 225365.

Reported using DrKonqi
Comment 1 Sven Klomp 2010-02-18 09:20:34 UTC
I can confirm this bug. KMail (and thus Kontact) crashes while opening one specific mail in the previous pane.

kontact(28172) KMReaderWin::parseMsg: The root node is not yet processed! Danger!
kontact(28172)/kio (KIOJob) KIO::TransferJob::slotData: mimetype() not emitted when sending first data!; job URL = KUrl("imap://blablabla:143/TNT.intern.Sonstiges.social/;UID=60;SECTION=BODY.PEEK[2.1.1.2]") data size = 4014
*** KMail got signal 11 (Crashing)
KCrash: Application 'kontact' crashing...
Comment 2 Sven Klomp 2010-02-18 09:24:27 UTC
(In reply to comment #1)
> I can confirm this bug. KMail (and thus Kontact) crashes while opening one
> specific mail in the previous pane.

I was talking about the preview pane...
Comment 3 Thomas McGuire 2010-03-05 11:51:38 UTC

*** This bug has been marked as a duplicate of bug 186502 ***