Bug 305248 - kmail often crashes when hitting "l" (lower L) for a list reply
Summary: kmail often crashes when hitting "l" (lower L) for a list reply
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-16 09:15 UTC by Marc Schiffbauer
Modified: 2012-08-31 09:09 UTC (History)
2 users (show)

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


Attachments
New crash information added by DrKonqi (7.61 KB, text/plain)
2012-08-30 21:24 UTC, Marc Schiffbauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Schiffbauer 2012-08-16 09:15:08 UTC
Application: kmail (4.9)
KDE Platform Version: 4.9.00 (Compiled from sources)
Qt Version: 4.8.2
Operating System: Linux 3.5.1-gentoo x86_64
Distribution: "NAME=Gentoo"

-- Information about the crash:
- What I was doing when the application crashed:
It happened reproducable yesterday, then sudenly it worked again. Today after restarting kmail, I wanted to do a list reply, hit "l" and kaboom.

The crash can be reproduced some of the time.

-- Backtrace:
Application: KMail (kmail), signal: Aborted
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f0445807780 (LWP 30410))]

Thread 3 (Thread 0x7f0425a94700 (LWP 30414)):
#0  0x00007f0440857dcc in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f043690c38c in ?? () from /usr/lib64/qt4/libQtWebKit.so.4
#2  0x00007f043690c4b9 in ?? () from /usr/lib64/qt4/libQtWebKit.so.4
#3  0x00007f0440853ec6 in start_thread () from /lib64/libpthread.so.0
#4  0x00007f0442a6b9bd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f0425193700 (LWP 30415)):
#0  0x00007f0442a62da3 in poll () from /lib64/libc.so.6
#1  0x00007f043ac8a456 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f043ac8a584 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f04433f24e6 in QEventDispatcherGlib::processEvents (this=0x7f04200008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f04433c22a2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f04433c24f7 in QEventLoop::exec (this=0x7f0425192e00, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f04432c2f27 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f04432c5f2b in QThreadPrivate::start (arg=0x1143d50) at thread/qthread_unix.cpp:307
#8  0x00007f0440853ec6 in start_thread () from /lib64/libpthread.so.0
#9  0x00007f0442a6b9bd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f0445807780 (LWP 30410)):
[KCrash Handler]
#6  0x00007f04429bab15 in raise () from /lib64/libc.so.6
#7  0x00007f04429bbf8b in abort () from /lib64/libc.so.6
#8  0x00007f04432bb6c4 in qt_message_output (msgType=<optimized out>, buf=<optimized out>) at global/qglobal.cpp:2260
#9  0x00007f04432bb83f in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=0x7f04434269c8 "ASSERT: \"%s\" in file %s, line %d", ap=0x7fff8ead2d78) at global/qglobal.cpp:2306
#10 0x00007f04432bb9ec in qFatal (msg=<optimized out>) at global/qglobal.cpp:2489
#11 0x00007f043ea06827 in MessageCore::StringUtil::mailboxFrom7BitString(QByteArray const&) () from /usr/lib64/libmessagecore.so.4
#12 0x00007f043e733b96 in MessageComposer::MessageFactory::createReply() () from /usr/lib64/libmessagecomposer.so.4
#13 0x00007f04444d793b in KMReplyCommand::execute (this=0x13c10160) at /var/tmp/portage/kde-base/kmail-4.9.49.9999/work/kmail-4.9.49.9999/kmail/kmcommands.cpp:833
#14 0x00007f04444d6861 in KMCommand::slotPostTransfer (this=0x13c10160, result=KMCommand::OK) at /var/tmp/portage/kde-base/kmail-4.9.49.9999/work/kmail-4.9.49.9999/kmail/kmcommands.cpp:268
#15 0x00007f04433d7409 in QMetaObject::activate (sender=0x13c10160, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff8ead3810) at kernel/qobject.cpp:3547
#16 0x00007f04444d654e in KMCommand::messagesTransfered (this=<optimized out>, _t1=KMCommand::OK) at /var/tmp/portage/kde-base/kmail-4.9.49.9999/work/kmail-4.9.49.9999_build/kmail/kmcommands.moc:117
#17 0x00007f04444daad1 in KMCommand::slotJobFinished (this=0x13c10160) at /var/tmp/portage/kde-base/kmail-4.9.49.9999/work/kmail-4.9.49.9999/kmail/kmcommands.cpp:378
#18 0x00007f04433d7409 in QMetaObject::activate (sender=0x119d94a0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff8ead3a00) at kernel/qobject.cpp:3547
#19 0x00007f0444b9ea22 in KJob::result (this=<optimized out>, _t1=0x119d94a0) at /var/tmp/portage/kde-base/kdelibs-4.9.49.9999/work/kdelibs-4.9.49.9999_build/kdecore/kjob.moc:208
#20 0x00007f0444b9ea60 in KJob::emitResult (this=0x119d94a0) at /var/tmp/portage/kde-base/kdelibs-4.9.49.9999/work/kdelibs-4.9.49.9999/kdecore/jobs/kjob.cpp:318
#21 0x00007f04433dc5d6 in QObject::event (this=0x119d94a0, e=<optimized out>) at kernel/qobject.cpp:1195
#22 0x00007f04438f46a4 in notify_helper (e=0x14819990, receiver=0x119d94a0, this=0x10b9e10) at kernel/qapplication.cpp:4551
#23 QApplicationPrivate::notify_helper (this=0x10b9e10, receiver=0x119d94a0, e=0x14819990) at kernel/qapplication.cpp:4523
#24 0x00007f04438f93c1 in QApplication::notify (this=0x7fff8ead44c0, receiver=0x119d94a0, e=0x14819990) at kernel/qapplication.cpp:3933
#25 0x00007f04451dbe66 in KApplication::notify (this=0x7fff8ead44c0, receiver=0x119d94a0, event=0x14819990) at /var/tmp/portage/kde-base/kdelibs-4.9.49.9999/work/kdelibs-4.9.49.9999/kdeui/kernel/kapplication.cpp:311
#26 0x00007f04433c374c in QCoreApplication::notifyInternal (this=0x7fff8ead44c0, receiver=0x119d94a0, event=0x14819990) at kernel/qcoreapplication.cpp:915
#27 0x00007f04433c6faa in sendEvent (event=0x14819990, receiver=0x119d94a0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#28 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=<optimized out>, data=0x10281f0) at kernel/qcoreapplication.cpp:1539
#29 0x00007f04433f2063 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#30 postEventSourceDispatch (s=<optimized out>) at kernel/qeventdispatcher_glib.cpp:279
#31 0x00007f043ac8a173 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#32 0x00007f043ac8a4c0 in ?? () from /usr/lib64/libglib-2.0.so.0
#33 0x00007f043ac8a584 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#34 0x00007f04433f247f in QEventDispatcherGlib::processEvents (this=0x1029ad0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#35 0x00007f044399779e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#36 0x00007f04433c22a2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#37 0x00007f04433c24f7 in QEventLoop::exec (this=0x7fff8ead4390, flags=...) at kernel/qeventloop.cpp:204
#38 0x00007f04433c72c5 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#39 0x0000000000403123 in main (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/kde-base/kmail-4.9.49.9999/work/kmail-4.9.49.9999/kmail/main.cpp:145

