gamescope icon indicating copy to clipboard operation
gamescope copied to clipboard

Gamescope crashes on Wayland backend if cursor enters or exits window

Open grimshins opened this issue 1 year ago • 5 comments

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.

grimshins avatar Jul 23 '24 02:07 grimshins

Can you send a full backtrace?

misyltoad avatar Jul 23 '24 02:07 misyltoad

https://gist.github.com/grimshins/93b8ebbac623a25a2ebad21ca11ec79a

Apologies if this isn't correct, I'm sort of learning by doing here

grimshins avatar Jul 23 '24 03:07 grimshins

I did some more digging on this and the commit that appears to have caused this is 1ebfacbb7477437ef295eb821a972ff3cfe992df

grimshins avatar Aug 08 '24 01:08 grimshins

Interestingly the crash does not occur if the -b or -f flags are used. Might have something to do with window decorations?

grimshins avatar Aug 12 '24 08:08 grimshins

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

Vash63 avatar Aug 26 '24 19:08 Vash63

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 avatar Oct 03 '24 00:10 zulunia

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

gouineblade avatar Oct 21 '24 08:10 gouineblade

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.

th3raid0r avatar Nov 10 '24 23:11 th3raid0r

I'm having the same issue, 100% scaling, any idea? It was working just fine then it suddenly stopped working.

SheMelody avatar Nov 16 '24 23:11 SheMelody