Version: unspecified (using KDE 4.6.0) OS: Linux When closing Kwrite which has been started from a terminal, I get the following debug-output: write(18036)/kdeui (kdelibs) KXMLGUIClient::~KXMLGUIClient: 0x9d22690 deleted without having been removed from the factory first. This will leak standalone popupmenus and could lead to crashes. kwrite(18036)/kdeui (kdelibs) KXMLGUIClient::~KXMLGUIClient: 0x9c1355c deleted without having been removed from the factory first. This will leak standalone popupmenus and could lead to crashes. Reproducible: Always
I get the same behaviour. This is similar to bug 261538. This crude patch seemed to fix the issue: --- kdebase-4.6.1/kwrite/kwritemain.cpp 2011-02-26 00:33:12.000000000 +0200 +++ kdebase-4.6.1/kwrite/kwritemain.cpp.new 2011-03-05 02:51:43.487138103 +0200 @@ -124,6 +124,7 @@ if (m_view->document()->views().count() == 1) { docList.removeAll(m_view->document()); + guiFactory()->removeClient( m_view ); delete m_view->document(); } no idea if this is a proper fix or not...
(FWIW I see that message/warning in the summary with all debug output turned off via kdebugdialog).
I'm seeing the same on 4.6.1. Disconcerting.
I seen the same bug manifest in kate as well as kwrite.
Excerpt from kxmlguiclient.cpp at the source of the warning: if ( d->m_factory ) { kWarning(240) << this << "deleted without having been removed from the factory first. This will leak standalone popupmenus and could lead to crashes."; d->m_factory->forgetClient(this); } Considering that the removal is autpmaticly done the warning is a bit too strong. There won't be any stability or leak issues as long as the library performs the removal.
But at least the warning states, that it wasn't the idea of the kxmlgui authors to let the library handle the cleanup.
it probably should be fixed properly.
Re comment #5: The removal done at this point in the library only prevents the worst (which used to be causing seemingly unrelated, delayed crashes), but is not (and cannot be made) entirely correct. Correct removal would require calling removeClient(), not forgetClient(). See http://lists.kde.org/?l=kde-core-devel&m=127472920303591&w=2 for detail. So that's why there is the warning, and yes, that should better be fixed.
Any news about this? (it's just getting to be too much seeing this warning a hundred times a day...).
Git commit 4c56004ebbc5b1edb2c94d358c623015f10a1a3d by Dominik Haumann. Committed on 16/04/2011 at 14:08. Pushed by dhaumann into branch 'master'. remove KWrite window from guiFactory on close message on console was: KXMLGUIClient::~KXMLGUIClient: 0x9d22690 deleted without having been removed from the factory first BUG: 266538 M +2 -0 kwrite/kwritemain.cpp http://commits.kde.org/kate/4c56004ebbc5b1edb2c94d358c623015f10a1a3d
Git commit 36631881fabe7c555936cb67ab9798c3e89ecea4 by Dominik Haumann. Committed on 16/04/2011 at 14:22. Pushed by dhaumann into branch 'KDE/4.6'. backport: remove KWrite window from guiFactory on close CCBUG: 266538 M +2 -0 kwrite/kwritemain.cpp http://commits.kde.org/kde-baseapps/36631881fabe7c555936cb67ab9798c3e89ecea4
Thanks!
*** Bug 271136 has been marked as a duplicate of this bug. ***
Running okular 0.14.3 (with KDE 4.8.5) from terminal, i get this message on Ubuntu 12.04. Wasn't this bug fixed?
Same bug on Kubuntu 12.04 LTS: okular(4941)/kdeui (kdelibs) KXMLGUIClient::~KXMLGUIClient: 0x8b82768 deleted without having been removed from the factory first. This will leak standalone popupmenus and could lead to crashes. --- okular -v Qt: 4.8.1 KDE: 4.8.5 (4.8.5) Okular: 0.14.3 -- uname -r 3.2.0-41-generic-pae
This bug was about the text editor application Kate. For Okular, please see bug 261538.