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 767848 - crash in the window test
crash in the window test
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-06-20 01:22 UTC by Matthias Clasen
Modified: 2016-06-20 18:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] wayland: do not set PRIMARY selection if focus is lost (997 bytes, patch)
2016-06-20 14:02 UTC, Olivier Fourdan
committed Details | Review

Description Matthias Clasen 2016-06-20 01:22:53 UTC
I am hitting this assertion, running testsuite/gtk/window under wayland:

  • #0 _g_log_abort
    at gmessages.c line 328
  • #1 g_logv
    at gmessages.c line 1080
  • #2 g_log
    at gmessages.c line 1119
  • #3 g_return_if_fail_warning
  • #4 g_object_ref
    at gobject.c line 3049
  • #5 emit_selection_owner_change
    at gdkdevice-wayland.c line 868
  • #6 primary_selection_selection
    at gdkdevice-wayland.c line 1067
  • #7 ffi_call_unix64
    at ../src/x86/unix64.S line 76
  • #8 ffi_call
    at ../src/x86/ffi64.c line 525
  • #9 wl_closure_invoke
    at src/connection.c line 949
  • #10 dispatch_event
    at src/wayland-client.c line 1288
  • #11 dispatch_queue
    at src/wayland-client.c line 1434
  • #12 wl_display_dispatch_queue_pending
    at src/wayland-client.c line 1676
  • #13 wl_display_dispatch_pending
    at src/wayland-client.c line 1739
  • #14 _gdk_wayland_display_queue_events
    at gdkeventsource.c line 195
  • #15 gdk_display_get_event
    at gdkdisplay.c line 437
  • #16 gdk_event_source_dispatch
    at gdkeventsource.c line 114
  • #17 g_main_dispatch
    at gmain.c line 3165
  • #18 g_main_context_dispatch
    at gmain.c line 3780
  • #19 g_main_context_iterate
    at gmain.c line 3851
  • #20 g_main_loop_run
    at gmain.c line 4045

Comment 1 Olivier Fourdan 2016-06-20 14:02:09 UTC
Yes, I can reproduce randomly.

The window passed to emit_selection_owner_change() is NULL when this occurs, and that comes from primary_selection_selection().

I guess this is a race condition, as testsuite/gtk/window maps/unmaps windows rapidly, the keyboard focus might be already lost by the time this gets called.
Comment 2 Olivier Fourdan 2016-06-20 14:02:52 UTC
Created attachment 330070 [details] [review]
[PATCH] wayland: do not set PRIMARY selection if focus is lost

If keyboard focus is (already) lost, do not advertise PRIMARY selection.
Comment 3 Matthias Clasen 2016-06-20 15:10:27 UTC
Review of attachment 330070 [details] [review]:

That looks almost too easy