Crash in meta_wayland_pointer_get_top_popup after closing popup
Mutter just crashed here after I opened a context menu in gnome-console and then if I remember things correctly, selected "copy", which closes the popup and then accidentally immediately clicked in the console window outside the popup. I'm not 100% sure though, because at some point I realized I had selected the wrong text, but I think that was after selecting copy. This was with mutter-43.2-1.fc37.x86_64.
#0 0x00007f38ae4afe7c in __pthread_kill_implementation () at /lib64/libc.so.6
#1 0x00007f38ae45faa6 in raise () at /lib64/libc.so.6
#2 0x000055fba0af0432 in dump_gjs_stack_on_signal_handler ()
#3 0x00007f38ae45fb50 in <signal handler called> () at /lib64/libc.so.6
#4 0x00007f38ae4afe7c in __pthread_kill_implementation () at /lib64/libc.so.6
#5 0x00007f38ae45faa6 in raise () at /lib64/libc.so.6
#6 0x00007f38ae4497fc in abort () at /lib64/libc.so.6
#7 0x00007f38af480ef8 in g_assertion_message (domain=<optimized out>, file=0x7f38ae7cde50 "../src/wayland/meta-wayland-popup.c", line=<optimized out>, func=<optimized out>, message=<optimized out>) at ../glib/gtestutils.c:3256
lstr = "233\000\070\177\000\000\060\000\026\256\070\177\000\000P\256m\250\373U\000\000\000\363y\302\325M\037\n"
s = 0x55fba63f3ee0 "\263im\370\376U"
#8 0x00007f38af4e18ae in g_assertion_message_expr (domain=domain@entry=0x7f38ae7a76ca "libmutter", file=file@entry=0x7f38ae7cde50 "../src/wayland/meta-wayland-popup.c", line=line@entry=233, func=func@entry=0x7f38ae7ce400 <__func__.0.lto_priv.120> "meta_wayland_popup_grab_get_top_popup", expr=expr@entry=0x7f38ae7cde28 "!wl_list_empty (&grab->all_popups)") at ../glib/gtestutils.c:3282
s = 0x55fba7ddd5a0 "assertion failed: (!wl_list_empty (&grab->all_popups))"
#9 0x00007f38ae7515eb in meta_wayland_popup_grab_get_top_popup (grab=<optimized out>) at ../src/wayland/meta-wayland-popup.c:233
popup = <optimized out>
__func__ = "meta_wayland_popup_grab_get_top_popup"
#10 meta_wayland_popup_grab_get_top_popup (grab=0x55fba323ef20) at ../src/wayland/meta-wayland-popup.c:229
popup = <optimized out>
__func__ = "meta_wayland_popup_grab_get_top_popup"
#11 0x00007f38ae7625df in meta_wayland_pointer_get_top_popup (pointer=<optimized out>) at ../src/wayland/meta-wayland-pointer.c:1405
grab = <optimized out>
top_popup = <optimized out>
shell_surface = 0x55fba2cb73d0
surface_role = <optimized out>
xdg_wm_base_resource = 0x55fba58f7f70
window = <optimized out>
surface = 0x55fba58cda10
parent_surface = 0x55fba52f7cf0
seat = 0x55fba193ccd0
serial = 64923
display = 0x55fba1e44100
xdg_surface = <optimized out>
xdg_popup = <optimized out>
xdg_surface = 0x55fba2cb73d0
xdg_surface_priv = 0x55fba2cb7360
actor_surface = 0x55fba2cb73d0
surface_role_class = <optimized out>
surface = 0x55fba58cda10
#12 finish_popup_setup (xdg_popup=<optimized out>) at ../src/wayland/meta-wayland-xdg-shell.c:1088
top_popup = <optimized out>
shell_surface = 0x55fba2cb73d0
surface_role = <optimized out>
xdg_wm_base_resource = 0x55fba58f7f70
window = <optimized out>
surface = 0x55fba58cda10
parent_surface = 0x55fba52f7cf0
seat = 0x55fba193ccd0
serial = 64923
display = 0x55fba1e44100
xdg_surface = <optimized out>
xdg_popup = <optimized out>
xdg_surface = 0x55fba2cb73d0
xdg_surface_priv = 0x55fba2cb7360
actor_surface = 0x55fba2cb73d0
surface_role_class = <optimized out>
surface = 0x55fba58cda10
#13 meta_wayland_xdg_popup_apply_state (surface_role=<optimized out>, pending=0x55fba62f3130) at ../src/wayland/meta-wayland-xdg-shell.c:1186
xdg_popup = <optimized out>
xdg_surface = 0x55fba2cb73d0
xdg_surface_priv = 0x55fba2cb7360
actor_surface = 0x55fba2cb73d0
surface_role_class = <optimized out>
surface = 0x55fba58cda10
#14 0x00007f38ae75f030 in meta_wayland_surface_role_apply_state (pending=0x55fba62f3130, surface_role=<optimized out>) at ../src/wayland/meta-wayland-surface.c:1938
subsurface_surface = <optimized out>
had_damage = 0
old_width = <optimized out>
old_height = <optimized out>
__func__ = "meta_wayland_surface_apply_state"
#15 meta_wayland_surface_apply_state (surface=<optimized out>, state=<optimized out>) at ../src/wayland/meta-wayland-surface.c:882
subsurface_surface = <optimized out>
had_damage = 0
old_width = <optimized out>
old_height = <optimized out>
__func__ = "meta_wayland_surface_apply_state"
#16 0x00007f38ae760707 in meta_wayland_surface_commit (surface=0x55fba58cda10) at ../src/wayland/meta-wayland-surface.c:1038
pending = 0x55fba62f3130
CoglTraceMetaWaylandSurfaceCommit = {begin_time = 0, name = 0x0, description = 0x0}
ScopedCoglTraceMetaWaylandSurfaceCommit = 0x0
surface = 0x55fba58cda10
#17 wl_surface_commit (client=<optimized out>, resource=<optimized out>) at ../src/wayland/meta-wayland-surface.c:1191
surface = 0x55fba58cda10
#18 0x00007f38adbc86d6 in ffi_call_unix64 () at /lib64/libffi.so.8
#19 0x00007f38adbc5492 in ffi_call_int.lto_priv () at /lib64/libffi.so.8
#20 0x00007f38ae15e728 in wl_closure_invoke (closure=closure@entry=0x55fba7be3600, target=<optimized out>, target@entry=0x55fba625e410, opcode=opcode@entry=6, data=<optimized out>, data@entry=0x55fba5ae3690, flags=2) at ../src/connection.c:1025
count = <optimized out>
cif = {abi = FFI_UNIX64, nargs = 2, arg_types = 0x7ffe2669c900, rtype = 0x7f38adbc91a0 <ffi_type_void>, bytes = 0, flags = 0}
ffi_types = {0x7f38adbc92a0 <ffi_type_pointer>, 0x7f38adbc92a0 <ffi_type_pointer>, 0x7f38adbc92a0 <ffi_type_pointer>, 0x7f38adbc9240 <ffi_type_uint32>, 0x7f38adbc92a0 <ffi_type_pointer>, 0x7f38adbc9330 <ffi_type_sint32>, 0x4, 0x1, 0x55fba1887a80, 0x55fba4373520, 0x7ffe2669ca50, 0x0, 0x594c50, 0x7ffe2669c901, 0x7f38aebf78c0, 0x55fba1c13d40, 0x0, 0x55fba1c13cd0, 0x7ffe2669c9a8, 0x2, 0x8, 0xfffe1861e4080fd8}
ffi_args = {0x7ffe2669c8c0, 0x7ffe2669c8c8, 0x55fba7254228, 0x55fba7254230, 0x55fba7cf6a98, 0x55fba7b84af0, 0x55fba86dae50, 0xa1f4dd5c279f300, 0x55fba3594200, 0x7f38ae160030 <log_closure+80>, 0x55fba86dae50, 0x55fba1e366c0, 0x7f38ae5f6c80 <main_arena>, 0x0, 0x7f38ae8399b8 <xdg_popup_requests.lto_priv+24>, 0x7f38ae4bebb6 <calloc+214>, 0x0, 0xa1f4dd5c279f300, 0x1a0002, 0x7f38ae16446e, 0x7f38ae169430 <wl_surface_requests+144>, 0x0}
implementation = <optimized out>
#21 0x00007f38ae162ac8 in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=<optimized out>) at ../src/wayland-server.c:437
connection = <optimized out>
resource = 0x55fba625e410
object = 0x55fba625e410
closure = <optimized out>
message = 0x7f38ae169430 <wl_surface_requests+144>
p = {157, 524294}
resource_flags = 0
opcode = 6
size = <optimized out>
since = <optimized out>
len = <optimized out>
#22 0x00007f38ae161532 in wl_event_loop_dispatch (loop=0x55fba1e39ac0, timeout=timeout@entry=0) at ../src/event-loop.c:1027
ep = {{events = 1, data = {ptr = 0x55fba5854600, fd = -1517992448, u32 = 2776974848, u64 = 94539302127104}}, {events = 32766, data = {ptr = 0x7f38af5196da, fd = -1353607462, u32 = 2941359834, u64 = 139881436255962}}, {events = 2941325502, data = {ptr = 0x7f38, fd = 32568, u32 = 32568, u64 = 32568}}, {events = 0, data = {ptr = 0x7fffffff, fd = 2147483647, u32 = 2147483647, u64 = 2147483647}}, {events = 2941762991, data = {ptr = 0xaf50ebfd00007f38, fd = 32568, u32 = 32568, u64 = 12632856426633527096}}, {events = 32568, data = {ptr = 0x7f38af57bdaf, fd = -1353204305, u32 = 2941762991, u64 = 139881436659119}}, {events = 3306190892, data = {ptr = 0x59000057a6, fd = 22438, u32 = 22438, u64 = 382252111782}}, {events = 0, data = {ptr = 0x57a6c50c3df4, fd = -989053452, u32 = 3305913844, u64 = 96373782101492}}, {events = 2610, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 3262771968, data = {ptr = 0xa1f4dd5, fd = 169823701, u32 = 169823701, u64 = 169823701}}, {events = 0, data = {ptr = 0x55fba18a9970, fd = -1584752272, u32 = 2710215024, u64 = 94539235367280}}, {events = 644468400, data = {ptr = 0x2669ce9800007ffe, fd = 32766, u32 = 32766, u64 = 2767970598226264062}}, {events = 32766, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 2147483647, data = {ptr = 0xa6289d4000000000, fd = 0, u32 = 0, u64 = 11972992507567931392}}, {events = 22011, data = {ptr = 0x7f38af509bb0 <g_trace_mark.constprop.0+144>, fd = -1353671760, u32 = 2941295536, u64 = 139881436191664}}, {events = 40, data = {ptr = 0x2669ce5000000030, fd = 48, u32 = 48, u64 = 2767970288988586032}}, {events = 32766, data = {ptr = 0x7ffe2669cd90, fd = 644468112, u32 = 644468112, u64 = 140729542888848}}, {events = 3262771968, data = {ptr = 0x2669cda00a1f4dd5, fd = 169823701, u32 = 169823701, u64 = 2767969533244165589}}, {events = 32766, data = {ptr = 0xa1f4dd5c279f300, fd = -1032195328, u32 = 3262771968, u64 = 729387245143454464}}, {events = 2, data = {ptr = 0xc279f30000000000, fd = 0, u32 = 0, u64 = 14013498896865558528}}, {events = 169823701, data = {ptr = 0x55fba6894010, fd = -1500954608, u32 = 2794012688, u64 = 94539319164944}}, {events = 2941762525, data = {ptr = 0x266c79ac00007f38, fd = 32568, u32 = 32568, u64 = 2768721650567380792}}, {events = 32766, data = {ptr = 0x55fba18a9970, fd = -1584752272, u32 = 2710215024, u64 = 94539235367280}}, {events = 644468376, data = {ptr = 0x7ffe, fd = 32766, u32 = 32766, u64 = 32766}}, {events = 0, data = {ptr = 0x7ffe2669ceb0, fd = 644468400, u32 = 644468400, u64 = 140729542889136}}, {events = 2924433293, data = {ptr = 0x7f38, fd = 32568, u32 = 32568, u64 = 32568}}, {events = 0, data = {ptr = 0x2f, fd = 47, u32 = 47, u64 = 47}}, {events = 2941908160, data = {ptr = 0xae51e11400007f38, fd = 32568, u32 = 32568, u64 = 12561068311728652088}}, {events = 32568, data = {ptr = 0x1, fd = 1, u32 = 1, u64 = 1}}, {events = 8, data = {ptr = 0x2669ce4000000000, fd = 0, u32 = 0, u64 = 2767970220269109248}}, {events = 32766, data = {ptr = 0x8, fd = 8, u32 = 8, u64 = 8}}}
source = <optimized out>
i = 0
count = <optimized out>
has_timers = <optimized out>
#23 0x00007f38ae74521b in wayland_event_source_dispatch (base=<optimized out>, callback=<optimized out>, data=<optimized out>) at ../src/wayland/meta-wayland.c:110
source = <optimized out>
loop = <optimized out>
#24 0x00007f38af4b7cbf in g_main_dispatch (context=0x55fba18a9970) at ../glib/gmain.c:3444
dispatch = 0x7f38ae745200 <wayland_event_source_dispatch>
prev_source = 0x0
begin_time_nsec = 96373782383015
was_in_call = 0
user_data = 0x0
callback = 0x0
cb_funcs = 0x0
cb_data = 0x0
need_destroy = <optimized out>
source = 0x55fba1e39bb0
current = 0x55fba1886840
i = 0
#25 g_main_context_dispatch (context=0x55fba18a9970) at ../glib/gmain.c:4162
#26 0x00007f38af50d598 in g_main_context_iterate.constprop.0 (context=0x55fba18a9970, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4238
max_priority = 2147483647
timeout = 426
some_ready = 1
nfds = 53
allocated_nfds = <optimized out>
fds = <optimized out>
begin_time_nsec = 96373782060896
#27 0x00007f38af4b728f in g_main_loop_run (loop=0x55fba32f4550) at ../glib/gmain.c:4438
__func__ = "g_main_loop_run"
#28 0x00007f38ae6d0b29 in meta_context_run_main_loop (context=<optimized out>, error=0x7ffe2669d040) at ../src/core/meta-context.c:465
priv = 0x55fba18a5050
__func__ = "meta_context_run_main_loop"
#29 0x000055fba0aefe09 in main ()