Bug 488974 - Combination of digital clock and media player causes freeze if panel is too thick
Summary: Combination of digital clock and media player causes freeze if panel is too t...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: 6.0.5
Platform: Manjaro Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-22 12:17 UTC by Nicolai Weitkemper
Modified: 2024-06-26 15:08 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.1.2


Attachments
stderr of `plasmashell --replace` (9.52 KB, text/plain)
2024-06-22 12:17 UTC, Nicolai Weitkemper
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolai Weitkemper 2024-06-22 12:17:27 UTC
Created attachment 170812 [details]
stderr of `plasmashell --replace`

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
A specific combination of widgets within a particularly thick panel makes plasmashell freeze with 100% utilization of one CPU core. This started with a Manjaro update, but notably not the 5→6 one but the one to 6.0.5.

STEPS TO REPRODUCE / OBSERVED RESULT
1. You might want to start fresh with a new user account.
2. Create another panel on the left-hand side.
3. Increase its width to 400 (not sure if those are pixels, so YMMV)
4. In the newly created panel, add the digital clock widget and the media player widget below.
You might catch a freeze right then. If not, try the following:
5. Kill and restart plasmashell. (I like to do this quickly with Yakuake.)
6. Now you should definitely have a freeze.
7. You can reduce the thickness again by editing ~/.config/plasmashellrc and changing to something like thickness=200 and verify that plasmashell once again starts normally.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Wayland (but seems to equally affect X11)

ADDITIONAL INFORMATION
HiDPI monitor, but scaling options left to default
I wrote a bit more in a Manjaro forum thread: https://forum.manjaro.org/t/kde-plasmashell-freezes-loading-aborted-after-latest-stable-update-only-mouse-and-yakuake-working/163023/8
Comment 1 Marco Martin 2024-06-26 10:38:07 UTC
Git commit c91e5283632bf2f56445f071e5727f36d4051406 by Marco Martin.
Committed on 26/06/2024 at 10:38.
Pushed by mart into branch 'master'.

Workaround to possible infinite reize loops

check against the following edge case:
The compact representation preferred size is bigger than both the switch
size, and the full representation preferred size.
this can cause in the panel (when is quite big) an infinite resize loop, because
the applet size is bigger than the switch size, then it switches to full
representaiton that has a smaller hint. this causes a resize that will make it
switch to compact representation, making it grow again and switch again

This problem happens with the timer applet which has those incorrect
size hints

M  +22   -2    src/plasmaquick/appletquickitem.cpp
M  +1    -1    src/plasmaquick/appletquickitem_p.h

https://invent.kde.org/plasma/libplasma/-/commit/c91e5283632bf2f56445f071e5727f36d4051406
Comment 2 Marco Martin 2024-06-26 10:40:33 UTC
Git commit abd4653526271a1af6c8c351bf22d709fc799c10 by Marco Martin.
Committed on 26/06/2024 at 10:38.
Pushed by mart into branch 'Plasma/6.1'.

Workaround to possible infinite reize loops

check against the following edge case:
The compact representation preferred size is bigger than both the switch
size, and the full representation preferred size.
this can cause in the panel (when is quite big) an infinite resize loop, because
the applet size is bigger than the switch size, then it switches to full
representaiton that has a smaller hint. this causes a resize that will make it
switch to compact representation, making it grow again and switch again

This problem happens with the timer applet which has those incorrect
size hints


(cherry picked from commit c91e5283632bf2f56445f071e5727f36d4051406)

971ff94c Workaround to possible infinite reize loops

Co-authored-by: Marco Martin <notmart@gmail.com>

M  +22   -2    src/plasmaquick/appletquickitem.cpp
M  +1    -1    src/plasmaquick/private/appletquickitem_p.h

https://invent.kde.org/plasma/libplasma/-/commit/abd4653526271a1af6c8c351bf22d709fc799c10