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 762755 - Epiphany, Eye of GNOME crash when run in gdkwindow-wayland.c buffer_release_callback()
Epiphany, Eye of GNOME crash when run in gdkwindow-wayland.c buffer_release_c...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
3.19.x
Other Linux
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
: 762584 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-02-26 21:20 UTC by Bjørn Lie
Modified: 2016-02-29 18:08 UTC
See Also:
GNOME target: 3.20
GNOME version: ---


Attachments
backtrace - opened a new tab, crash. (19.92 KB, text/plain)
2016-02-26 21:20 UTC, Bjørn Lie
  Details
wayland: deal with staging buffer getting allocated prematurely (4.45 KB, patch)
2016-02-27 22:09 UTC, Ray Strode [halfline]
committed Details | Review

Description Bjørn Lie 2016-02-26 21:20:34 UTC
Created attachment 322492 [details]
backtrace - opened a new tab, crash.

Epiphany crashes often when run in a wayland session.
This is with 

epiphany 3.19.10
webkit2gtk3 2.11.90
cairo 1.15.2
gtk3 3.19.10
gnome-shell 3.19.10
mutter 3.19.10
clutter 1.25.6


--

Program received signal SIGSEGV, Segmentation fault.
INT_cairo_region_is_empty (region=0x0) at cairo-region.c:816
816	cairo-region.c: Ingen slik fil eller filkatalog. (No such file or file catalog).

See attachment for full bt
Comment 1 Michael Catanzaro 2016-02-26 21:23:52 UTC
FWIW, it works for me in jhbuild (I tested with recently-updated dependencies about a week ago).
Comment 2 Felix Riemann 2016-02-27 19:06:55 UTC
I received a similar crash report for eog: bug 762584

However, I am also unable to reproduce it in a F23 Wayland session and I can't get a Rawhide image to boot.
Comment 3 Michael Catanzaro 2016-02-27 19:28:00 UTC
*** Bug 762584 has been marked as a duplicate of this bug. ***
Comment 4 Michael Catanzaro 2016-02-27 19:34:03 UTC
Ray, any ideas...?
Comment 5 Ray Strode [halfline] 2016-02-27 22:07:53 UTC
well the obvious fix is to add a null check for the region, but that just trades a crash for a warning, since the line is:

g_warn_if_fail (!cairo_region_is_empty (impl->staged_updates_region));

The g_warn_if_fail is wrong, since that code path can run any time something calls begin_paint and then doesn't paint anything.

I think I know a better tactic to take and I'll attach a draft patch to that effect, but I can't actually test it since epiphany won't start at all for me. it's trying to use X11 specific code:

Gdk-WARNING **: gdkwindow-x11.c:5550 drawable is not a native X11 window

Gdk-WARNING **: gdkwindow-x11.c:5550 drawable is not a native X11 window

GLib-GObject-WARNING **: invalid cast from 'GdkWaylandVisual' to 'GdkX11Visual'

Gdk-WARNING **: gdkwindow-x11.c:5550 drawable is not a native X11 window
Segmentation fault (core dumped)
Comment 6 Ray Strode [halfline] 2016-02-27 22:09:21 UTC
Created attachment 322555 [details] [review]
wayland: deal with staging buffer getting allocated prematurely

The staging buffer gets called any time begin_paint is called
on the window. That can happen with an empty paint region, so
we should cope with that situation.
Comment 7 Ray Strode [halfline] 2016-02-27 22:10:07 UTC
Review of attachment 322555 [details] [review]:

s/gets called/gets allocated/
Comment 8 Ray Strode [halfline] 2016-02-27 22:13:48 UTC
oh updating webkit fixed that warnings and crash
Comment 9 Bjørn Lie 2016-02-29 15:49:10 UTC
Rebuilding gkt3 with Ray's patch gives me non-crashing epiphany and eog under wayland again. So +1 from me
Comment 10 Ray Strode [halfline] 2016-02-29 16:40:03 UTC
Matthias was hitting this with poedit.  He reproduced the crash, tested the patch, and told me to push.

Attachment 322555 [details] pushed as 316fe1d - wayland: deal with staging buffer getting allocated prematurely