https://bugs.kde.org/show_bug.cgi?id=528864
Bug ID: 528864
Summary: [Feature Request] Process isolation and better crash
attribution for third-party plasma widgets
Classification: Plasma
Product: plasmashell
Version First master
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: 1.0
Summary:
Currently, third-party Plasma widgets run directly inside the main plasmashell
process. When a third-party widget encounters a QML binding loop, a theme
incompatibility, or a driver-level crash inside an embedded component (such as
QtWebEngine), it takes down the entire plasmashell process. This creates a poor
user experience, makes debugging difficult for widget authors, and
misattributes the crash to KDE Plasma itself rather than the specific widget.
The Problem:
I am the creator and maintainer of Advanced Weather Widget
(https://github.com/pnedyalkov91/advanced-weather-widget). As a third-party
widget developer, it is practically impossible to reproduce and test across
every distribution, theme engine, GPU driver, and Qt library combination. On my
own development machine (Fedora 45), the widget runs without issues, making it
extremely difficult to track down edge-case crashes reported by users.
Here are two concrete, real-world examples I have dealt with:
1. Theme incompatibilities (e.g., Union theme in KDE Linux): Styled ScrollView
components in the Union theme introduced scrollbar padding that triggered a QML
binding loop and crashed the entire shell (which I eventually traced and fixed
by switching to Flickable in commit 4bbb5e0 -
https://github.com/pnedyalkov91/advanced-weather-widget/commit/4bbb5e0410e4cf2dd48dc16d695d29e5cd15f16b).
2. GPU/Driver conflicts via QtWebEngine: My widget embeds an interactive
weather radar map using QtWebEngine. On certain systems with buggy GPU drivers
or hybrid-GPU Wayland setups, QtWebEngine crashes during rendering, which
immediately kills plasmashell.
When these crashes happen:
• The entire desktop shell crashes and restarts, disrupting the user's
workflow.
• Users naturally assume KDE Plasma is unstable, damaging Plasma's reputation,
even though the root cause is a third-party widget or an underlying driver
conflict triggered by it.
• Crash reports (via DrKonqi) point to plasmashell or underlying Qt libraries,
leaving users and developers with little visibility into which specific widget
triggered the failure.
Proposed Solution:
I would like to propose exploring mechanisms for better isolation and fault
tolerance for third-party Plasmoids:
1. Out-of-process execution / Sandboxing (Long-term ideal): Run third-party
widgets (or heavy components like QtWebEngine views) in separate worker
processes, similar to how modern web browsers isolate tabs and extensions. If a
widget crashes, only that widget's container terminates and displays a "Widget
crashed" placeholder with a reload button, leaving plasmashell completely
intact.
2. Improved Crash Attribution & Graceful Degradation (Short-term /
Alternative): If full process isolation is too complex or resource-heavy due to
QML scene graph constraints, implement better crash interception. If
plasmashell detects that a crash or fatal QML error originated within a
specific widget's context, it could automatically disable that widget on the
next restart, notify the user ("Widget X caused Plasma to crash and has been
temporarily disabled"), and generate a clearer log pointing directly to the
widget's ID.
Expected Benefits:
• Increased Stability: plasmashell becomes resilient to buggy, outdated, or
driver-sensitive third-party code.
• Better UX & Reputation: Users immediately see when a third-party add-on is at
fault rather than blaming KDE Plasma.
• Easier Debugging for Developers: Clearer attribution helps widget developers
receive actionable bug reports instead of generic plasmashell backtraces.
Thank you a lot for your time and for all the great work on KDE Plasma. I hope
you will have resource to implement that :)
--
You are receiving this mail because:
You are watching all bug changes.