Patch to remove crash in khtmlpart destructor

David Faure faure at kde.org
Sat Jun 25 11:56:58 BST 2005


On Saturday 25 June 2005 01:10, Albert Astals Cid wrote:
> Hi, Arnold in #kde-edu told me to help him debug a segfault that happens when 
> closing his kverbos app. I've tracked to what seems a khtml_part problem. I 
> attach the patch that fixes the problem and the backtrace i get when closing 
> kverbos after having created the khtmlpart.

The bug isn't the one you fixed. The real bug is that the part isn't properly deleted
by the application, so it gets deleted by KLibLoader, but it's really late at that point.

E.g. the BrowserExtension crash is because this is happening in an already-deleted
BrowserExtension. No point in adding an if() for that, the real bug (deleting things in
the wrong order) must be fixed instead.

I suggest to look for where the part is leaked in kverbos. E.g. make sure to pass
a parent QObject when constructing the part.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).





More information about the kfm-devel mailing list