Crash in meta_wayland_pointer_set_focus()
I just got a crash on main when running one of the subsurface clients in https://gitlab.freedesktop.org/kennylevinsen/fractional-scaling.
bt
#0 wl_resource_get_client (resource=0x0) at ../src/wayland-server.c:799
#1 0x00007f7893b57fb7 in meta_wayland_pointer_set_focus (pointer=0x115ce10, surface=0x561caf0) at ../src/wayland/meta-wayland-pointer.c:1073
#2 0x00007f7893b587c1 in repick_for_event (for_event=0x3c76b20, pointer=0x115ce10) at ../src/wayland/meta-wayland-pointer.c:672
#3 meta_wayland_pointer_update (pointer=0x115ce10, event=0x3c76b20) at ../src/wayland/meta-wayland-pointer.c:685
#4 0x00007f7893ad0a6d in meta_display_handle_event (event_actor=0x53249f0, event=0x3c76b20, display=0x17c8060) at ../src/core/events.c:278
#5 event_callback (event=0x3c76b20, event_actor=0x53249f0, data=0x17c8060) at ../src/core/events.c:524
#6 0x00007f7893def9c9 in _clutter_event_process_filters (event=event@entry=0x3c76b20, event_actor=event_actor@entry=0x53249f0) at ../clutter/clutter/clutter-event.c:1691
#7 0x00007f7893e25aca in clutter_stage_update_device
(stage=stage@entry=0x1491080, device=device@entry=0x1415080, sequence=sequence@entry=0x0, source_device=source_device@entry=0x0, point=...,
point@entry=..., time_ms=time_ms@entry=0, new_actor=new_actor@entry=0x5325410, clear_area=0x86ddf20, emit_crossing=1) at ../clutter/clutter/clutter-stage.c:3736
#8 0x00007f7893e25d43 in clutter_stage_pick_and_update_device
(stage=stage@entry=0x1491080, device=0x1415080, sequence=sequence@entry=0x0, source_device=source_device@entry=0x0, flags=flags@entry=(CLUTTER_DEVICE_UPDATE_EMIT_CROSSING | CLUTTER_DEVICE_UPDATE_IGNORE_CACHE), point=..., time_ms=time_ms@entry=0) at ../clutter/clutter/clutter-stage.c:3843
#9 0x00007f7893e25f21 in clutter_stage_maybe_invalidate_focus (self=self@entry=0x1491080, actor=actor@entry=0x53249f0) at ../clutter/clutter/clutter-stage.c:3200
#10 0x00007f7893e25fc4 in clutter_stage_invalidate_focus (self=0x1491080, actor=actor@entry=0x53249f0) at ../clutter/clutter/clutter-stage.c:3237
#11 0x00007f7893dd1761 in clutter_actor_real_unmap (self=0x53249f0) at ../clutter/clutter/clutter-actor.c:1684
#12 0x00007f7893dbf566 in clutter_actor_set_mapped (self=self@entry=0x53249f0, mapped=mapped@entry=0) at ../clutter/clutter/clutter-actor.c:1281
#13 0x00007f7893dc45a6 in clutter_actor_update_map_state (self=self@entry=0x53249f0, change=change@entry=MAP_STATE_MAKE_UNREALIZED) at ../clutter/clutter/clutter-actor.c:1454
#14 0x00007f7893dd0065 in clutter_actor_remove_child_internal (self=0x1cb5e00, child=0x53249f0, flags=REMOVE_CHILD_DEFAULT_FLAGS) at ../clutter/clutter/clutter-actor.c:4173
#15 0x00007f7893dd0243 in clutter_actor_remove_child (self=<optimized out>, child=<optimized out>) at ../clutter/clutter/clutter-actor.c:11527
#16 0x00007f7893b462d4 in meta_window_actor_wayland_rebuild_surface_tree (actor=<optimized out>) at ../src/compositor/meta-window-actor-wayland.c:221
#17 0x00007f7893b613ea in meta_wayland_surface_role_notify_subsurface_state_changed (surface_role=<optimized out>) at ../src/wayland/meta-wayland-surface.c:2071
#18 meta_wayland_surface_notify_subsurface_state_changed (surface=0x561caf0) at ../src/wayland/meta-wayland-surface.c:2078
#19 meta_wayland_surface_apply_state (surface=0x561caf0, state=0x86545a0) at ../src/wayland/meta-wayland-surface.c:891
#20 0x00007f7893b68d12 in meta_wayland_transaction_apply (first_candidate=0x7ffed3267920, transaction=0x1c4ae90) at ../src/wayland/meta-wayland-transaction.c:201
#21 meta_wayland_transaction_maybe_apply_one (first_candidate=0x7ffed3267920, transaction=0x1c4ae90) at ../src/wayland/meta-wayland-transaction.c:258
#22 meta_wayland_transaction_maybe_apply (transaction=transaction@entry=0x1c4ae90) at ../src/wayland/meta-wayland-transaction.c:268
#23 0x00007f7893b69040 in meta_wayland_transaction_commit (transaction=transaction@entry=0x1c4ae90) at ../src/wayland/meta-wayland-transaction.c:374
#24 0x00007f7893b5d96b in queue_subsurface_placement (surface=surface@entry=0x561ce10, sibling=sibling@entry=0x0, placement=placement@entry=META_WAYLAND_SUBSURFACE_PLACEMENT_BELOW)
at ../src/wayland/meta-wayland-subsurface.c:359
#25 0x00007f7893b5e358 in meta_wayland_subsurface_parent_destroyed (surface=0x561ce10) at ../src/wayland/meta-wayland-subsurface.c:484
#26 0x00007f7893b5f26d in wl_surface_destructor (resource=<optimized out>) at ../src/wayland/meta-wayland-surface.c:1541
#27 0x00007f7894ea940f in destroy_resource (element=0x3768770, data=data@entry=0x7ffed3267aa4, flags=0) at ../src/wayland-server.c:730
#28 0x00007f7894ea9af3 in for_each_helper (entries=0x21f4830, data=0x7ffed3267aa4, func=0x7f7894ea9360 <destroy_resource>) at ../src/wayland-util.c:416
#29 wl_map_for_each (data=0x7ffed3267aa4, func=0x7f7894ea9360 <destroy_resource>, map=0x21f4830) at ../src/wayland-util.c:430
#30 wl_client_destroy (client=client@entry=0x21f4800) at ../src/wayland-server.c:889
#31 0x00007f7894eaa12f in destroy_client_with_error (reason=<optimized out>, client=<optimized out>) at ../src/wayland-server.c:324
#32 wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=<optimized out>) at ../src/wayland-server.c:453
#33 0x00007f7894ea9532 in wl_event_loop_dispatch (loop=0x17bf410, timeout=timeout@entry=0) at ../src/event-loop.c:1027
#34 0x00007f7893b4a557 in wayland_event_source_dispatch (base=<optimized out>, callback=<optimized out>, data=<optimized out>) at ../src/wayland/meta-wayland.c:114
#35 0x00007f7894945c7f in g_main_dispatch (context=0x1147860) at ../glib/gmain.c:3454
#36 g_main_context_dispatch (context=0x1147860) at ../glib/gmain.c:4172
#37 0x00007f789499c118 in g_main_context_iterate.constprop.0 (context=0x1147860, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4248
#38 0x00007f789494524f in g_main_loop_run (loop=0x1c2c250) at ../glib/gmain.c:4448
#39 0x00007f7893ada4c6 in meta_context_run_main_loop (context=context@entry=0x11430d0, error=error@entry=0x7ffed3268058) at ../src/core/meta-context.c:482
#40 0x0000000000402978 in main (argc=<optimized out>, argv=<optimized out>) at ../src/main.c:668