global destruction (dis)order
kfunk at kde.org
Wed Aug 9 10:25:51 UTC 2017
On Wednesday, 9 August 2017 11:47:28 CEST René J.V. Bertin wrote:
> On Wednesday August 09 2017 09:57:35 Kevin Funk wrote:
> > m_mWin (used in ZealSearchView::~ZealSearchView()) should indeed be valid
> > at that point; all the other Kate/KTE plugins use the pointer to the main
> > window unconditionally.
> Yeah, there's no reason it would be null at that point if not also null in
> the ctor.
> > No, the object (this) is half-destructed at this point. The warning comes
> > from KXMLGUIClient::~KXMLGUIClient().
> I know. I half expected KXMLGUIClient to inherit a Qt type with meta info
> but no such luck.
> Still, as far as I understand, the standard C++ type_info
> data should persist until the application exits but I'm not getting
> anything useful out of it.
No: Inside the destructor the this pointer is well defined, as are all the
members and bases. The only thing is that the object itself cannot be assumed
anymore as "polymorphic", since the derived components had already been
destroyed. (I shamelessly copied that from .)
IOW: Inside KXMLGUIClient::~KXMLGUIClient(), `this` is just an instance of
type `KXMLGUIClient`, all other type information has been lost already.
> 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.
Kevin Funk | kfunk at kde.org | http://kfunk.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 163 bytes
Desc: This is a digitally signed message part.
More information about the KDevelop-devel