I have recent master of kdepim + kf5, when running on plasma4 (uses legacy systray) app freezes due to infinite loop, with this backtrace: #342 0x00007ffff27e70dd in KStatusNotifierItemPrivate::registerToDaemon (this=0x7fffdec63d00) at /data/extra2/sources/kf5/kdelibs-frameworks/knotifications/src/kstatusnotifieritem.cpp:744 #343 0x00007ffff27e3489 in KStatusNotifierItemPrivate::init (this=0x7fffdec63d00, extraId=...) at /data/extra2/sources/kf5/kdelibs-frameworks/knotifications/src/kstatusnotifieritem.cpp:722 #344 0x00007ffff27e2e00 in KStatusNotifierItem::KStatusNotifierItem (this=0x7fffded410e0, parent=<optimized out>) at /data/extra2/sources/kf5/kdelibs-frameworks/knotifications/src/kstatusnotifieritem.cpp:55 #345 0x00007fffdadf2870 in KDEPlatformSystemTrayIcon::init (this=0x7fffdece20a0) at /data/extra2/sources/kf5/kdelibs-frameworks/frameworkintegration/src/platformtheme/kdeplatformsystemtrayicon.cpp:270 #346 0x00007fffeed41b84 in QSystemTrayIconPrivate::install_sys_qpa (this=this@entry=0x7fffded6bd80) at util/qsystemtrayicon.cpp:684 #347 0x00007fffeed5fcce in QSystemTrayIconPrivate::install_sys (this=this@entry=0x7fffded6bd80) at util/qsystemtrayicon_x11.cpp:262 #348 0x00007fffeed41705 in QSystemTrayIcon::setVisible (this=<optimized out>, visible=<optimized out>) at util/qsystemtrayicon.cpp:271 #349 0x00007ffff27e5ecb in QSystemTrayIcon::show (this=0x2e) at /data/extra2/installation/qt/x86_64-dev/include/QtWidgets/qsystemtrayicon.h:95 #350 KStatusNotifierItemPrivate::setLegacySystemTrayEnabled (this=0x7fffdec63580, enabled=<optimized out>) at /data/extra2/sources/kf5/kdelibs-frameworks/knotifications/src/kstatusnotifieritem.cpp:808 #351 0x00007ffff27e70dd in KStatusNotifierItemPrivate::registerToDaemon (this=0x7fffdec63580) at /data/extra2/sources/kf5/kdelibs-frameworks/knotifications/src/kstatusnotifieritem.cpp:744 #352 0x00007ffff27e3489 in KStatusNotifierItemPrivate::init (this=0x7fffdec63580, extraId=...) at /data/extra2/sources/kf5/kdelibs-frameworks/knotifications/src/kstatusnotifieritem.cpp:722 #353 0x00007ffff27e2e00 in KStatusNotifierItem::KStatusNotifierItem (this=0x7fffdeccd280, parent=<optimized out>) at /data/extra2/sources/kf5/kdelibs-frameworks/knotifications/src/kstatusnotifieritem.cpp:55 (repeats) #354 0x00007fffdadf2870 in KDEPlatformSystemTrayIcon::init (this=0x7fffdece2320) at /data/extra2/sources/kf5/kdelibs-frameworks/frameworkintegration/src/platformtheme/kdeplatformsystemtrayicon.cpp:270 #355 0x00007fffeed41b84 in QSystemTrayIconPrivate::install_sys_qpa (this=this@entry=0x7fffded6ba80) at util/qsystemtrayicon.cpp:684 #356 0x00007fffeed5fcce in QSystemTrayIconPrivate::install_sys (this=this@entry=0x7fffded6ba80) at util/qsystemtrayicon_x11.cpp:262 #357 0x00007fffeed41705 in QSystemTrayIcon::setVisible (this=<optimized out>, visible=<optimized out>) at util/qsystemtrayicon.cpp:271 #358 0x00007ffff27e5ecb in QSystemTrayIcon::show (this=0x2e) at /data/extra2/installation/qt/x86_64-dev/include/QtWidgets/qsystemtrayicon.h:95 #359 KStatusNotifierItemPrivate::setLegacySystemTrayEnabled (this=0x7fffdec62cc0, enabled=<optimized out>) at /data/extra2/sources/kf5/kdelibs-frameworks/knotifications/src/kstatusnotifieritem.cpp:808 #360 0x00007ffff27e70dd in KStatusNotifierItemPrivate::registerToDaemon (this=0x7fffdec62cc0) at /data/extra2/sources/kf5/kdelibs-frameworks/knotifications/src/kstatusnotifieritem.cpp:744 #361 0x00007ffff27e3489 in KStatusNotifierItemPrivate::init (this=0x7fffdec62cc0, extraId=...) at /data/extra2/sources/kf5/kdelibs-frameworks/knotifications/src/kstatusnotifieritem.cpp:722 #362 0x00007ffff27e2e00 in KStatusNotifierItem::KStatusNotifierItem (this=0x7fffdecb91f0, parent=<optimized out>) at /data/extra2/sources/kf5/kdelibs-frameworks/knotifications/src/kstatusnotifieritem.cpp:55 Reproducible: Always Steps to Reproduce: Start korgac, or kmail after enabling systray Qt 5.6 (dev branch)
Thanks for the report > plasma4 (uses legacy systray) What do you mean by legacy systray? Is it the standard shipped one? Or something else? Cause the normal systray in plasma4 shouldn't be the "legacy" one afair. Furthermore, there is a systray availability check in frameworksintegration, can you check you have that QPA plugin installed and loaded?
By legacy, I mean whatever is meant by: KStatusNotifierItemPrivate::setLegacySystemTrayEnabled() Which probably means xembed tray icons ? Yes, looks like I have the plugin installed: KDEPlatformSystemTrayIcon::init() appears in the backtrace To read the backtrace, better start from the bottom, the frames from 362 to 354 are the block that repeats Creating a KStatusNotifierItem() triggers creation of a QSystemTrayIcon::show() which triggers KDEPlatformSystemTrayIcon::init() which triggers another creation of KStatusNotifierItem() and so forth
*** Bug 352881 has been marked as a duplicate of this bug. ***
*** Bug 350255 has been marked as a duplicate of this bug. ***
The code which "triggers" this bug is in qgenericunixservices.cpp in Qt. I'll just paste it here for future reference: static inline QByteArray detectDesktopEnvironment() { const QByteArray xdgCurrentDesktop = qgetenv("XDG_CURRENT_DESKTOP"); if (!xdgCurrentDesktop.isEmpty()) return xdgCurrentDesktop.toUpper(); // KDE, GNOME, UNITY, LXDE, MATE, XFCE... // Classic fallbacks if (!qEnvironmentVariableIsEmpty("KDE_FULL_SESSION")) return QByteArrayLiteral("KDE"); if (!qEnvironmentVariableIsEmpty("GNOME_DESKTOP_SESSION_ID")) return QByteArrayLiteral("GNOME"); // Fallback to checking $DESKTOP_SESSION (unreliable) const QByteArray desktopSession = qgetenv("DESKTOP_SESSION"); if (desktopSession == "gnome") return QByteArrayLiteral("GNOME"); if (desktopSession == "xfce") return QByteArrayLiteral("XFCE"); return QByteArrayLiteral("UNKNOWN"); } Check if you have KDE_FULL_SESSION set, or XDG_CURRENT_DESKTOP set to KDE. If that is the case, then the KDE platform integration is loaed which triggers this issue.
Neverthereless, KDE code should handle this fault condition more gracefully.
*** Bug 350288 has been marked as a duplicate of this bug. ***
Should be "fixed" (as in, it does no longer crash but print a warning) by commit b45544f3d4dd9 in knotifications (sorry, got the bug number wrong)
Looks good reg. bug #350288 (ie. I can confirm the fix) - thanksalot.
*** Bug 362863 has been marked as a duplicate of this bug. ***