gamescope
gamescope copied to clipboard
3.14.26 crashes after cursor leaves window and seemingly has inverted cursor handling
crash backtrace:
bt
(lldb) bt
* thread #12, name = 'gamescope-xwm', stop reason = signal SIGSEGV: address not mapped to object (fault address: 0x0)
* frame #0: 0x00007fffebee06a9 libdecor-gtk.so`pointer_motion(data=0x00007fffef60e470, wl_pointer=<unavailable>, time=<unavailable>, surface_x=1536, surface_y=<unavailable>) at libdecor-gtk.c:2146:66
frame #1: 0x00007fffeed4641a libffi.so.8`ffi_call_unix64 at unix64.S:104
frame #2: 0x00007fffeed4ae95 libffi.so.8`ffi_call_int(cif=0x00007fffd8c01a10, fn=(libdecor-gtk.so`pointer_motion at libdecor-gtk.c:2132), rvalue=0x0000000000000000, avalue=0x00007fffd8c01a40, closure=<unavailable>) at ffi64.c:673:3
frame #3: 0x00007fffeed4a9ec libffi.so.8`ffi_call(cif=0x00007fffd8c01a10, fn=(libdecor-gtk.so`pointer_motion at libdecor-gtk.c:2132), rvalue=0x0000000000000000, avalue=0x00007fffd8c01a40) at ffi64.c:710:3
frame #4: 0x00007ffff7fe4b43 libwayland-client.so.0`wl_closure_invoke(closure=0x00007fffef62b870, flags=<unavailable>, target=<unavailable>, opcode=2, data=<unavailable>) at connection.c:1228:2
frame #5: 0x00007ffff7fe2bb8 libwayland-client.so.0`dispatch_event(display=<unavailable>, queue=<unavailable>) at wayland-client.c:1670:3
frame #6: 0x00007ffff7fe2381 libwayland-client.so.0`wl_display_dispatch_queue_pending [inlined] dispatch_queue(display=0x00007fffef40af10, queue=<unavailable>) at wayland-client.c:1816:3
frame #7: 0x00007ffff7fe232b libwayland-client.so.0`wl_display_dispatch_queue_pending(display=0x00007fffef40af10, queue=0x00007fffef40b008) at wayland-client.c:2058:8
frame #8: 0x00007ffff7fe246c libwayland-client.so.0`wl_display_dispatch_pending(display=<unavailable>) at wayland-client.c:2121:9 [artificial]
frame #9: 0x0000555555652758 gamescope`gamescope::CWaylandBackend::PollState(this=0x00007fffec4079f0) at -d57509.WaylandBackend.cpp:1708:9
frame #10: 0x0000555555672ba2 gamescope`steamcompmgr_main(argc=<unavailable>, argv=<unavailable>) at -dc5010.steamcompmgr.cpp:7375:22
frame #11: 0x00005555556b6f0c gamescope`steamCompMgrThreadRun(argc=2, argv=0x00007fffffffd8e8) at -0a3f93.main.cpp:995:2
frame #12: 0x00005555556b718f gamescope`void* std::__1::__thread_proxy[abi:fe180100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(int, char**), int, char**>>(void*) [inlined] decltype(std::declval<void (*)(int, char**)>()(std::declval<int>(), std::declval<char**>())) std::__1::__invoke[abi:fe180100]<void (*)(int, char**), int, char**>(__f=0x00007fffe7c0d818, __args=0x00007fffe7c0d820, __args=0x00007fffe7c0d828) at -e99fee.invoke.h:344:25
frame #13: 0x00005555556b7185 gamescope`void* std::__1::__thread_proxy[abi:fe180100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(int, char**), int, char**>>(void*) [inlined] void std::__1::__thread_execute[abi:fe180100]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(int, char**), int, char**, 2ul, 3ul>(__t=size=4, (null)=<unavailable>) at -dd695e.thread.h:193:3
frame #14: 0x00005555556b7185 gamescope`void* std::__1::__thread_proxy[abi:fe180100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(int, char**), int, char**>>(__vp=0x00007fffe7c0d810) at -dd695e.thread.h:202:3
frame #15: 0x00007fffefab5cbb libc.so`start(p=0x00007fffd8c020c0) at pthread_create.c:208:17
frame #16: 0x00007fffefab8acb libc.so`__clone + 47
there is also another variant that sometimes happens with the same repro pretty much of just opening a window and moving the cursor out of it:
bt 2
* thread #12, name = 'gamescope-xwm', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
frame #0: 0x00007ffff7fe25d4 libwayland-client.so.0`wl_proxy_get_version(proxy=0x80007fffed625fc0) at wayland-client.c:2313:16
(lldb) bt
* thread #12, name = 'gamescope-xwm', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
* frame #0: 0x00007ffff7fe25d4 libwayland-client.so.0`wl_proxy_get_version(proxy=0x80007fffed625fc0) at wayland-client.c:2313:16
frame #1: 0x00007fffebcdf577 libdecor-gtk.so`draw_border_component [inlined] wl_surface_attach(wl_surface=0x80007fffed625fc0, buffer=0x00007fffed62e920, x=0, y=0) at wayland-client-protocol.h:3802:30
frame #2: 0x00007fffebcdf56f libdecor-gtk.so`draw_border_component(frame_gtk=0x00007fffef416c10, border_component=0x00007fffef416c78, component=<unavailable>) at libdecor-gtk.c:1343:2
frame #3: 0x00007fffebcde1ee libdecor-gtk.so`draw_decoration [inlined] draw_border(frame_gtk=0x00007fffef416c10) at libdecor-gtk.c:1359:2
frame #4: 0x00007fffebcde1de libdecor-gtk.so`draw_decoration(frame_gtk=0x00007fffef416c10) at libdecor-gtk.c:1434:3
frame #5: 0x00007fffebce051f libdecor-gtk.so`pointer_enter(data=0x00007fffef615df0, wl_pointer=<unavailable>, serial=588337, surface=0x00007fffed625fc0, surface_x=5888, surface_y=143104) at libdecor-gtk.c:2090:3
frame #6: 0x00007fffeed4641a libffi.so.8`ffi_call_unix64 at unix64.S:104
frame #7: 0x00007fffeed4ae95 libffi.so.8`ffi_call_int(cif=0x00007fffd8c01a10, fn=(libdecor-gtk.so`pointer_enter at libdecor-gtk.c:2064), rvalue=0x0000000000000000, avalue=0x00007fffd8c01a40, closure=<unavailable>) at ffi64.c:673:3
frame #8: 0x00007fffeed4a9ec libffi.so.8`ffi_call(cif=0x00007fffd8c01a10, fn=(libdecor-gtk.so`pointer_enter at libdecor-gtk.c:2064), rvalue=0x0000000000000000, avalue=0x00007fffd8c01a40) at ffi64.c:710:3
frame #9: 0x00007ffff7fe4b43 libwayland-client.so.0`wl_closure_invoke(closure=0x00007fffef62e8d0, flags=<unavailable>, target=<unavailable>, opcode=0, data=<unavailable>) at connection.c:1228:2
frame #10: 0x00007ffff7fe2bb8 libwayland-client.so.0`dispatch_event(display=<unavailable>, queue=<unavailable>) at wayland-client.c:1670:3
frame #11: 0x00007ffff7fe2381 libwayland-client.so.0`wl_display_dispatch_queue_pending [inlined] dispatch_queue(display=0x00007fffef40ad50, queue=<unavailable>) at wayland-client.c:1816:3
frame #12: 0x00007ffff7fe232b libwayland-client.so.0`wl_display_dispatch_queue_pending(display=0x00007fffef40ad50, queue=0x00007fffef40ae48) at wayland-client.c:2058:8
frame #13: 0x00007ffff7fe246c libwayland-client.so.0`wl_display_dispatch_pending(display=<unavailable>) at wayland-client.c:2121:9 [artificial]
frame #14: 0x0000555555652758 gamescope`gamescope::CWaylandBackend::PollState(this=0x00007fffec408620) at -a19cf9.WaylandBackend.cpp:1708:9
frame #15: 0x0000555555672ba2 gamescope`steamcompmgr_main(argc=<unavailable>, argv=<unavailable>) at -6f7406.steamcompmgr.cpp:7375:22
frame #16: 0x00005555556b6f0c gamescope`steamCompMgrThreadRun(argc=2, argv=0x00007fffffffd8e8) at -1c3b77.main.cpp:995:2
frame #17: 0x00005555556b718f gamescope`void* std::__1::__thread_proxy[abi:fe180100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(int, char**), int, char**>>(void*) [inlined] decltype(std::declval<void (*)(int, char**)>()(std::declval<int>(), std::declval<char**>())) std::__1::__invoke[abi:fe180100]<void (*)(int, char**), int, char**>(__f=0x00007fffe7c04e48, __args=0x00007fffe7c04e50, __args=0x00007fffe7c04e58) at -26f948.invoke.h:344:25
frame #18: 0x00005555556b7185 gamescope`void* std::__1::__thread_proxy[abi:fe180100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(int, char**), int, char**>>(void*) [inlined] void std::__1::__thread_execute[abi:fe180100]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(int, char**), int, char**, 2ul, 3ul>(__t=size=4, (null)=<unavailable>) at -378e1f.thread.h:193:3
frame #19: 0x00005555556b7185 gamescope`void* std::__1::__thread_proxy[abi:fe180100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(int, char**), int, char**>>(__vp=0x00007fffe7c04e40) at -378e1f.thread.h:202:3
frame #20: 0x00007fffefab5cbb libc.so`start(p=0x00007fffd8c020c0) at pthread_create.c:208:17
frame #21: 0x00007fffefab8acb libc.so`__clone + 47
bisected to 69610ec52429fecbe94c4c042cc42ab43e0491f8
i think what happens is the 'inverted cursor' means something is confused and then once it escapes the window invalid coordinates that are outside the window get passed to libdecor, so it crashes there.
running gamescope with --force-grab-cursor sidesteps this, but i think it shouldn't be needed. i remember some time long ago (maybe a year?) where without --force-grab-cursor i got inverted cursor handling too- but at least there it didn't crash (since it couldn't escape the window anyway)
What do you mean by "inverted cursor handling"?
moving the mouse left moves the cursor right. moving it up moves it down. (and vice versa)
That's very odd. It doesn't happen for me, and if I am honest, it doesn't make sense.
Gamescope doesn't control or influence how your cursor moves in any way when it's not in grabby grab relative mode.
What compositor are you using? Does it happen on eg. Sway or KDE?
What compositor are you using? Does it happen on eg. Sway or KDE?
the inverted cursor happens on niri (the above backtraces); without the libdecor decorations with prefer-no-csd it wouldn't crash, but the cursor is still inverted.
on sway master it's also inverted (but there's no decorations to crash on)
on kde it's the same as sway
Can you record a video? This is really odd.
here https://img.ayaya.dev/NUPcYqUqnGo9
I can reproduce it with this game, thanks. Very odd...
the inverted cursor behavior is happening for me as well with GNOME and Counter-Strike 2
[gamescope] [Info] console: gamescope version 3.14.28
System Details Report
Report details
- Date generated: 2024-08-07 19:33:35
Hardware Information:
- Hardware Model: ASRock Z390 Taichi Ultimate
- Memory: 32,0 GiB
- Processor: Intel® Core™ i9-9900K × 16
- Graphics: AMD Radeon™ RX 6800
- Disk Capacity: 6,0 TB
Software Information:
- Firmware Version: P4.30
- OS Name: Arch Linux
- OS Build: rolling
- OS Type: 64-bit
- GNOME Version: 46
- Windowing System: Wayland
- Kernel Version: Linux 6.10.3-arch1-2