Bug 434417

Summary: Using a window rule to force all Plasma windows to larger than the screen size size KWin allows causes CPU and memory leaking
Product: [Plasma] kwin Reporter: The Feren OS Dev <ferenosdev>
Component: rulesAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: codezela, isma.af, nate, plasma-bugs
Priority: NOR    
Version: 5.21.2   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: system tray size
note size
calc size

Description The Feren OS Dev 2021-03-15 01:45:25 UTC
SUMMARY
I decided for a laugh to try a suggestion by an internet friend that tried to make Kickoff be at a maximum size, and due to this I found out something interesting:
If you make a window rule from a pinned Plasma Plasmoid popup's window menu for Plasma, with the window set to all types of window, and the only rule being Force size at the maximum possible value it allows in both width and height, and then save... well, looking at top it seems to max out CPUs and eat A LOT of RAM.


STEPS TO REPRODUCE
1. Trigger the window menu via the menu hotkey on a pinned Plasmoid popup (a non-pinned one will cause the menu to immediately close with the popup itself)
2. Make a rule for that window
3. Set the window types to match to be ALL the window types
4. Add the Size effect
5. Set the effect to Force
6. Set the values it forces to to the maximum values (quick way is typing 99999)
7. Save

OBSERVED RESULT
The RAM usage and CPU usage skyrockets because of plasmashell, and eventually the DE dies because of Linux freaking out, probably, since both resource types are being used uncontrollably.

EXPECTED RESULT
The DE wouldn't 'leak' those resources when trying to cope with this...? That or KWin wouldn't even allow this to be possible to begin with.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: KDE neon 5.21.2
(available in About System)
KDE Plasma Version: 5.21.2
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
bruh.
Comment 1 The Feren OS Dev 2021-03-15 01:52:12 UTC
For context: I used Menu -> More Options -> Configure Special Window Settings...
Comment 2 Codezela 2023-05-26 19:13:24 UTC
Created attachment 159272 [details]
system tray size
Comment 3 Codezela 2023-05-26 19:13:50 UTC
Created attachment 159273 [details]
note size
Comment 4 Codezela 2023-05-26 19:14:19 UTC
Created attachment 159274 [details]
calc size
Comment 5 Nate Graham 2023-06-20 19:35:49 UTC
> quick way is typing 99999
Yeahhhhhhhhhhhhhhhhhhhhhh maybe don't do that. :) 

Window Rules are an advanced feature and there's a certain amount of responsibility involved. But we can maybe restrict this to at least not be larger than the screen size. That's not a valid thing that KWin should allow.