SUMMARY I have seen that if a particular panel widget hangs, the whole panel becomes unresponsive to input (both mouse & keyboard). This can be seen better when your system have low memory & some of the widgets get swapped to disk. STEPS TO REPRODUCE 1. Do something which can cause your PC's memory to get exhausted. Then open any intensive widget (such as the application menu, audio menu or digital clock. 2. If your system have swapped those widgets, those will take a few seconds to open. With that time, try moving the mouse over some other widget. They won't respond to mouse hover/click. Even keyboard shortcuts won't work (such as the Super key to open the application menu). 3. This issue can also be reproduced by introducing lag/runtime errors to any widget on purpose. OBSERVED RESULT Anything which is under plasmashell just stops responding to any input. The right-click menu on the desktop, application menu or any other widget doesn't work for a few seconds. EXPECTED RESULT Plasmashell should be responsive even if a widget stops responding. SOFTWARE/OS VERSIONS Linux/KDE Plasma: 5.15.88-1-LTS (64-bit) KDE Plasma Version: 5.26.5 KDE Frameworks Version: 5.102.0 Qt Version: 5.15.8
Right now, widgets get run by the main plasmashell process. We could potentially improve this by giving each widget its own thread. Then a widget couldn't hang or crash plasmashell.
Different threads don't help at all with crashing. A crash in any thread will cause the whole thing to crash. We would need different processes for that. It's probably doable, but with a significant cost, both in terms of complexity and resource usage. So it may not be worth it
Thanks for the clarification!
(In reply to Nicolas Fella from comment #2) > Different threads don't help at all with crashing. A crash in any thread > will cause the whole thing to crash. > > We would need different processes for that. It's probably doable, but with a > significant cost, both in terms of complexity and resource usage. So it may > not be worth it I agree that separate threads won't help during a crash, but it will surely help to improve the responsiveness in general. It can prevent hanging the whole thing if 1 widget hangs for any reason.
*** This bug has been marked as a duplicate of bug 454539 ***