Using master. Discovered while trying to reproduce bug 264455 Steps: - Launch KMail, - Select a message with an attachment, RMB/Forward/inline - View / Identity if necessary - Change the identity -> Crash ASSERT: "d->multipartContents.contains( c )" in file /kde/src/KDE/kdepimlibs/kmime/kmime_content.cpp, line 561 (gdb) bt #0 0x00007ffff5254ab5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00007ffff5255fb6 in abort () at abort.c:92 #2 0x00007ffff67bd924 in qt_message_output (msgType=<optimized out>, buf=<optimized out>) at global/qglobal.cpp:2282 #3 0x00007ffff67bdaed in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=0x7ffff690fba8 "ASSERT: \"%s\" in file %s, line %d", ap=0x7fffffff9500) at global/qglobal.cpp:2328 #4 0x00007ffff67bdc85 in qFatal (msg=<optimized out>) at global/qglobal.cpp:2511 #5 0x00007ffff67bdcca in qt_assert (assertion=0x725c <Address 0x725c out of bounds>, file=0x6 <Address 0x6 out of bounds>, line=-1) at global/qglobal.cpp:2027 #6 0x00007ffff1b24201 in KMime::Content::removeContent (this=0x112d200, c=0x112d040, del=true) at /kde/src/KDE/kdepimlibs/kmime/kmime_content.cpp:561 #7 0x00007ffff06283d1 in TemplateParser::TemplateParser::addProcessedBodyToMessage (this=0x7fffffffbc30, body= "\n---------- Forwarded Message ----------\n\nSubject: Test bug\nDate: Friday 22 April 2011, 18:40:03\nFrom: Christophe Giboudeaux <email1@domain.tld>\nTo: email2@domain.tld\n\nhop\n", '-' <repeats 41 times>) at /kde/src/KDE/kdepim/templateparser/templateparser.cpp:1020 #8 0x00007ffff0626406 in TemplateParser::TemplateParser::processWithTemplate (this=0x7fffffffbc30, tmpl= "%REM=\"Default forward template\"%-\n\n---------- Forwarded Message ----------\n\nSubject: %OFULLSUBJECT\nDate: %ODATE, %OTIMELONG\nFrom: %OFROMADDR\n%OADDRESSEESADDR\n\n%TEXT\n", '-' <repeats 41 times>) at /kde/src/KDE/kdepim/templateparser/templateparser.cpp:295 #9 0x00007ffff061e110 in TemplateParser::TemplateParser::process (this=0x7fffffffbc30, aorig_msg=..., afolder=...) at /kde/src/KDE/kdepim/templateparser/templateparser.cpp:271 #10 0x00007ffff061e254 in TemplateParser::TemplateParser::processWithIdentity (this=0x7fffffffbc30, uoid=1258958976, aorig_msg=..., afolder=...) at /kde/src/KDE/kdepim/templateparser/templateparser.cpp:287 #11 0x00007ffff6d609ac in KMComposeWin::slotDelayedApplyTemplate (this=0x6de8d0, job=0x110db70) at /kde/src/KDE/kdepim/kmail/kmcomposewin.cpp:1018 #12 0x00007ffff6d568c3 in KMComposeWin::qt_metacall(enum QMetaObject::Call, int, void **) (this=0x6de8d0, _c=QMetaObject::InvokeMetaMethod, _id=59, _a=0x7fffffffbea0) at /kde/build/KDE/kdepim/kmail/kmcomposewin.moc:263 #13 0x00007ffff68c4a5f in QMetaObject::activate (sender=0x110db70, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffffffbea0) at kernel/qobject.cpp:3278 #14 0x00007ffff7398882 in KJob::result (this=<optimized out>, _t1=0x110db70) at /usr/src/debug/kdelibs-4.6.41git.1304102736/build/kdecore/kjob.moc:194 #15 0x00007ffff73988c1 in KJob::emitResult (this=0x110db70) at /usr/src/debug/kdelibs-4.6.41git.1304102736/kdecore/jobs/kjob.cpp:312 #16 0x00007ffff1794b24 in Akonadi::JobPrivate::delayedEmitResult (this=0x12a4670) at /kde/src/KDE/kdepimlibs/akonadi/job.cpp:144 #17 0x00007ffff1795cc4 in Akonadi::Job::qt_metacall(enum QMetaObject::Call, int, void **) (this=0x110db70, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0x128f980) at /kde/build/KDE/kdepimlibs/akonadi/job.moc:91 #18 0x00007ffff1782507 in Akonadi::ItemFetchJob::qt_metacall (this=0x110db70, _c=QMetaObject::InvokeMetaMethod, _id=34, _a=0x128f980) at /kde/build/KDE/kdepimlibs/akonadi/itemfetchjob.moc:73 #19 0x00007ffff68c437a in QObject::event (this=0x110db70, e=<optimized out>) at kernel/qobject.cpp:1217 #20 0x00007ffff5c78144 in QApplicationPrivate::notify_helper (this=0x662900, receiver=0x110db70, e=0x12aed80) at kernel/qapplication.cpp:4462 #21 0x00007ffff5c806fa in QApplication::notify (this=<optimized out>, receiver=0x110db70, e=0x12aed80) at kernel/qapplication.cpp:4341 #22 0x00007ffff796ec21 in KApplication::notify (this=0x7fffffffcac0, receiver=0x110db70, event=0x12aed80) at /usr/src/debug/kdelibs-4.6.41git.1304102736/kdeui/kernel/kapplication.cpp:311 #23 0x00007ffff68b047c in QCoreApplication::notifyInternal (this=0x7fffffffcac0, receiver=0x110db70, event=0x12aed80) at kernel/qcoreapplication.cpp:731 #24 0x00007ffff68b3c75 in sendEvent (event=0x12aed80, receiver=0x110db70) at kernel/qcoreapplication.h:215 #25 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x612770) at kernel/qcoreapplication.cpp:1372 #26 0x00007ffff5d1e7cd in sendPostedEvents () at ../../src/corelib/kernel/qcoreapplication.h:220 #27 QEventDispatcherX11::processEvents (this=0x611f50, flags=...) at kernel/qeventdispatcher_x11.cpp:75 #28 0x00007ffff68af8d2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149 #29 0x00007ffff68afae5 in QEventLoop::exec (this=0x7fffffffc980, flags=...) at kernel/qeventloop.cpp:201 #30 0x00007ffff68b3f2b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008 #31 0x0000000000403474 in main (argc=2, argv=0x7fffffffcc58) at /kde/src/KDE/kdepim/kmail/main.cpp:145
*** Bug 259903 has been marked as a duplicate of this bug. ***
Created attachment 61452 [details] New crash information added by DrKonqi kmail (2.1.0) on KDE Platform 4.6.4 (4.6.4) using Qt 4.7.3 forwarding a message, choosing to inline it -- Backtrace (Reduced): #11 0x00007f07d6fc09b8 in KMime::Content::removeContent (this=0x1843f80, c=0x17a4c60, del=true) at /usr/src/debug/kde-base/kdepimlibs-4.6.4/kdepimlibs-4.6.4/kmime/kmime_content.cpp:561 #12 0x00007f07cf184290 in TemplateParser::TemplateParser::addProcessedBodyToMessage (this=0x7fff56f687b0, body=...) at /usr/src/debug/kde-base/kdepim-common-libs-4.6.0/kdepim-common-libs-4.6.0/templateparser/templateparser.cpp:1020 #13 0x00007f07cf1861b0 in TemplateParser::TemplateParser::processWithTemplate (this=0x7fff56f687b0, tmpl=...) at /usr/src/debug/kde-base/kdepim-common-libs-4.6.0/kdepim-common-libs-4.6.0/templateparser/templateparser.cpp:951 #14 0x00007f07cf181c70 in TemplateParser::TemplateParser::process (this=0x7fff56f687b0, aorig_msg=<value optimized out>, afolder=<value optimized out>) at /usr/src/debug/kde-base/kdepim-common-libs-4.6.0/kdepim-common-libs-4.6.0/templateparser/templateparser.cpp:271 #15 0x00007f07cfa00319 in MessageComposer::MessageFactory::createForward (this=0x7fff56f68a80) at /usr/src/debug/kde-base/kdepim-common-libs-4.6.0/kdepim-common-libs-4.6.0/messagecomposer/messagefactory.cpp:400
Fixed in 4.7.1/master