[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: Bug#30475: crash when typing f while kmail starts
From: Ingo =?iso-8859-1?q?Kl=F6cker?= <ingo.kloecker () epost ! de>
Date: 2001-08-18 22:29:24
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Samstag, 18. August 2001 15:34, Don Sanders wrote:
> I see. I suspect your line numbers are wrong, that code
> should only get hit if multiple messages are forwarded.
It was indeed the wrong line.
[snip]
> Could you try something, try changing forwardMsg() so that
> it can't be re-entered. Something like:
[snip]
> Does that change fix/avoid the bug?
No. But I found the cause of the crash. KMail crashes in the following
line
win->setCharset(msg->codec()->name(), TRUE);
near the end of KMHeaders::forwardMsg(). The reason for the crash is
msg->codec() == NULL.
I guess the codec of the current message still hasn't been initialized
when the forward action is processed.
The attached simple patch will prevent this crash.
This fix will have to be applied to all message related actions, e.g.
KMHeaders::redirectMsg(), KMHeaders::replyToMsg(), etc., because they
all contain the above line. (I haven't tried if they all crash KMail.)
Regards,
Ingo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE7fuxIGnR+RTDgudgRAsAZAJ0eRNdXUB97a/jBnLrSaybBVbGn2gCfZC29
F1lq0R/5QdcuJ7qrSWF2TsI=
=yf2c
-----END PGP SIGNATURE-----
["kmheaders.cpp.diff" (text/x-diff)]
Index: kmheaders.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmheaders.cpp,v
retrieving revision 1.314
diff -u -3 -p -r1.314 kmheaders.cpp
--- kmheaders.cpp 2001/08/15 16:11:18 1.314
+++ kmheaders.cpp 2001/08/18 22:23:10
@@ -1335,7 +1335,7 @@ void KMHeaders::forwardMsg ()
// forward a single message at most.
KMMessage *msg = currentMsg();
- if (!msg) return;
+ if (!msg || !msg->codec()) return;
QString id = msg->headerField( "X-KMail-Identity" );
if ( id.isEmpty() )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic