Summary: | Infinit loop when running apps using legacy systray | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-knotifications | Reporter: | Sergio Martins <smartins> |
Component: | general | Assignee: | Martin Klapetek <mklapetek> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | ballogyor, jjm, kdelibs-bugs-null, mail, mitya57, nate, scarpino, tcberner, thomas.luebking |
Priority: | NOR | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/frameworks/kstatusnotifieritem/-/commit/c21b7c31ccca5bf200b1001334bc2356cb591c94 | Version Fixed In: | 6.10 |
Sentry Crash Report: |
Description
Sergio Martins
2015-07-30 10:48:08 UTC
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. *** The commit b45544f3d4dd9 is not a proper fix, because if the if the 'QT_QPA_PLATFORMTHEME=kde' is set outside of KDE session and the 'org.kde.StatusNotifierWatcher' D-Bus interface is unavailable or gone, the infinite loop still happens. A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kstatusnotifieritem/-/merge_requests/16 A possibly relevant merge request was started @ https://invent.kde.org/frameworks/knotifications/-/merge_requests/149 Git commit 1683edad6907bcce8a233acb09241ab33f5ce429 by György Balló. Committed on 16/12/2024 at 16:07. Pushed by davidedmundson into branch 'kf5'. Do not crash if KDE platform integration is loaded but SNI is unavailable Checking for the KDE session is not enough as the KDE platform integration can be used outside of KDE if the QT_QPA_PLATFORMTHEME environment variable is set to 'kde'. M +4 -3 src/kstatusnotifieritem.cpp https://invent.kde.org/frameworks/knotifications/-/commit/1683edad6907bcce8a233acb09241ab33f5ce429 Git commit c21b7c31ccca5bf200b1001334bc2356cb591c94 by Balló György, on behalf of György Balló. Committed on 03/03/2025 at 12:18. Pushed by nicolasfella into branch 'master'. Do not crash if KDE platform integration is loaded but SNI is unavailable Checking for the KDE session is not enough as the KDE platform integration can be used outside of KDE if the QT_QPA_PLATFORMTHEME environment variable is set to 'kde'. M +4 -3 src/kstatusnotifieritem.cpp https://invent.kde.org/frameworks/kstatusnotifieritem/-/commit/c21b7c31ccca5bf200b1001334bc2356cb591c94 |