Bug 266538 - Konsole-Msg: KXMLGUIClient::~KXMLGUIClient: 0x9d22690 deleted without having been removed from the factory first
Summary: Konsole-Msg: KXMLGUIClient::~KXMLGUIClient: 0x9d22690 deleted without having ...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: kwrite (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-17 17:23 UTC by Clemens Eisserer
Modified: 2013-05-13 22:42 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Clemens Eisserer 2011-02-17 17:23:09 UTC
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
Comment 1 Ahmad Samir 2011-03-09 01:56:09 UTC
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...
Comment 2 Ahmad Samir 2011-03-09 02:18:14 UTC
(FWIW I see that message/warning in the summary with all debug output turned off via kdebugdialog).
Comment 3 John Moore 2011-03-18 00:49:52 UTC
I'm seeing the same on 4.6.1.  Disconcerting.
Comment 4 michael 2011-04-04 01:59:40 UTC
I seen the same bug manifest in kate as well as kwrite.
Comment 5 michael 2011-04-04 04:11:45 UTC
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.
Comment 6 Clemens Eisserer 2011-04-04 08:20:30 UTC
But at least the warning states, that it wasn't the idea of the kxmlgui authors to let the library handle the cleanup.
Comment 7 Dominik Haumann 2011-04-04 08:39:17 UTC
it probably should be fixed properly.
Comment 8 Thomas Friedrichsmeier 2011-04-04 10:25:06 UTC
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.
Comment 9 Ahmad Samir 2011-04-15 05:40:01 UTC
Any news about this? (it's just getting to be too much seeing this warning a hundred times a day...).
Comment 10 Dominik Haumann 2011-04-16 14:03:34 UTC
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
Comment 11 Dominik Haumann 2011-04-16 14:17:07 UTC
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
Comment 12 Ahmad Samir 2011-04-16 17:31:26 UTC
Thanks!
Comment 13 Dominik Haumann 2011-04-17 01:25:30 UTC
*** Bug 271136 has been marked as a duplicate of this bug. ***
Comment 14 Susan Spencer 2013-02-09 23:42:16 UTC
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?
Comment 15 Andrew 2013-05-07 21:17:58 UTC
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
Comment 16 Christoph Feck 2013-05-13 22:42:29 UTC
This bug was about the text editor application Kate. For Okular, please see bug 261538.