https://bugs.kde.org/show_bug.cgi?id=363753
--- Comment #32 from RJVB <rjvber...@gmail.com> --- Hmmm, I wonder if this isn't all related to this observation, after connecting Style::disconnectDBus to QCoreApplication::aboutToQuit : #> oxygen-demo5 void QtCurve::Style::connectDBus() QtCurve::Style(0x7f7fa400c600) connected to QCoreApplication::aboutToQuit from QApplication(0x7fff5066dc98) : true org.kde.kwindowsystem: Loaded plugin "/opt/local/share/qt5/plugins/kf5/org.kde.kwindowsystem.platforms/KF5WindowSystemX11Plugin.so" for platform "xcb" void QtCurve::Style::connectDBus() QtCurve::Style(0x7f7fa402ea00) connected to QCoreApplication::aboutToQuit from QApplication(0x7fff5066dc98) : true void QtCurve::Style::connectDBus() QtCurve::Style(0x7f7fa4036000) connected to QCoreApplication::aboutToQuit from QApplication(0x7fff5066dc98) : true void QtCurve::Style::connectDBus() QtCurve::Style(0x7f7fa4036c00) connected to QCoreApplication::aboutToQuit from QApplication(0x7fff5066dc98) : true void QtCurve::Style::connectDBus() QtCurve::Style(0x7f7fa383d000) connected to QCoreApplication::aboutToQuit from QApplication(0x7fff5066dc98) : true void QtCurve::Style::connectDBus() QtCurve::Style(0x7f7fa3852a00) connected to QCoreApplication::aboutToQuit from QApplication(0x7fff5066dc98) : true void QtCurve::Style::connectDBus() QtCurve::Style(0x7f7fa4091200) connected to QCoreApplication::aboutToQuit from QApplication(0x7fff5066dc98) : true void QtCurve::Style::disconnectDBus() QtCurve::Style(0x7f7fa400c600, name = "qtcurve") Disconnecting from "qt_default_session_bus" / ":1.1133" void QtCurve::Style::disconnectDBus() QtCurve::Style(0x7f7fa402ea00, name = "qtcurve") Disconnecting from "qt_default_session_bus" / ":1.1133" void QtCurve::Style::disconnectDBus() QtCurve::Style(0x7f7fa4036000, name = "qtcurve") Disconnecting from "qt_default_session_bus" / ":1.1133" void QtCurve::Style::disconnectDBus() QtCurve::Style(0x7f7fa4036c00, name = "qtcurve") Disconnecting from "qt_default_session_bus" / ":1.1133" void QtCurve::Style::disconnectDBus() QtCurve::Style(0x7f7fa383d000, name = "qtcurve") Disconnecting from "qt_default_session_bus" / ":1.1133" void QtCurve::Style::disconnectDBus() QtCurve::Style(0x7f7fa3852a00, name = "qtcurve") Disconnecting from "qt_default_session_bus" / ":1.1133" void QtCurve::Style::disconnectDBus() QtCurve::Style(0x7f7fa4091200, name = "qtcurve") Disconnecting from "qt_default_session_bus" / ":1.1133" virtual QtCurve::Style::~Style() QtCurve::Style(0x7f7fa402ea00, name = "qtcurve") virtual QtCurve::Style::~Style() QtCurve::Style(0x7f7fa4036000, name = "qtcurve") virtual QtCurve::Style::~Style() QtCurve::Style(0x7f7fa4036c00, name = "qtcurve") virtual QtCurve::Style::~Style() QtCurve::Style(0x7f7fa3852a00, name = "qtcurve") virtual QtCurve::Style::~Style() QtCurve::Style(0x7f7fa383d000, name = "qtcurve") virtual QtCurve::Style::~Style() QtCurve::Style(0x7f7fa4091200, name = "qtcurve") virtual QtCurve::Style::~Style() QtCurve::Style(0x7f7fa400c600, name = "qtcurve") virtual QtCurve::StylePlugin::~StylePlugin() QtCurve::StylePlugin(0x7f7fa3625460) IOW, starting an application leads to a whole series of Style instances being created. It seems reasonable to supposed that only one of those will ultimately be used ... and that doing DBus disconnects in an order that isn't necessarily the same as (or inverse of) the connect order could lead to problems. Now I don't know to what extent it's a bad idea to do multiple connects to the same signals on a given dbus connection (note that they are all disconnected at the end) but apart from that I don't see anything wrong with the patch I'm going to upload in a moment. It makes things a lot simpler by doing away with the home-baked cleanup mechanism and leaving it to the Style class to connect and disconnect to the DBus at a moment that we should be certain that the DBus connection still exists and it will no longer be required. FWIW we could also listen to the QCoreApplication::destroyed signal and ignore DBus connections that we think are still open after that. -- You are receiving this mail because: You are watching all bug changes.