After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 776036 - wayland: mutter fails with meta-wayland-surface.c:1183:update_surface_output_state: assertion failed: (surface->role)
wayland: mutter fails with meta-wayland-surface.c:1183:update_surface_output_...
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2016-12-13 08:15 UTC by Olivier Fourdan
Modified: 2016-12-13 17:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] wayland: disconnect mapped signal handler on destroy (1.74 KB, patch)
2016-12-13 10:34 UTC, Olivier Fourdan
committed Details | Review

Description Olivier Fourdan 2016-12-13 08:15:26 UTC
Summary:

This is a follow up on bug 775986 and apparently a regression that appeared after bug 771694 

When testing gtksourceview against mutter, mutter dies with an assert() failed:

mutter/src/wayland/meta-wayland-surface.c:1183:update_surface_output_state: assertion failed: (surface->role)

How reproducible:

always

Steps to reproduce:

1. Run gtksourceview test-completion

   $ WAYLAND_DISPLAY=wayland-1 jhbuild run  ~/.cache/jhbuild/build/gtksourceview/tests/test-completion

2. Start typing a few characters until the completion widget appears
3. Navigate to some item in the list, and click on "Details", the detail window pop-up shows up
4. Click again on Details to hide the detail pop-up

Expected result:

The detail pop-up window hides

Actual result:

mutter dies with assertion failed.

Additional info:

backtrace

  • #0 __GI_raise
    at ../sysdeps/unix/sysv/linux/raise.c line 58
  • #1 __GI_abort
    at abort.c line 89
  • #2 g_assertion_message
  • #3 g_assertion_message_expr
    at /home/ofourdan/src/gnome/glib/glib/gtestutils.c line 2456
  • #4 update_surface_output_state
    at /home/ofourdan/src/gnome/mutter/src/wayland/meta-wayland-surface.c line 1183
  • #5 g_hash_table_foreach
    at /home/ofourdan/src/gnome/glib/glib/ghash.c line 1608
  • #6 g_closure_invoke
    at /home/ofourdan/src/gnome/glib/gobject/gclosure.c line 804
  • #7 signal_emit_unlocked_R
    at /home/ofourdan/src/gnome/glib/gobject/gsignal.c line 3635
  • #8 g_signal_emit_valist
    at /home/ofourdan/src/gnome/glib/gobject/gsignal.c line 3391
  • #9 g_signal_emit
    at /home/ofourdan/src/gnome/glib/gobject/gsignal.c line 3447
  • #10 g_object_dispatch_properties_changed
    at /home/ofourdan/src/gnome/glib/gobject/gobject.c line 1064
  • #11 g_object_notify_by_spec_internal
    at /home/ofourdan/src/gnome/glib/gobject/gobject.c line 1157
  • #12 g_object_notify_by_pspec
    at /home/ofourdan/src/gnome/glib/gobject/gobject.c line 1267
  • #13 clutter_actor_real_unmap
    at /home/ofourdan/src/gnome/mutter/clutter/clutter/clutter-actor.c line 1607
  • #14 clutter_actor_set_mapped
    at /home/ofourdan/src/gnome/mutter/clutter/clutter/clutter-actor.c line 1283
  • #15 clutter_actor_update_map_state
    at /home/ofourdan/src/gnome/mutter/clutter/clutter/clutter-actor.c line 1457
  • #16 clutter_actor_real_unmap
    at /home/ofourdan/src/gnome/mutter/clutter/clutter/clutter-actor.c line 1593
  • #17 clutter_actor_set_mapped
    at /home/ofourdan/src/gnome/mutter/clutter/clutter/clutter-actor.c line 1283
  • #18 clutter_actor_update_map_state
    at /home/ofourdan/src/gnome/mutter/clutter/clutter/clutter-actor.c line 1457
  • #19 clutter_actor_real_hide
    at /home/ofourdan/src/gnome/mutter/clutter/clutter/clutter-actor.c line 1832
  • #20 g_closure_invoke
    at /home/ofourdan/src/gnome/glib/gobject/gclosure.c line 804
  • #21 signal_emit_unlocked_R
    at /home/ofourdan/src/gnome/glib/gobject/gsignal.c line 3565
  • #22 g_signal_emit_valist
    at /home/ofourdan/src/gnome/glib/gobject/gsignal.c line 3391
  • #23 g_signal_emit
    at /home/ofourdan/src/gnome/glib/gobject/gsignal.c line 3447
  • #24 clutter_actor_hide
    at /home/ofourdan/src/gnome/mutter/clutter/clutter/clutter-actor.c line 1893
  • #25 meta_window_actor_after_effects
    at /home/ofourdan/src/gnome/mutter/src/compositor/meta-window-actor.c line 1123
  • #26 meta_window_actor_effect_completed
    at /home/ofourdan/src/gnome/mutter/src/compositor/meta-window-actor.c line 1200
  • #27 meta_plugin_manager_event_simple
    at /home/ofourdan/src/gnome/mutter/src/compositor/meta-plugin-manager.c line 195
  • #28 start_simple_effect
    at /home/ofourdan/src/gnome/mutter/src/compositor/meta-window-actor.c line 1101
  • #29 meta_window_actor_hide
    at /home/ofourdan/src/gnome/mutter/src/compositor/meta-window-actor.c line 1361
  • #30 meta_compositor_hide_window
    at /home/ofourdan/src/gnome/mutter/src/compositor/compositor.c line 790
  • #31 meta_window_unmanage
    at /home/ofourdan/src/gnome/mutter/src/core/window.c line 1312
  • #32 meta_wayland_surface_destroy_window
    at /home/ofourdan/src/gnome/mutter/src/wayland/meta-wayland-surface.c line 409
  • #33 wl_surface_destructor
    at /home/ofourdan/src/gnome/mutter/src/wayland/meta-wayland-surface.c line 1242
  • #34 destroy_resource
    at /home/ofourdan/src/gnome/wayland/src/wayland-server.c line 611
  • #35 wl_resource_destroy
    at /home/ofourdan/src/gnome/wayland/src/wayland-server.c line 626
  • #36 ffi_call_unix64
    from /lib64/libffi.so.6
  • #37 ffi_call
    from /lib64/libffi.so.6
  • #38 wl_closure_invoke
    at /home/ofourdan/src/gnome/wayland/src/connection.c line 935
  • #39 wl_client_connection_data
    at /home/ofourdan/src/gnome/wayland/src/wayland-server.c line 371
  • #40 wl_event_loop_dispatch
    at /home/ofourdan/src/gnome/wayland/src/event-loop.c line 423
  • #41 wayland_event_source_dispatch
    at /home/ofourdan/src/gnome/mutter/src/wayland/meta-wayland.c line 79
  • #42 g_main_dispatch
    at /home/ofourdan/src/gnome/glib/glib/gmain.c line 3203
  • #43 g_main_context_dispatch
    at /home/ofourdan/src/gnome/glib/glib/gmain.c line 3856
  • #44 g_main_context_iterate
    at /home/ofourdan/src/gnome/glib/glib/gmain.c line 3929
  • #45 g_main_loop_run
    at /home/ofourdan/src/gnome/glib/glib/gmain.c line 4125
  • #46 meta_run
    at /home/ofourdan/src/gnome/mutter/src/core/main.c line 572
  • #47 main
    at /home/ofourdan/src/gnome/mutter/src/core/mutter.c line 85

