Bug 492819

Summary: kwin_wayland crash when sharing screen
Product: [Plasma] kwin Reporter: kde
Component: coreAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: kde
Priority: NOR    
Version First Reported In: 6.1.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: The journalctl logs

Description kde 2024-09-08 14:52:05 UTC
Created attachment 173446 [details]
The journalctl logs

SUMMARY
kwin_wayland crashes when sharing screen through the portal

STEPS TO REPRODUCE
1. Launch some program that requests to record the screen (GPU Screen Recorder in my case)
2. When asked, choose what to share - most frequently (~90% of the time) crashes when selecting Full Workspace with dual monitor setup, far less likely when selecting a rectangular area (but I believe it crashed once with the rectangular area and a single screen once)
3. Observe the crash

OBSERVED RESULT
kwin_wayland crashes, a new one is spawned with all the windows lost

EXPECTED RESULT
The workspace is recorded

SOFTWARE/OS VERSIONS
Linux/KDE Plasma, Wayland
Kernel: 6.10.7-200.fsync.fc40.x86_64 (64-bit)
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
journalctl -b:
I wanted to paste here, but character limit :(
Making an attachment
Comment 1 David Edmundson 2024-09-15 13:31:12 UTC
Pasting inline:

      #0  0x00007f290f943488 _ZNK4KWin20XdgToplevelInterface11minimumSizeEv (libkwin.so.6 + 0x543488)
                                                  #1  0x00007f290f7d1aba _ZNK4KWin17XdgToplevelWindow7minSizeEv (libkwin.so.6 + 0x3d1aba)
                                                  #2  0x00007f290f7d21d8 _ZNK4KWin17XdgToplevelWindow11isResizableEv (libkwin.so.6 + 0x3d21d8)
                                                  #3  0x00007f290f79e71d _ZN4KWin6Window18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv (libkwin.so.6 + 0x39e71d)
                                                  #4  0x00007f290e64a81c _ZN3QV4L12loadPropertyEPNS_15ExecutionEngineEPNS_4Heap6ObjectEP7QObjectRK16QQmlPropertyData (libQt6Qml.so.6 + 0x24a81c)
                                                  #5  0x00007f28d9409182 n/a (n/a + 0x0)
                                                  #6  0x00007f290e6b2df8 _ZN3QV44Moth3VME4execEPNS_17JSTypesStackFrameEPNS_15ExecutionEngineE (libQt6Qml.so.6 + 0x2b2df8)
                                                  #7  0x00007f290e5f736f _ZL9qfoDoCallPKN3QV414FunctionObjectEPKNS_5ValueES5_i (libQt6Qml.so.6 + 0x1f736f)
                                                  #8  0x00007f290e672099 _ZN3QV47Runtime18CallPropertyLookup4callEPNS_15ExecutionEngineERKNS_5ValueEjPS4_i (libQt6Qml.so.6 + 0x272099)
                                                  #9  0x00007f28cfe0ae7a n/a (n/a + 0x0)

Some script is manipulating a window.

Can you confirm what scripts you have enabled?
Comment 2 kde 2024-09-15 13:34:59 UTC
I have a script that autostarts and launches gpu-screen-recorder, which asks for screen sharing, during login and krohnkite, a kwin script to autotile windows. I don't believe there can anything else somehow related to the issue
Comment 3 kde 2024-09-19 10:53:08 UTC
I have updated krohnkite and turned off its autotiling for org.freedesktop.impl.portal.desktop.kde and it seems to not crash plasma anymore
Comment 4 kde 2024-09-26 17:43:13 UTC
I guess I will change the status to resolved then