mutter/gnome-shell spews GLib warnings with pointer contraints
Affected version
- Fedora 33
- Mutter from git master
- Wayland
Bug summary
While working on fixing an Xwayland issue with a specific game using a workaround, I noticed that gnome-shell/mutter would log a GLib warning each time the pointer constraints were created/destroyed.
Steps to reproduce
- Install Xwayland from the WIP branch 581
- Compile and run the simple reproducer from the Xwayland issue
- Press the mouse button within the reproducer window
What happened
Dec 21 11:26:52 t480s gnome-shell[572480]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Dec 21 11:26:52 t480s gnome-shell[572480]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
What did you expect to happen
No GLib warning
Relevant logs, screenshots, screencasts etc.
Forcing an abort on failure gives the following backtrace in gnome-shell/mutter:
#7 0x00007fe7ef8fbba8 in g_object_ref (_object=0x0) at ../../../../src/gnome/glib/gobject/gobject.c:3389
#8 0x00007fe7eeb798db in meta_seat_impl_set_pointer_constraint (seat=0x225cf20, constraint_impl=0x0)
at ../../../../src/gnome/mutter/src/backends/native/meta-seat-impl.c:3336
#9 0x00007fe7eeb7ada4 in meta_seat_native_set_pointer_constraint (seat=0x7fe7cc0081d0, constraint_impl=0x0)
at ../../../../src/gnome/mutter/src/backends/native/meta-seat-native.c:572
#10 0x00007fe7eeb4fee9 in meta_backend_native_set_pointer_constraint (backend=0x1f610e0, constraint=0x0)
at ../../../../src/gnome/mutter/src/backends/native/meta-backend-native.c:326
#11 0x00007fe7eea33253 in meta_backend_set_client_pointer_constraint (backend=0x1f610e0, constraint=0x0)
at ../../../../src/gnome/mutter/src/backends/meta-backend.c:1433
#12 0x00007fe7eeb1361f in meta_pointer_confinement_wayland_disable (confinement=0x4003ca0)
at ../../../../src/gnome/mutter/src/wayland/meta-pointer-confinement-wayland.c:153
#13 0x00007fe7eeb2c57a in meta_wayland_pointer_constraint_disable (constraint=0x24f0f10)
at ../../../../src/gnome/mutter/src/wayland/meta-wayland-pointer-constraints.c:423
#14 0x00007fe7eeb2c5d1 in meta_wayland_pointer_constraint_destroy (constraint=0x24f0f10)
at ../../../../src/gnome/mutter/src/wayland/meta-wayland-pointer-constraints.c:435
#15 0x00007fe7eeb2c848 in meta_wayland_pointer_constraint_remove (constraint=0x24f0f10)
at ../../../../src/gnome/mutter/src/wayland/meta-wayland-pointer-constraints.c:538
#16 0x00007fe7eeb2cb5e in pointer_constraint_resource_destroyed (resource=0x56d6a10)
at ../../../../src/gnome/mutter/src/wayland/meta-wayland-pointer-constraints.c:657
#17 0x00007fe7ee22fd0f in destroy_resource (element=element@entry=0x56d6a10, data=data@entry=0x0, flags=0)
at ../../../../src/gnome/wayland/src/wayland-server.c:724
#18 0x00007fe7ee2303e0 in wl_resource_destroy (resource=0x56d6a10) at ../../../../src/gnome/wayland/src/wayland-server.c:741
#19 0x00007fe7eeb2d2a2 in locked_pointer_destroy (client=0x2500bc0, resource=0x56d6a10)
at ../../../../src/gnome/mutter/src/wayland/meta-wayland-pointer-constraints.c:929
#20 0x00007fe7edcc2b10 in ffi_call_unix64 () at ../src/x86/unix64.S:76
#21 0x00007fe7edcc20a3 in ffi_call (cif=cif@entry=0x7ffcc0a15920, fn=<optimized out>, rvalue=<optimized out>, rvalue@entry=0x0,
avalue=avalue@entry=0x7ffcc0a159f0) at ../src/x86/ffi64.c:525
#22 0x00007fe7ee234f92 in wl_closure_invoke (closure=0x53023a0, flags=2, target=<optimized out>, opcode=0, data=<optimized out>)
at ../../../../src/gnome/wayland/src/connection.c:1018
#23 0x00007fe7ee230972 in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=0x2500bc0)
--Type <RET> for more, q to quit, c to continue without paging--
at ../../../../src/gnome/wayland/src/wayland-server.c:432
#24 0x00007fe7ee233162 in wl_event_loop_dispatch (loop=0x1f7c960, timeout=<optimized out>) at ../../../../src/gnome/wayland/src/event-loop.c:1027
#25 0x00007fe7eeb16dd6 in wayland_event_source_dispatch (base=0x22c9070, callback=0x0, data=0x0)
at ../../../../src/gnome/mutter/src/wayland/meta-wayland.c:96
#26 0x00007fe7ef80565b in g_main_dispatch (context=0x1f5dc80) at ../../../../src/gnome/glib/glib/gmain.c:3325
#27 g_main_context_dispatch (context=0x1f5dc80) at ../../../../src/gnome/glib/glib/gmain.c:4043
#28 0x00007fe7ef8058d8 in g_main_context_iterate (context=0x1f5dc80, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
at ../../../../src/gnome/glib/glib/gmain.c:4119
#29 0x00007fe7ef805bbb in g_main_loop_run (loop=0x22cdd70) at ../../../../src/gnome/glib/glib/gmain.c:4317
#30 0x00007fe7eeaad443 in meta_run_main_loop () at ../../../../src/gnome/mutter/src/core/main.c:708
#31 0x00007fe7eeaad454 in meta_run () at ../../../../src/gnome/mutter/src/core/main.c:723
#32 0x0000000000402fce in main (argc=1, argv=0x7ffcc0a15fd8) at ../../../../src/gnome/gnome-shell/src/main.c:507