Bug 470759

Summary: Crash in KWin::CustomTile::setRelativeGeometry using custom script
Product: [Plasma] kwin Reporter: vaughanm1 <vaughanm1>
Component: Custom TilingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: crash CC: aagaande, antti.savo, CoffeeCoder1, kde, nicolas.fella, notmart
Priority: NOR    
Version First Reported In: 5.27.5   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description vaughanm1@protonmail.com 2023-06-07 19:57:10 UTC
SUMMARY
Electron windows can crash KWin when moved into a tile when the KWin script Polonium is installed. This script only crashes with electron windows and works fine otherwise.

STEPS TO REPRODUCE
1. Install the Polonium script from the KWin store 
2. Create a new electron window (vscode, slack, discord, etc.)
3. Create some more tiles with konsole and attempt to shift-drag an electron window into a tile

OBSERVED RESULT
The window either does not tile or KWin crashes

EXPECTED RESULT
The script handles the electron window the same as it handles every other type of window and tiles it correctly, or at the very least does not crash

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.3.5-zen2-1-zen (64-bit)
(available in About System)
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9

ADDITIONAL INFORMATION

Crash log with debug info available at https://pastebin.com/iP0sxC7s
Comment 1 Nicolas Fella 2023-06-10 16:51:34 UTC
#0  0x00007f0b98ac09fd in QObjectPrivate::maybeSignalConnected(unsigned int) const () at /usr/lib/libQt5Core.so.5
#1  0x00007f0b98acf8ef in  () at /usr/lib/libQt5Core.so.5
#2  0x00007f0b9a4c5cef in KWin::CustomTile::setRelativeGeometry(QRectF const&) () at /usr/lib/libkwin.so.5
#3  0x00007f0b9a4c5b36 in KWin::CustomTile::setRelativeGeometry(QRectF const&) () at /usr/lib/libkwin.so.5
#4  0x00007f0b9a4c4bb7 in KWin::CustomTile::remove() () at /usr/lib/libkwin.so.5
#5  0x00007f0b9a4c9913 in KWin::CustomTile::qt_metacall(QMetaObject::Call, int, void**) () at /usr/lib/libkwin.so.5
#6  0x00007f0b99878174 in  () at /usr/lib/libQt5Qml.so.5
#7  0x00007f0b99777a46 in  () at /usr/lib/libQt5Qml.so.5
#8  0x00007f0b9977da96 in QV4::QObjectMethod::callInternal(QV4::Value const*, QV4::Value const*, int) const () at /usr/lib/libQt5Qml.so.5
#9  0x00007f0b997a6a01 in QV4::Runtime::CallProperty::call(QV4::ExecutionEngine*, QV4::Value const&, int, QV4::Value*, int) () at /usr/lib/libQt5Qml.so.5
#10 0x00007f0b63fed5a2 in  ()
#11 0x00007ffef0c63990 in  ()
#12 0x0000000000000000 in  ()
Comment 2 David Edmundson 2023-07-07 10:26:43 UTC
*** Bug 471867 has been marked as a duplicate of this bug. ***
Comment 3 Marco Martin 2024-03-20 11:11:58 UTC
not sure if it's relevant, but does this happen with x11 or wayland?
Comment 4 Antti Savolainen 2024-03-20 11:15:32 UTC
I've tested and reproduced the crash in Wayland. I haven't tried X11. See the duplicate bug.
Comment 5 Antti Savolainen 2024-03-30 17:34:24 UTC
I believe this has been fixed now. I can no longer cause a crash.