Persistence of KParts plugins

Antonio Larrosa Jiménez larrosa at kde.org
Mon Jul 14 18:32:48 BST 2003


Hi,

I forgot to ask to Cc: me, as I'm not on the list.

> Your dialog has the plugin as parent? Change that to 0, so that
> the dialog can't be deleted by any other means than itself being closed
> (use e.g. WDestructiveClose).
[...]
> kapp->ref() when showing the dialog, kapp->deref() when closing it.
> This will ensure that the process doesn't exit until the dialog is closed.

Thanks, I've done those things and it works better. I've also copied the DOM
tree as we talked on IRC so that there's no problem when the user navigates
to another web page.

But still, when the dialog appears and it starts downloading, closing the html part
(that is, opening a file icon view instead of khtml, or closing the window) makes it
crash in a KHTML's assert.

The stdout is:
konqueror: KonqMainWindow::openView ok=true bOthersFollowed=false returning true
khtml: KHTMLFactory::~KHTMLFactory
konqueror: /home/antonio/cvs/kde/kdelibs/khtml/misc/loader.cpp:1328: static void khtml::Cache::clear(): La declaración `it.current()->canDelete()' no se cumple.

where the last part is a false assert, and loder.cpp:1328 is the following assert line:

for (QDictIterator<CachedObject> it(*cache); it.current(); ++it)
        assert(it.current()->canDelete());

The first thing I tried to do is to keep a KHTMLFactory reference in the web
archiver plugin so that it isn't destroyed until I finished with it, but
khtml_factory.h is not even installed, so that doesn't seem to be the solution.

Any idea of what's going wrong?

Greetings,

--
Antonio Larrosa Jimenez
KDE developer - larrosa at kde.org
http://developer.kde.org/~larrosa/
Nothing is so good that somebody, somewhere, will not hate it.




More information about the kfm-devel mailing list