Crash in KXMLGUIFactory (with patch)
Olivier Goffart
ogoffart at tiscalinet.be
Sun Nov 30 15:32:15 GMT 2003
Hello,
I don't know if i do something bad in my application or if it's a bug in the
kxmlgui system. But if it's a bug in kxmlgui , here is a patch that fix it.
Here is the problem.
In Kopete, Plugins can add actions in the chatwindow. This is done via the
XMLGUI system, and transparently. When a chatwindow is closed, the object
which inerits from KXMLGUIClient may or may not be deleted (depends of some
socket activity, ...) And if a new chat window is open if it's not deleted,
we automaticaly reuse it. And we can see sometimes a crash.
The reason:
In KXMLGUIFactory::addClient , if one detect that this client is already
plugged in another factory, it removes it from the old factory. The problem
is that the old factory has been deleted (with the chatwindow) and the
pointer to it hasn't been set to 0L
Maybe it's a flaw in our kopete system. (the fact that we shouldn't delete
the factory and reuse clients later)
But i think that there is no reason to don't allow that, and that's why a
suggest a patch to set the pointer to 0L if the factory is deleted.
Am I allowed to commit?
(and sorry for my bad english)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kxmlguiclient.diff
Type: text/x-diff
Size: 971 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031130/82b29a6e/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031130/82b29a6e/attachment.sig>
More information about the kde-core-devel
mailing list