[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    [PATCH] Re: Obscure but reproducable crash.
From:       Waldo Bastian <bastian () kde ! org>
Date:       2002-06-20 20:37:20
[Download RAW message or body]

On Thursday 20 June 2002 09:56 am, Waldo Bastian wrote:
> This is pretty bad because compacting invalidates the messages without
> notifying KMReaderWin that its current message may be destructed. It
> doesn't take much imagination to think of other scenarios that will crash:
>
> Open a second main window via "File->New Mail Client", select the same
> folder in both windows... delete some messages (this updates both windows,
> neat!) Now RMB the folder in one main window -> "Compact". Go to the other
> main window and RMB on the html view *BANG*

Yay I have a patch that fixes the crash. I don't think it's the right fix 
though. It fixes the crash but it unselects the current message. It seems 
that that is part of the problem, if KMHeaders::msgChanged would be able to 
tell KMReaderWin properly to show the "new" current message then it wouldn't 
crash later on referencing the already deleted msg.

Random remark #1:
It seems KMReaderWin::mMsgBuf can be removed completely, there is one mMsgBuf 
= 0 assignment that needs to be replaced with mMsgBufMD5 = "" used to force 
an update. (Although currently updates are always forced)

Cheers,
Waldo
-- 
bastian@kde.org  |   SuSE Labs KDE Developer  |  bastian@suse.com

-- 
bastian@kde.org  |   SuSE Labs KDE Developer  |  bastian@suse.com



[" " (text/x-diff)]

Index: kmheaders.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmheaders.cpp,v
retrieving revision 1.422
diff -u -p -r1.422 kmheaders.cpp
--- kmheaders.cpp	2002/06/14 02:47:16	1.422
+++ kmheaders.cpp	2002/06/20 19:32:03
@@ -1023,6 +1023,7 @@ void KMHeaders::workAroundQListViewLimit
 //-----------------------------------------------------------------------------
 void KMHeaders::msgChanged()
 {
+  emit maybeDeleting();
   int i = topItemIndex();
   int cur = currentItemIndex();
   if (!isUpdatesEnabled()) return;

_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic