global destruction (dis)order
René J.V. Bertin
rjvbertin at gmail.com
Wed Aug 9 11:13:16 UTC 2017
On Wednesday August 09 2017 12:25:51 Kevin Funk wrote:
> IOW: Inside KXMLGUIClient::~KXMLGUIClient(), `this` is just an instance of
> type `KXMLGUIClient`, all other type information has been lost already.
Makes sense though I'm not sure if it wouldn't make more sense if the runtime kept the actual type information (RTTI) until the very end.
> > Looks like I'll have to print a few frames of stack backtrace after that
> > warning if the issue confirms itself. Or turn the qWarning into a qFatal.
Attaching the patch in case anyone else is interested in this kind of thing. Pity that the backtrace function wasn't ported over from the old kdebug.cpp (only in KDELibs4Support), it's very practical on occasion.
FWIW, I tested that patch unconditionally in ~KXMLGUIClient() and noticed that there are a few cases in KDevelop where KXMLGUIClient::setComponentName() is apparently never called.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4003 bytes
Desc: not available
More information about the KDevelop-devel