Reported using DrKonqi
Comment 1 Laurent Montel 2012-08-16 10:04:44 UTC
on the same mail ?
Comment 2 Marc Schiffbauer 2012-08-16 11:50:16 UTC
Yeah seems to be mail specific... just tested again. One one of the mails it always crashes when hitting "l"
Comment 3 Laurent Montel 2012-08-16 12:40:32 UTC
could you send me in private ?
or store as mbox and attach it to bug report please.
Comment 4 Marc Schiffbauer 2012-08-16 13:08:18 UTC
I will send you a pm
Comment 5 Laurent Montel 2012-08-16 16:48:57 UTC
Ok find the bug.
"Mail-Followup-To" header as more than 1 address
=> so code assert.
Will look at rfc to show if we can add more than 1 address or not
Comment 6 Laurent Montel 2012-08-16 21:45:31 UTC
Git commit 61655e0f31ebbb8c27214774fecc1c9c3588b8b1 by Montel Laurent.
Committed on 16/08/2012 at 23:38.
Pushed by mlaurent into branch 'KDE/4.9'.

Fix Bug 305248 - kmail often crashes when hitting "l" (lower L) for a

list reply

Don't assert some server can send several address.
It's not good to crash

FIXED-IN: 4.9.1

M  +6    -2    messagecore/stringutil.cpp

