Bug 492975

Summary: Applying some faces to some sensors can leave system monitor panel applets invisible and inaccessible
Product: [Plasma] plasmashell Reporter: cwo <cwo.kde>
Component: System MonitorAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: major CC: ahiemstra, dark0ne, nate, notmart
Priority: HI    
Version: 6.1.4   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.2.0
Sentry Crash Report:

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