Am Monday 26 February 2007 schrieb Ingo Klöcker: > A really dirty (and probably quick) solution would be not to delete the > KMMsgInfo object when a corresponding KMMessage is created, but to > remember the pointer to the KMMsgInfo object in the KMMessage object > and then, when the KMMessage is destroyed, to reset the pointer in the > message list to the pointer to the KMMsgInfo object. > This would require changes to (at least): > - KMMessage (add member variable and getter/setter for KMMsgInfo*) > - KMMsgInfo* KMFolderIndex::setIndexEntry( int idx, KMMessage *msg ) >     (which replaces a KMMessage by the corresponding KMMsgInfo) > - KMMessage* KMFolderMaildir::readMsg(int idx) > - KMMessage* KMFolderMbox::readMsg(int idx) >     (which replaces a KMMsgInfo by the corresponding KMMessage) > - void KMMsgList::set(unsigned int idx, KMMsgBase* aMsg) >     (which actually deletes the KMMsgInfo/KMMessage objects; FWIW it's > really shocking that the documentation of this method reads "[...] If > there is already a message at the given index this message is *not*   > deleted. [...]"; this is obviously a lie :-( ) > > The attached patch contains all those required changes. I didn't even > check whether this patch compiles, so please use it with care. I've given the patch a very quick test and the crashes don't occur anymore. I do some more tests tonight at home. Given that this patch fixes the 3.5 branch, should it be commited? I understand that this is no solution for KDE 4, however it would be good to get the 3.5 branch working. And somehow I think this change might fix some other curious crashes as well. Last but not least, thanks for having a look at this, Ingo. Your knowledge of KMail is invaluable. Andreas _______________________________________________ KMail developers mailing list KMail-devel@kde.org https://mail.kde.org/mailman/listinfo/kmail-devel