Bug 454988 - (Older?) widgets in the panel make plasmashell misbehave
Summary: (Older?) widgets in the panel make plasmashell misbehave
Status: RESOLVED NOT A BUG
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: 5.24.5
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-07 17:40 UTC by Sergio
Modified: 2022-06-10 15:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio 2022-06-07 17:40:19 UTC
SUMMARY

I am trying to use the system load viewer widget (https://store.kde.org/p/1474921). This is indicated as usable in plasma <=5.20 because it relies on ksysguard that is phased out. However, arch and manjaro provide ksysguard with plasma 5.24.5 and the widget seems to actually work.

What is strange is that the widget causes weird issues with the rest of plasma:

- Often at startup the system does not load the background image if the widget is on the panel. Restarting the plasmashell causes the background image to load correctly;

- The "add widget" action stops working if the widget is in the panel. No left area with the available widgets is shown.

All this is not nice. Either, plasmashell should refuse to install code for a widget that is not supported or, if it allows installing a widget then it should not misbehave in these weird ways.


STEPS TO REPRODUCE
1. Add widget
2. Download and install widget "System load viewer"
3. Add widget to the bottom panel
4. log out and log in again
5. Try "add widget"... It does not work.

OBSERVED RESULT

Adding the widget to the panel causes weird and apparently unrelated faults in plasma.

EXPECTED RESULT

Plasma should either refuse to install a widget or provide some error info if a widget misbehaves, but should not behave itself erratically because of a widget that may be coded according to older standards.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
(available in About System)
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0 
Qt Version: 5.15.4
Comment 1 Nate Graham 2022-06-08 19:21:32 UTC
Unfortunately there isn't really a way for Plasma to know that a widget is going to misbehave. Content you get from store.kde.org has no stability guarantee and you're more or less on your own when you get anything there. That's why there's a warning in the download window that tells you this. :)
Comment 2 Sergio 2022-06-09 20:36:30 UTC
I understand (correct me if I am wrong) that widgets are run in the same process as plasmashell for efficiency reason and that this requires a good behavior on the widget side as in any form of cooperative multitasking. Widgets that hang result in the shell hanging and widgets that crash result in the shell crashing.

This is all fine as long as you are dealing with widgets that are developed together with the shell, but may become critical for third party widgets because the shell has, as you say, no possibility to do anything if the widget misbehaves.

For this reason, maybe it would be preferable/safer to pay an efficiency price for the third party widgets and have them run in their own process with just a proxy in the plasma shell process. As a minor safeguard, it would be good to at least ask to the widget developers to include a "manifest" indicating the versions of plasma the widget has been tested on, in order to make running untested widgets a bit more difficult (e.g. for cases with a version mismatch, one needs to explicitly opt in to test the widget, that is run it until the next login, or forever).
Comment 3 Nate Graham 2022-06-10 15:54:04 UTC
It's not a bad idea. However this would be quite a large architectural change. Feel free to propose it in a new bug report with the "wishlist" priority.