global destruction (dis)order

René J.V. Bertin rjvbertin at gmail.com
Wed Aug 9 07:41:23 UTC 2017


On Tuesday August 08 2017 22:46:39 Kevin Funk wrote:

>Which plugin? Source code?

A rather simple KTextEditor plugin which I ported myself from KDE4 to KF5:
github:RJVB/ZealSearch

I've been using that plugin for months without ever seeing this issue, but I know that is no guarantee that it is 100% correct. Maybe it's missing some code that tells KTextEditor when to unload it, causing it instead to be unloaded when its turn comes during global destruction?

>Sounds like your plugin is not unloaded "soon enough". Do you still get the 
>warning with your plugin disabled?

I can try (it's not exactly a frequent situation and I haven't yet figured out how to trigger it).
But I don't think it's very likely that my plugin is the sole cause. For one, I hadn't been using it these times and don't think it would have executed its dtor multiple times without crashing before finally choking on a NULL pointer. Also, it doesn't use QMetaObject::invokeMethod(), so that part of the error comes from a different component. 

FWIW, the "0xDEADBEEF deleted without having been removed from the factory first." message would be much more useful if it printed the instance type. Surely that would be possible?

>This commit changed the plugin unloading behavior; but I don't see how that 
>would cause your issue:
>  * 6fb014383 - backgroundparser: Ensure jobs are finished on exit 
>    (2 days ago) <Kevin Funk>

Does it postpone the unloading of all plugins? I've been test-driving that change almost since you proposed it so there too I would expect to have noticed issues before.

Cheers,
R.


More information about the KDevelop-devel mailing list