Comment 1 Olivier Fourdan 2016-12-13 10:16:15 UTC
Regression caused by commit 5eb5f72 from bug 775478
Comment 2 Olivier Fourdan 2016-12-13 10:34:48 UTC
Created attachment 341865 [details] [review]
[PATCH] wayland: disconnect mapped signal handler on destroy

Commit 5eb5f72 - wayland: Check surface outputs after mapped state
changes connected the ::mapped signal handler, we need to disconnect it
on destroy to avoid a possible assertion failure in
update_surface_output_state()
Comment 3 Carlos Garnacho 2016-12-13 12:25:54 UTC
Review of attachment 341865 [details] [review]:

Doh, looks right to me. Should we also disconnect from MetaSurfaceActor::painting?
Comment 4 Olivier Fourdan 2016-12-13 13:53:50 UTC
(In reply to Carlos Garnacho from comment #3)
> Review of attachment 341865 [details] [review] [review]:
> 
> Doh, looks right to me. Should we also disconnect from
> MetaSurfaceActor::painting?

I could be wrong but at least I don't see it causing a crash, besides it's not part of a recent change, is it?
Comment 5 Jonas Ådahl 2016-12-13 14:03:37 UTC
(In reply to Olivier Fourdan from comment #4)
> (In reply to Carlos Garnacho from comment #3)
> > Review of attachment 341865 [details] [review] [review] [review]:
> > 
> > Doh, looks right to me. Should we also disconnect from
> > MetaSurfaceActor::painting?
> 
> I could be wrong but at least I don't see it causing a crash, besides it's
> not part of a recent change, is it?

I don't think we need to disconnect that one. We won't be painted during the destruction, so it won't be triggered before its automatically disconnected at GObject destruction.
Comment 6 Olivier Fourdan 2016-12-13 14:36:23 UTC
Comment on attachment 341865 [details] [review]
[PATCH] wayland: disconnect mapped signal handler on destroy

attachment 341865 [details] [review] pushed to git master as commit 1ab6ac2 - wayland: disconnect mapped signal handler on destroy
Comment 7 Olivier Fourdan 2016-12-13 14:44:23 UTC
Not pushing to gnome-3-22 branch as it's not affected (commit 5eb5f72 was not backported to gnome-3-22)
Comment 8 Carlos Garnacho 2016-12-13 17:03:07 UTC
(In reply to Jonas Ådahl from comment #5)
> (In reply to Olivier Fourdan from comment #4)
> > (In reply to Carlos Garnacho from comment #3)
> > > Review of attachment 341865 [details] [review] [review] [review] [review]:
> > > 
> > > Doh, looks right to me. Should we also disconnect from
> > > MetaSurfaceActor::painting?
> > 
> > I could be wrong but at least I don't see it causing a crash, besides it's
> > not part of a recent change, is it?
> 
> I don't think we need to disconnect that one. We won't be painted during the
> destruction, so it won't be triggered before its automatically disconnected
> at GObject destruction.

Fair enough, I was just thinking that if the MetaSurfaceActor can be artificially kept alive after the MetaWaylandSurface is destroyed, there's a chance for that to happen.