emvaized / kde-snap-assist

KWin script for KDE Plasma which suggests other window thumbnails on snap
https://store.kde.org/p/1875687
GNU General Public License v3.0
97 stars 6 forks source link

KWin crashes after sleep with snap-assist enabled #35

Closed thegrasshopper104 closed 1 year ago

thegrasshopper104 commented 1 year ago

Hi, > Failed to do pygdbmi parsing: No module named 'pygdbmi'> frame={level="0",func="onWindowResize",file="/home/aronkvh/.local/share/kwin/scripts/kdesnapassist/contents/ui/code/windows.js",fullname="/home/aronkvh/.local/share/kwin/scripts/kdesnapassist/c". Kwin broke or restarted every time after installing the script and waking from sleep. It was fixed by installing pygdbmi. Bug against KWin. System info:

Operating System: KDE neon 5.25
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Kernel Version: 5.15.0-46-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-3770 CPU @ 3.40GHz
Memory: 31,3 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3060/PCIe/SSE2
emvaized commented 1 year ago

Hi! Thanks for reporting, I think I can add this under the "Troubleshooting" section. But I'm not sure if I should make the script to install this library automatically, as the script doesn't use it, as well as any other external modules or libraries.

nicolasfella commented 1 year ago

The crash has nothing to do with pygdbmi

What seems to happen is that in https://github.com/emvaized/kde-snap-assist/blob/main/contents/ui/code/windows.js#L89 a null window is passed

#5  KWin::Window::output() const (this=this@entry=0x0) at /home/nico/kde/src/kwin/src/window.cpp:421
#6  0x00007f964ffe8d8e in KWin::Workspace::clientArea(KWin::clientAreaOption, KWin::Window const*) const (this=0x1183d00, opt=KWin::PlacementArea, window=0x0) at /home/nico/kde/src/kwin/src/workspace.cpp:2524
#7  0x00007f964ff84822 in KWin::WorkspaceWrapper::clientArea(KWin::WorkspaceWrapper::ClientAreaOption, KWin::Window*) const (c=<optimized out>, option=<optimized out>, this=<optimized out>)
    at /home/nico/kde/src/kwin/src/scripting/workspace_wrapper.cpp:290
emvaized commented 1 year ago

@nicolasfella Thanks a lot for your investigation! Then it must be an easy fix of simply adding a null check.

emvaized commented 1 year ago

I just published a new 1.6.1 update which will hopefully resolve this issue. Please feel free to reopen if the issue persists.