Crash in meta_window_get_frame_rect when closing OpenURI dialog from xdg-desktop-portal-gtk
This crash is 100% reproducible with mutter 3.28.2-1.fc28 and xdg-desktop-portal-gtk-0.11-1.fc28, happens whenever clicking Cancel in the OpenURI dialog from xdg-desktop-portal-gtk. If you have any trouble reproducing, see https://bugzilla.redhat.com/show_bug.cgi?id=1582879 for a reproducer involving Epiphany Technology Preview.
Thread 1 (Thread 0x7fb9dd2ac280 (LWP 17436)):
#0 0x00007fb9da8cfcb4 in meta_window_get_frame_rect (window=window@entry=0x0, rect=rect@entry=0x7ffda389e6e0) at core/window.c:4492
#1 0x00007fb9da8b0970 in constrain_modal_dialog (window=0x55b9368b6ee0 [MetaWindowWayland], info=0x7ffda389e780, priority=<optimized out>, check_only=0) at core/constraints.c:901
x = <optimized out>
y = <optimized out>
parent = 0x0
child_rect = {x = <optimized out>, y = <optimized out>, width = 860, height = 347}
parent_rect = {x = -627799722, y = 32697, width = -627799728, height = 32697}
constraint_already_satisfied = <optimized out>
#2 0x00007fb9da8b0ef9 in do_all_constraints (check_only=<optimized out>, priority=<optimized out>, info=<optimized out>, window=<optimized out>) at core/constraints.c:250
constraint = 0x7fb9dab9fad0 <all_constraints+16>
satisfied = 1
info = {orig = {x = 580, y = 414, width = 860, height = 347}, current = {x = 580, y = 414, width = 860, height = 347}, action_type = ACTION_MOVE_AND_RESIZE, is_user_action = 0, resize_gravity = 1, fixed_directions = FIXED_DIRECTION_NONE, work_area_monitor = {x = 0, y = 27, width = 1920, height = 1053}, entire_monitor = {x = 0, y = 0, width = 1920, height = 1080}, usable_screen_region = 0x55b934075440 = {0x55b93606db50}, usable_monitor_region = 0x55b934075360 = {0x55b93606d610}}
priority = PRIORITY_MINIMUM
#3 0x00007fb9da8b0ef9 in meta_window_constrain (window=window@entry=0x55b9368b6ee0 [MetaWindowWayland], flags=flags@entry=(META_MOVE_RESIZE_MOVE_ACTION | META_MOVE_RESIZE_RESIZE_ACTION), resize_gravity=resize_gravity@entry=1, orig=orig@entry=0x7ffda389e870, new=new@entry=0x7ffda389e860) at core/constraints.c:305
info = {orig = {x = 580, y = 414, width = 860, height = 347}, current = {x = 580, y = 414, width = 860, height = 347}, action_type = ACTION_MOVE_AND_RESIZE, is_user_action = 0, resize_gravity = 1, fixed_directions = FIXED_DIRECTION_NONE, work_area_monitor = {x = 0, y = 27, width = 1920, height = 1053}, entire_monitor = {x = 0, y = 0, width = 1920, height = 1080}, usable_screen_region = 0x55b934075440 = {0x55b93606db50}, usable_monitor_region = 0x55b934075360 = {0x55b93606d610}}
priority = PRIORITY_MINIMUM
#4 0x00007fb9da8d3741 in meta_window_move_resize_internal (window=0x55b9368b6ee0 [MetaWindowWayland], flags=(META_MOVE_RESIZE_MOVE_ACTION | META_MOVE_RESIZE_RESIZE_ACTION), gravity=1, frame_rect=...) at core/window.c:3963
old_rect = {x = 580, y = 414, width = 860, height = 347}
did_placement = 0
unconstrained_rect = {x = 580, y = 414, width = 860, height = 347}
constrained_rect = {x = 580, y = 414, width = 860, height = 347}
result = (unknown: 0)
moved_or_resized = 0
__func__ = "meta_window_move_resize_internal"
#5 0x00007fb9da8d434c in meta_window_move_resize_now (window=<optimized out>) at core/window.c:4259
window = <optimized out>
tmp = 0x55b936cdf450 = {0x55b9368b6ee0}
copy = 0x55b936cdf450 = {0x55b9368b6ee0}
queue_index = <optimized out>
#6 0x00007fb9da8d434c in idle_move_resize (data=<optimized out>) at core/window.c:4259
window = <optimized out>
tmp = 0x55b936cdf450 = {0x55b9368b6ee0}
copy = 0x55b936cdf450 = {0x55b9368b6ee0}
queue_index = <optimized out>
#7 0x00007fb9da8ce053 in call_idle_later (data=data@entry=0x7fb9ac088790) at core/util.c:866
later = 0x7fb9ac088790
#8 0x00007fb9dc3d71cb in g_idle_dispatch (source=0x55b933eb2440, callback=0x7fb9da8ce040 <call_idle_later>, user_data=0x7fb9ac088790) at gmain.c:5535
again = <optimized out>
#9 0x00007fb9dc3da8ad in g_main_dispatch (context=0x55b933b7cea0) at gmain.c:3177
dispatch = 0x7fb9dc3d71b0 <g_idle_dispatch>
prev_source = 0x0
was_in_call = 0
user_data = 0x7fb9ac088790
callback = 0x7fb9da8ce040 <call_idle_later>
cb_funcs = 0x7fb9dc6a4280 <g_source_callback_funcs>
cb_data = 0x55b936782c70
need_destroy = <optimized out>
source = 0x55b933eb2440
current = 0x55b933b94430
i = 0
__func__ = "g_main_dispatch"
#10 0x00007fb9dc3da8ad in g_main_context_dispatch (context=context@entry=0x55b933b7cea0) at gmain.c:3830
#11 0x00007fb9dc3dac78 in g_main_context_iterate (context=0x55b933b7cea0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3903
max_priority = 115
timeout = 0
some_ready = 1
nfds = <optimized out>
allocated_nfds = 17
fds = 0x7fb9ac09c280
#12 0x00007fb9dc3dafa2 in g_main_loop_run (loop=0x55b933e2d910) at gmain.c:4099
__func__ = "g_main_loop_run"
#13 0x00007fb9da8c0de0 in meta_run () at core/main.c:664
#14 0x000055b9325ca4d8 in main (argc=<optimized out>, argv=<optimized out>) at ../src/main.c:525
ctx = <optimized out>
error = 0x0
ecode = <optimized out>