Bug 476745

Summary: Using "Fit Content" option for an Empty Panel asserts in a dev build, doesn't work properly in a release build, and can't be removed using the GUI
Product: [Plasma] plasmashell Reporter: Bacteria <dev.bacteriostat>
Component: PanelAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: dev.bacteriostat, nate, niccolo.venerandi
Priority: NOR Keywords: qt6
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Bacteria 2023-11-09 10:09:20 UTC
SUMMARY
Creating an Empty Panel with "Fit Content" option crashes plasma


STEPS TO REPRODUCE
1. Create an empty panel
2. Enter edit mode and set panel width to "Fit Content"
3. Hover over the panel or just try to use plasmashell
4. Plasmashell crashes

OBSERVED RESULT
Plasmashell crashes and I see the following error: 

ASSERT: "!(max < min)" in file /usr/include/qt6/QtCore/qminmax.h, line 46

When the plasmashell starts, I also see this error. Not sure if it related:
file:///home/daemone/kde6/usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Panel.qml:102:5: QML Connections: Detected function "onActivated" in Connections element. This is probably intended to be a signal handler but no signal of the target matches the name.

EXPECTED RESULT
Not sure how this can be handled. 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: git master
KDE Frameworks Version: git master
Qt Version: 6.6.0
Comment 1 Nate Graham 2023-11-09 19:37:56 UTC
Lol can reproduce. The visuals are broken too.
Comment 2 Nate Graham 2023-11-09 19:38:37 UTC
Aaaand I can't manage to open panel Edit Mode to delete it, either. Lovely.
Comment 3 Nate Graham 2023-11-09 19:41:15 UTC
Looks like in this state, you have to manually edit ~/.config/plasma-org.kde.plasma.desktop-appletsrc to get rid of it!
Comment 4 Bacteria 2023-11-10 04:19:16 UTC
(In reply to Nate Graham from comment #2)
> Aaaand I can't manage to open panel Edit Mode to delete it, either. Lovely.

I guess I should have mentioned that lol
Comment 5 Bug Janitor Service 2023-11-12 17:52:23 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3522
Comment 6 Nate Graham 2023-11-13 15:46:33 UTC
Git commit fa32676426e865a80b41b6bd179a5d2b769f3b49 by Nate Graham, on behalf of Niccolò Venerandi.
Committed on 13/11/2023 at 16:31.
Pushed by ngraham into branch 'master'.

Disallow having a panel smaller than its minimum size

M  +4    -2    shell/panelview.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/fa32676426e865a80b41b6bd179a5d2b769f3b49