Summary: | [CRASH/LOCKUP] ScrollView in notification applet causes freeze when popup is sized exactly right to oscillate between scrollable and non-scrollable states | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Naxdy <xnaxdy> |
Component: | Notifications | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | crash | CC: | akselmo, kde, nate, qydwhotmail |
Priority: | NOR | ||
Version First Reported In: | master | ||
Target Milestone: | 1.0 | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | demo of the bug |
The scrollview has been changed a lot for Plasma 5.27; can you try again with that release? Yep, still happens. The problem is that some notification elements (like images, e.g. when taking a screenshot) change their vertical size in conjunction with their horizontal size. Images are easy to use as an example: If an image is supposed to preserve its aspect ratio, it will also shrink vertically if it is supposed to shrink horizontally (-> due to scrollbar appearing). Now, the notification is no longer too tall for the view, and the scrollbar is not needed. The image now expands horizontally since the scrollbar is gone, which also causes it to expand vertically (thus requiring a scrollbar again), and this dance continues ad infinitum. Ah that makes sense. Can reproduce that. Seems this is still reproducable in Plasma 6. Operating System: Fedora Linux 40 KDE Plasma Version: 6.1.80 KDE Frameworks Version: 6.3.0 Qt Version: 6.7.0 Kernel Version: 6.8.10-300.fc40.x86_64 (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 3600 6-Core Processor Memory: 15.5 GiB of RAM Graphics Processor: AMD Radeon RX 6600 *** This bug has been marked as a duplicate of bug 460895 *** @Fushan, are you sure this is the same as 460895 ? Mostly, because I worked around the bug. A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4398 Git commit 1cfa672b8b81d17d2f0d469d31395a94b18cb62a by Akseli Lahtinen. Committed on 03/06/2024 at 13:28. Pushed by akselmo into branch 'master'. notifications/ThumbnailStrip.qml: Set thumbnail to fixed size Setting the `implicitHeight` of a thumbnail to a fixed size fixes freezing with plasmashell, where it was constantly calculating a new size for the image, which in turn made the scrollbar calculate a new size for itself, thus freezing plasmashell. Related: bug 460895 M +2 -3 applets/notifications/package/contents/ui/ThumbnailStrip.qml https://invent.kde.org/plasma/plasma-workspace/-/commit/1cfa672b8b81d17d2f0d469d31395a94b18cb62a A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4400 Git commit 5bcad43e21b63cd83ad37eb35ec359103f3acd46 by Akseli Lahtinen. Committed on 03/06/2024 at 13:28. Pushed by akselmo into branch 'Plasma/6.1'. notifications/ThumbnailStrip.qml: Set thumbnail to fixed size Setting the `implicitHeight` of a thumbnail to a fixed size fixes freezing with plasmashell, where it was constantly calculating a new size for the image, which in turn made the scrollbar calculate a new size for itself, thus freezing plasmashell. Related: bug 460895 (cherry picked from commit 1cfa672b8b81d17d2f0d469d31395a94b18cb62a) 83c7b84e notifications/ThumbnailStrip.qml: Set thumbnail to fixed size Co-authored-by: Akseli Lahtinen <akselmo@akselmo.dev> M +2 -3 applets/notifications/package/contents/ui/ThumbnailStrip.qml https://invent.kde.org/plasma/plasma-workspace/-/commit/5bcad43e21b63cd83ad37eb35ec359103f3acd46 |
Created attachment 154140 [details] demo of the bug SUMMARY Since the ScrollBar component does not occupy any physical space when hidden, notifications occupy a little more space. Conversely, when the ScrollBar is visible, notifications get shrunk down by a bit. Although this is intended behavior, this causes the component to enter an infinite loop whenever the notification applet is at a certain size where notifications without a ScrollBar occupy enough space to warrant a ScrollBar, but once the ScrollBar is present, shrink down to a size to where it's no longer needed. We then rapidly go back and forth between big(ger) notifs and no ScrollBar (but overflow) and smal(ler) notifs and a ScrollBar (but no overflow), causing the entire plasmashell to lock up. STEPS TO REPRODUCE 0. Clear your notification history 1. Take two screenshots with spectacle 2. Open the notification applet twice (so that the "show more" button is visible) 3. Open the notification history 4. Slowly increase its vertical size OBSERVED RESULT Plasmashell locks up and becomes entirely unresponsive EXPECTED RESULT Plasmashell does NOT lock up