[Wayland-bugs] [Bug 773274] [Wayland] Crash under gdk_wayland_window_attach_image()

gtk+ (GNOME Bugzilla) bugzilla at gnome.org
Wed Nov 2 19:18:23 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=773274

--- Comment #20 from Olivier Fourdan <ofourdan at redhat.com> ---
(In reply to Ray Strode [halfline] from comment #18)
> ohhhhh okay, where's the source to the example you're running?  I wonder why
> its doing gdk_flush.

The reproducer is the one attached in bug 773307.

> If it continues to draw after the gdk_flush it's going to write to a cairo
> surface that won't ultimately get committed but I guess that's okay.
> 
> As an aside, I think maybe we should have:
> 
>   g_clear_pointer (&impl->staged_updates_region, cairo_region_destroy);
> 
> in drop_cairo_surfaces since the staged updates just got dropped.

Possibly but I'm not sure it's necessary for this particular bug, is it? (but I
have no problem amending the patch if needed. or even add a separate patch for
that)

(In reply to Ray Strode [halfline] from comment #19)
> Review of attachment 338945 [details] [review]:
> 
> ::: gdk/wayland/gdkwindow-wayland.c
> @@ +906,3 @@
>  
> +  if (impl->staging_cairo_surface &&
> +      _gdk_wayland_is_shm_surface (impl->staging_cairo_surface) &&
> 
> i don't think the is_shm_surface check is necessary ?

In theory, I agree, but it's how it's done elsewhere in
gdk_wayland_window_ensure_cairo_surface():

https://git.gnome.org/browse/gtk+/tree/gdk/wayland/gdkwindow-wayland.c?h=gtk-3-22#n824

Besides, there is an assert() in gdk_wayland_window_attach_image() which would
fail precisely if not a shm_surface():

https://git.gnome.org/browse/gtk+/tree/gdk/wayland/gdkwindow-wayland.c?h=gtk-3-22#n733

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20161102/db4e3537/attachment-0001.html>


More information about the wayland-bugs mailing list