Bug 492975 - Applying some faces to some sensors can leave system monitor panel applets invisible and inaccessible
Summary: Applying some faces to some sensors can leave system monitor panel applets in...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Monitor (show other bugs)
Version: 6.1.4
Platform: Other Linux
: HI major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-11 09:14 UTC by cwo
Modified: 2024-10-02 14:14 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cwo 2024-09-11 09:14:53 UTC
SUMMARY

With at least one type of face, selecting it will leave a panel applet invisible and inaccessible. It is still running and present on the panel, but has no width/height in both regular and Panel Configuration mode, cannot be right-clicked, does not show a popup in Panel Config mode, etc. The only way to make the applet usable again seems to be manually editing the plasma-org.kde.plasma.desktop-appletsrc file, changing the face to a different one, then kill/restart plasmashell.  

STEPS TO REPRODUCE
1. Add a system monitor widget (e.g. Total CPU Use) to a panel. Orientation and width do not seem to matter, I've reproduced this on horizontal and vertical panels, 20 and 128 pixels size.
2. Right-click, configure
3. Select "Color Grid", apply, close dialog

OBSERVED RESULT

No more panel applet visible, and no graphical way to change this back

EXPECTED RESULT

Visible system monitor face; if nothing can be displayed at least some interactable space should be used (in Panel Configuration mode at minimum) so the user can interact with this. 

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.1.80, compiled a day ago. Also reproduced with 6.1.4 on Tuxedo OS
KDE Frameworks Version: 6.7.0 (same), also reproduced with 6.5.0 on Tuxedo OS
Qt Version: 6.7.2

ADDITIONAL INFORMATION
Obviously, the affected faces should be fixed to display something, but given that faces can be installed through kns, the applet should probably handle this more gracefully, as third-party faces may also be broken.
Comment 1 Nate Graham 2024-09-19 20:55:28 UTC
Oh wow, this is really bad. Can reproduce.

Color Grid doesn't really make sense as a face for this data visualization; maybe that's part of the problem. Perhaps we can filter out faces that are not applicable given the current data set.
Comment 2 aeneid 2024-09-21 12:12:57 UTC
Another way to reproduce - the way i found this bug:

1. Add system monitor widget
2. Under Sensor details - in "Total sensor" add "Download rate" and "Upload rate"
3. Under Appearance - change "Display style" to "Text only"
4. Hit OK and drag it to the panel

The correct way to configure it is to use the "Sensors" field rather than "Total sensor", but still, it should not result in an invisible widget.
Maybe also add a minimum size or some placeholder text if the widget is not configured correctly.
Comment 3 Bug Janitor Service 2024-09-30 12:04:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libksysguard/-/merge_requests/367
Comment 4 Marco Martin 2024-09-30 15:00:15 UTC
I would imageine some qml error in the facesthemselves, it should probably load a default one after a component error
Comment 5 Marco Martin 2024-09-30 15:00:31 UTC
with a notification about that or something similar
Comment 6 Arjen Hiemstra 2024-10-02 08:09:28 UTC
Git commit 37b84e69dadc10dfe8be4782135741de05e28d4c by Arjen Hiemstra.
Committed on 30/09/2024 at 12:03.
Pushed by ahiemstra into branch 'master'.

faces: Ensure all compact reps always have at least some size

Otherwise we can end up with an applet on a panel that is size 0 which
means there is no way of interacting with it.

M  +1    -1    faces/facepackages/colorgrid/contents/ui/CompactRepresentation.qml
M  +2    -2    faces/facepackages/facegrid/contents/ui/CompactRepresentation.qml
M  +3    -3    faces/facepackages/textonly/contents/ui/CompactRepresentation.qml

https://invent.kde.org/plasma/libksysguard/-/commit/37b84e69dadc10dfe8be4782135741de05e28d4c
Comment 7 Arjen Hiemstra 2024-10-02 11:51:50 UTC
Git commit 3d511ddbca49ad4c2596c374ee95193e28798791 by Arjen Hiemstra.
Committed on 02/10/2024 at 11:47.
Pushed by ahiemstra into branch 'Plasma/6.2'.

faces: Ensure all compact reps always have at least some size

Otherwise we can end up with an applet on a panel that is size 0 which
means there is no way of interacting with it.


(cherry picked from commit 37b84e69dadc10dfe8be4782135741de05e28d4c)

Co-authored-by: Arjen Hiemstra <ahiemstra@heimr.nl>

M  +1    -1    faces/facepackages/colorgrid/contents/ui/CompactRepresentation.qml
M  +2    -2    faces/facepackages/facegrid/contents/ui/CompactRepresentation.qml
M  +3    -3    faces/facepackages/textonly/contents/ui/CompactRepresentation.qml

https://invent.kde.org/plasma/libksysguard/-/commit/3d511ddbca49ad4c2596c374ee95193e28798791