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

Snap Group Cause Kwin To Crash (X11) #30

Closed semarainc closed 1 year ago

semarainc commented 1 year ago

Hi

i would like to report issue regarding snap group causing Kwin X11 to crash

Step To Reproduce: 1) Activate snap group (any of the three options) 2) Restart Kwin_x11 3) doing snap window (no matter the layout) on any window 4) Minimize the window few times 5) Move one of the snapped window to other virtual desktop 6) Move to other virtual desktop few times 7) Activate Overview Effect a few times (Default Hotkey in Manjaro, Meta + W) 8) Kwin X11 will crash immediately

Kwin X11 will also crash event without doing step 5 and 6, i guess the overview effect doesn't cooperate well with snap group

Here is The Video for More Information: https://youtu.be/omfewsz5-mo

Some Log i got from terminal when Kwin_X11 crash

kwin_core: XCB error: 10 (BadAccess), sequence: 2575, resource id: 999, major code: 142 (Composite), minor code: 2 (RedirectSubwindows) QQmlEngine::setContextForObject(): Object already has a QQmlContext QQmlEngine::setContextForObject(): Object already has a QQmlContext file:///usr/share/kwin/effects/overview/qml/ScreenView.qml:183: ReferenceError: animationDuration is not defined file:///usr/share/kwin/effects/overview/qml/ScreenView.qml:183: ReferenceError: animationDuration is not defined file:///usr/share/kwin/effects/overview/qml/ScreenView.qml:183: ReferenceError: animationDuration is not defined file:///usr/share/kwin/effects/overview/qml/ScreenView.qml:0: ReferenceError: animationDuration is not defined file:///usr/share/kwin/effects/overview/qml/ScreenView.qml:0: ReferenceError: animationDuration is not defined file:///usr/share/kwin/effects/overview/qml/ScreenView.qml:0: ReferenceError: animationDuration is not defined file:///usr/share/kwin/effects/overview/qml/ScreenView.qml:0: ReferenceError: animationDuration is not defined file:///usr/share/kwin/effects/overview/qml/ScreenView.qml:0: ReferenceError: animationDuration is not defined file:///usr/share/kwin/effects/overview/qml/ScreenView.qml:0: ReferenceError: animationDuration is not defined file:///usr/share/kwin/effects/overview/qml/ScreenView.qml:0: ReferenceError: animationDuration is not defined file:///usr/share/kwin/effects/overview/qml/ScreenView.qml:0: ReferenceError: animationDuration is not defined file:///usr/share/kwin/effects/overview/qml/ScreenView.qml:0: ReferenceError: animationDuration is not defined file:///usr/share/kwin/effects/overview/qml/ScreenView.qml:0: ReferenceError: animationDuration is not defined qt.qpa.xcb: Unhandled client message: "_NET_CURRENT_DESKTOP" kwin_core: XCB error: 152 (BadDamage), sequence: 24424, resource id: 39848693, major code: 143 (DAMAGE), minor code: 2 (Destroy) kwin_core: XCB error: 3 (BadWindow), sequence: 24425, resource id: 62914742, major code: 129 (SHAPE), minor code: 6 (Input) qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 24426, resource id: 62914742, major code: 2 (ChangeWindowAttributes), minor code: 0 qt.qpa.xcb: Unhandled client message: "_NET_CURRENT_DESKTOP"

I hope you don't mind to look into this issue Thank you for your hard work :D

emvaized commented 1 year ago

Well, from your description and logs it appears that the crash is actually caused by the overview effect, not the script.

But actually, I haven't tested the behavior when you move a window from a snap group to another desktop or activity.

semarainc commented 1 year ago

IMHO, when a window is moved to other desktop or activities, it should not be in snap group anymore

emvaized commented 1 year ago

I just added the code in dev to remove window from snap group on moving to other desktop. Perhaps it makes sense, and should also fix your problem