GNOME Bugzilla – Bug 727021
Several GTK+ apps crash when running on wayland backend
Last modified: 2014-07-21 07:25:54 UTC
Trying GTK+ apps in Weston right now. I have managed to crash evince and I believe it's something related to GTK+. Clicking on evince icon that shows drop down menu (see screenshot, it's underlined) will crash when I click on it the second time, ie: Click on it, move mouse away from it and let the menu disappear, click on it again and the crash happens. So far I have been able to reproduce the crash every time on weston drm and x11 backends. I have captured the core dump, forgive me for not having all the debug symbols. I can add them if necessary. (evince:26186): Gdk-ERROR **: wl_surface@22: error 0: desktop_shell::get_shell_surface already requested rogram received signal SIGTRAP, Trace/breakpoint trap. g_logv (log_domain=0x7ffff6a17426 "Gdk", log_level=G_LOG_LEVEL_ERROR, format=<optimized out>, args=<optimized out>) at gmessages.c:1038 1038 gmessages.c: No such file or directory. (gdb) bt
+ Trace 233392
I am able to reproduce this with any program that has some kind of drop down menu eog gedit rhythmbox totem glib-2.40.0 atk-2.12.0 cairo-1.12.16 pango-1.36.3 at-spi2-core-2.12.0 at-spi2-atk-2.12.0 gdk-pixbuf-2.30.7 gtk+-3.12.0 wayland-1.4.0-26-g3adcf6f (git master) weston-1.4.0-109-ge81a175 (git master)
Created attachment 272856 [details] Evince screenshot
Created attachment 278322 [details] [review] proposed patch The popup crashes occur as weston throws an error when trying to re-create an xdg surface. This can be solved in weston, but it might make sense to sync the lifetime behaviour of xdg_shell with that of wl_shell_surface. The attached patch uses the assumption that that's the way forward :) Things i'm unsure about: * Interaction with custom surfaces * I'm assuming ->show always gets called before ->process_updates_recurse (either for new windows or after a window has been hidden). Testing the patch with gtk3-demo revealed now new isseus and fixed the client crashing when opening/closing combo boxes
Curiously it looks like Jasper committed *exactly* the same patch about a week after I posted this one. So i guess this one can be marked as resolved: commit 87e2a7d4b23e633d0f2263d6ebd205c113eede0f Author: Jasper St. Pierre <jstpierre@mecheye.net> Date: Thu Jun 19 15:04:09 2014 -0400 gdkwindow-wayland: Destroy the wl_surface too when hiding a window wl_surfaces can't switch roles, so destroying the xdg_surface but not the wl_surface means that we could get an error when trying to re-map the surface. We could fix this by not destroying the xdg resource and only do it at finalization time, but it's just as easy to just create a new wl_surface.