http://commits.kde.org/kdepim/61655e0f31ebbb8c27214774fecc1c9c3588b8b1
Comment 7 Marc Schiffbauer 2012-08-30 12:08:47 UTC
Today I got the same crash again.

IIRC the bug was in pasring of Mail-Followup-To: Header

The crash mail from today has a Header in following format:

Mail-Followup-To: foo@bar.com, baz@,
	some@address.de, another@domain.de

Please notice the wrong email-Adress in the first line. May that be the cause kmail crashes?
Comment 8 Laurent Montel 2012-08-30 12:15:39 UTC
? backtrace ?
Could you send me in private your message please ?
Comment 9 Marc Schiffbauer 2012-08-30 21:24:28 UTC
Created attachment 73568 [details]
New crash information added by DrKonqi

kmail (4.9.1) on KDE Platform 4.9.00 using Qt 4.8.2

Here is the BT for the new crash. DrKonqui thinks its the same bug...

-- Backtrace (Reduced):
#11 0x00007fd58229e928 in MessageCore::StringUtil::mailboxFrom7BitString(QByteArray const&) () from /usr/lib64/libmessagecore.so.4
#12 0x00007fd581fcbc46 in MessageComposer::MessageFactory::createReply() () from /usr/lib64/libmessagecomposer.so.4
#13 0x00007fd587d70dfb in KMReplyCommand::execute (this=0x8e39cd0) at /var/tmp/portage/kde-base/kmail-4.9.49.9999/work/kmail-4.9.49.9999/kmail/kmcommands.cpp:833
#14 0x00007fd587d6fd21 in KMCommand::slotPostTransfer (this=0x8e39cd0, result=KMCommand::OK) at /var/tmp/portage/kde-base/kmail-4.9.49.9999/work/kmail-4.9.49.9999/kmail/kmcommands.cpp:268
[...]
#16 0x00007fd587d6fa0e in KMCommand::messagesTransfered (this=<optimized out>, _t1=KMCommand::OK) at /var/tmp/portage/kde-base/kmail-4.9.49.9999/work/kmail-4.9.49.9999_build/kmail/kmcommands.moc:117
Comment 10 Laurent Montel 2012-08-31 06:36:58 UTC
Git commit b5b455005afceea6565f411d80e4d767da4babcf by Montel Laurent.
Committed on 31/08/2012 at 08:35.
Pushed by mlaurent into branch 'KDE/4.9'.

Fix Bug 305248 - kmail often crashes when hitting "l" (lower L) for a

list reply

We can't parse address but don't crash

FIXED-IN: 4.9.2

M  +7    -0    messagecore/stringutil.cpp

http://commits.kde.org/kdepim/b5b455005afceea6565f411d80e4d767da4babcf
Comment 11 Laurent Montel 2012-08-31 06:38:42 UTC
Ok we can't decode theses addresses so it crashed.

Fixed now.
Comment 12 Marc Schiffbauer 2012-08-31 08:50:59 UTC
Hi Laurent,

ok, it does not crash anymore. Great! Is it intened that the To: Header is empty after trying list-reply to this mail?

I gues this is because the Follow-Up Header could not be read. How about a warning to the user, that the Header could not be parsed correctly? Or use all addresses that could be read and just strip invalid addresses?
Comment 13 Laurent Montel 2012-08-31 09:09:25 UTC
same problem, we can't parse address.
In to address there is a "foo@, ..."
KMime code is very hard to understand.
So I will look at if possible to fix it but not easy I think.