GNOME Bugzilla – Bug 776220
GTK applications crash when using touchscreen
Last modified: 2018-04-05 19:42:18 UTC
To reproduce: 1) start up gnome shell with wayland backend 2) open a gtk application (evince, nautilus...) 3) touch the date in the upper bar, the calendar will show up 4) click on the gtk application you opened before (outside the calendar) 5) the application will crash This is the stack trace when I do this with nautilus: Stack trace of thread 587: #0 0x00007f5eb69cce50 _create_touch_event (libgdk-3.so.0) #1 0x00007f5eb69cd6d3 touch_handle_up (libgdk-3.so.0) #2 0x00007f5eaf1471c8 ffi_call_unix64 (libffi.so.6) #3 0x00007f5eaf146c2a ffi_call (libffi.so.6) #4 0x00007f5eb10dd08e wl_closure_invoke (libwayland-client.so.0) #5 0x00007f5eb10d9d20 dispatch_event (libwayland-client.so.0) #6 0x00007f5eb10daf74 dispatch_queue (libwayland-client.so.0) #7 0x00007f5eb69d7734 _gdk_wayland_display_queue_events (libgdk-3.so.0) #8 0x00007f5eb6977169 gdk_display_get_event (libgdk-3.so.0) #9 0x00007f5eb69d7422 gdk_event_source_dispatch (libgdk-3.so.0) #10 0x00007f5eb52b2587 g_main_context_dispatch (libglib-2.0.so.0) #11 0x00007f5eb52b27f0 n/a (libglib-2.0.so.0) #12 0x00007f5eb52b289c g_main_context_iteration (libglib-2.0.so.0) #13 0x00007f5eb586c54d g_application_run (libgio-2.0.so.0) #14 0x00000000004293ba n/a (nautilus) #15 0x00007f5eb49c9291 __libc_start_main (libc.so.6) #16 0x000000000042941a n/a (nautilus) This is when I do this with evince: Stack trace of thread 1329: #0 0x00007f2b232cc3dd touch_handle_motion (libgdk-3.so.0) #1 0x00007f2b1bd551c8 ffi_call_unix64 (libffi.so.6) #2 0x00007f2b1bd54c2a ffi_call (libffi.so.6) #3 0x00007f2b1de6908e wl_closure_invoke (libwayland-client.so.0) #4 0x00007f2b1de65d20 dispatch_event (libwayland-client.so.0) #5 0x00007f2b1de66f74 dispatch_queue (libwayland-client.so.0) #6 0x00007f2b232d2734 _gdk_wayland_display_queue_events (libgdk-3.so.0) #7 0x00007f2b23272169 gdk_display_get_event (libgdk-3.so.0) #8 0x00007f2b232d2422 gdk_event_source_dispatch (libgdk-3.so.0) #9 0x00007f2b21dc2587 g_main_context_dispatch (libglib-2.0.so.0) #10 0x00007f2b21dc27f0 n/a (libglib-2.0.so.0) #11 0x00007f2b21dc289c g_main_context_iteration (libglib-2.0.so.0) #12 0x00007f2b2237c54d g_application_run (libgio-2.0.so.0) #13 0x000000000041ce1e n/a (evince) #14 0x00007f2b214d9291 __libc_start_main (libc.so.6) #15 0x000000000041cf4a n/a (evince)
Correction: step 4 should say "touch" instead of "click", just like step 3. This issue only happens when using the touch screen.
This is an inconsistency in mutter, the client receives wl_touch.motion with no prior wl_touch.down.
I can confirm this crash on Arch running Gnome 3.24.
*** Bug 774187 has been marked as a duplicate of this bug. ***
This bug is still present in fedora 26. It crashes 100% reliably nautilus, gnome-terminal, evince, ... (by following the steps William described). gtk3-3.22.12-2.fc26.x86_64 mutter-3.24.1-1.fc26.x86_64
Crash → major (not critical since there is a workaround, first clicking again on the menu to make it disappear).
*** Bug 786420 has been marked as a duplicate of this bug. ***
*** Bug 783960 has been marked as a duplicate of this bug. ***
(In reply to Alexandre Franke from comment #6) > Crash → major (not critical since there is a workaround, first clicking > again on the menu to make it disappear). Crashes don't have 'workarounds', and the steps in comment 0 appear not to be the only way to trigger this crash, judging from downstream (in b.r.c) gnome-terminal bugs.
(In reply to Christian Persch from comment #9) > Crashes don't have 'workarounds' Definition from Wikipedia: > A workaround is a bypass of a recognized problem in a system. The crash occurs when one clicks directly on an application to get out of a Shell widget and back to the application. As stated in comment #6, if one first clicks again on the Shell menu to get out of it, the crash doesn’t happen which works around the identified problem. > and the steps in comment 0 appear not to > be the only way to trigger this crash, judging from downstream (in b.r.c) > gnome-terminal bugs. Could you please give links to or quote those downstream reports? Merely stating they exist isn’t really helpful.
(In reply to Alexandre Franke from comment #10) > Could you please give links to or quote those downstream reports? Merely > stating they exist isn’t really helpful. https://bugzilla.redhat.com/show_bug.cgi?id=1491510
This trace has more details, touch id value is zero. gnome-shell/mutter/gnome-terminal 3.26.2 wayland-client 1.14.0 gtk3 3.22.25 glib 2.54.2 I am unable to reproduce the steps to this one. gnome-terminal was already running for a while and I was annoyed by the virtual keyboard constantly popping up. I closed it a few times, disabled it and somehow got this trace.
+ Trace 238155
Thread 1 (Thread 0x7fc15c6b1a80 (LWP 17182))
*** Bug 791830 has been marked as a duplicate of this bug. ***
Created attachment 365834 [details] [review] wayland: Only send full sequences of touch events to clients If input happens to be grabbed somewhere along the shell, and ungrabbed while a touch operation is ongoing, the wayland bits will happily start sending wl_touch.update events from an undeterminate point, without clients having ever received wl_touch.down for that id. Consider those touches grabbed for the entirety of their lifetime, if wl_touch.down wasn't received by the client, no other events will.
Review of attachment 365834 [details] [review]: Looks correct to me.
Thanks! Pushed to master and gnome-3-26 Attachment 365834 [details] pushed as 7980264 - wayland: Only send full sequences of touch events to clients
*** Bug 795010 has been marked as a duplicate of this bug. ***