https://bugs.kde.org/show_bug.cgi?id=363753
--- Comment #36 from RJVB <rjvber...@gmail.com> --- (In reply to Yichao Yu from comment #34) > FWIW, doing things just in the destructor doesn't work What is it that doesn't work in that approach? > why I need to do this complicated mess. Apparently some application doesn't > desctruct the Style before unloading the plugin...... Possibly, but in that case one should apparently not try to clean up. Or maybe the plugin is loaded twice in some situations. In that case the crash we're seeing happens when the 2nd one is unloaded. I haven't checked but if your cleanup registry accepts multiple instances of that closure that would indeed explain the crash. Either way, the patch I uploaded does the DBus cleanup at the opportune moment, i.e. when the application is about to be taken down. That way you won't get accesses to stale (deleted) instances. The only possible improvement could be to turn m_dbusConnected into a counter keeping track of the number of connections. I'll have another look at how Breeze and Oxygen approach this, too. -- You are receiving this mail because: You are watching all bug changes.