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 762258 - wayland: gtk3 apps segfault with plasma-wayland/kwin_wayland
wayland: gtk3 apps segfault with plasma-wayland/kwin_wayland
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
3.19.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
https://bugzilla.redhat.com/show_bug....
Depends on:
Blocks:
 
 
Reported: 2016-02-18 11:00 UTC by Olivier Fourdan
Modified: 2017-10-11 07:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: check for support of xdg_shell interface (1.11 KB, patch)
2016-02-18 11:07 UTC, Olivier Fourdan
none Details | Review
wayland: check for support of xdg_shell interface (1.30 KB, patch)
2016-02-18 13:20 UTC, Olivier Fourdan
committed Details | Review

Description Olivier Fourdan 2016-02-18 11:00:31 UTC
Summary:

When gtk3 apps are run with kwin s Wayland compistior, they segfauls at startup. 

Downstream bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1298371

How to reproduce:

1. Run a kwin_wayland nested session:

   $ kwin_wayland --xwayland --windowed

2. Start any gtk3 based application

   $ gnome-calculator

Additional data:

kwin (at least the version found in Fedora 23) does not support xdg_shell whereas gtk3 take it for granted.

segfault in wl_proxy_marshal_constructor() because the proxy is NULL.

Not much gtk+ can do really, but it should bail out more gracefully I guess...

Patch to follow.
Comment 1 Olivier Fourdan 2016-02-18 11:07:50 UTC
Created attachment 321576 [details] [review]
wayland: check for support of xdg_shell interface

When running with a Wayland compositor which doesn't support the xdg_shell interface, gtk+ will segfault while trying to access the corresponding wl proxy.

Check for xdg_shell support to fail more gracefully if not present.
Comment 2 Christian Stadelmann 2016-02-18 11:52:32 UTC
See also: http://bugs.kde.org/show_bug.cgi?id=359531
Comment 3 Olivier Fourdan 2016-02-18 13:20:47 UTC
Created attachment 321584 [details] [review]
wayland: check for support of xdg_shell interface

Updated patch, if xdg_shell is not available, we don't abort, we simply don't use Wayland and hope for the best with X11.

    When running with a Wayland compositor which doesn't support the
    xdg_shell interface, gtk+ will segfault while trying to access the
    corresponding wl proxy.
    
    Check for xdg_shell support and do not use Wayland if not present, so
    that it can fallback to X11, hoping that Xwayland is usable.
Comment 4 Matthias Clasen 2016-02-18 14:17:42 UTC
Review of attachment 321584 [details] [review]:

looks good to me
Comment 5 Olivier Fourdan 2016-02-18 14:32:20 UTC
Review of attachment 321584 [details] [review]:

attachment 321584 [details] [review] pushed as commit 5a253c5 wayland: check for support of xdg_shell interface