Gamescope crashes on Wayland backend if cursor enters or exits window
Test environment: Ubuntu 24.04, GNOME Wayland session, Ryzen 5 5600, RX 6700, mesa 24.1.4 from kisak ppa
Beginning with the commits to master on July 15, gamescope -- vkcube crashes with terminate called after throwing an instance of 'std::system_error' what(): Invalid argument as soon as the mouse cursor enters or exits the window. gamescope --force-grab-cursor -- vkcube and gamescope --backend sdl -- vkcube behave as expected. The crash does not occur on 3.14.24 and earlier.
Can you send a full backtrace?
https://gist.github.com/grimshins/93b8ebbac623a25a2ebad21ca11ec79a
Apologies if this isn't correct, I'm sort of learning by doing here
I did some more digging on this and the commit that appears to have caused this is 1ebfacbb7477437ef295eb821a972ff3cfe992df
Interestingly the crash does not occur if the -b or -f flags are used. Might have something to do with window decorations?
I'm facing the same issue. Fedora 40 but with Gamescope 3.15.1 stolen from GloriousEggroll's Nobara COPR. Adding -b or -f does fix it for me as well, so this does seem client-side-decoration related.
Gist with full backtrace: https://gist.github.com/Vash63/881dbdc85f8421390d985294769a0d43
Possible solution:
Had this issue myself, hitting the screen edge with the mouse cursor when using --force-grab-cursor would crash gamescope. After some troubleshooting I found that any Scaling applied to the monitor would cause it, I had a 4k monitor scaled to 125% in the KDE Display configuration, when I changed it back to 100% the issue doesn't present and everything works as expected.
Hope this helps anyone with similar issue.
Possible solution:
Had this issue myself, hitting the screen edge with the mouse cursor when using --force-grab-cursor would crash gamescope. After some troubleshooting I found that any Scaling applied to the monitor would cause it, I had a 4k monitor scaled to 125% in the KDE Display configuration, when I changed it back to 100% the issue doesn't present and everything works as expected.
Hope this helps anyone with similar issue.
THANK YOU ! You solved one of my problems, at least with God of War.
gamescope keeps crashing with Final Fantasy XV when gamescope's backend is wayland
Possible solution:
Had this issue myself, hitting the screen edge with the mouse cursor when using --force-grab-cursor would crash gamescope. After some troubleshooting I found that any Scaling applied to the monitor would cause it, I had a 4k monitor scaled to 125% in the KDE Display configuration, when I changed it back to 100% the issue doesn't present and everything works as expected.
Hope this helps anyone with similar issue.
@zulunia, I tried the PR that @ColinKinloch made and it doesn't resolve this issue. I think what you mention is a separate issue and it likely needs a different github issue for it. I'm also impacted, so I'll go ahead and create that.
I'm having the same issue, 100% scaling, any idea? It was working just fine then it suddenly stopped working.