<html>
    <head>
      <base href="https://bugzilla.gnome.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Wayland] Crash under gdk_wayland_window_attach_image()"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=773274#c13">Comment # 13</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Wayland] Crash under gdk_wayland_window_attach_image()"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=773274">bug 773274</a>
              from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=ofourdan%40redhat.com" title="Olivier Fourdan <ofourdan@redhat.com>"> <span class="fn">Olivier Fourdan</span></a>
</span></b>
        <pre>(In reply to Ray Strode [halfline] from <a href="show_bug.cgi?id=773274#c12">comment #12</a>)
<span class="quote">> but under what circumstance is drop_cairo_surfaces getting called before
> end_paint ?</span >

When the client is resized, from gdk_wayland_window_update_size(), which
explains the reproducer from <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Wayland] crash at gdk_flush() called from "draw" signal handler during resize"
   href="show_bug.cgi?id=773307">bug 773307</a> (which I used to investigate this one,
so I reckon both are the same issue)

Adding traces in gdk_window_impl_wayland_end_paint(), drop_cairo_surfaces(),
gdk_wayland_window_update_size(), and gdk_wayland_window_destroy() (the last
tow being the only caller of drop_cairo_surfaces()) shows:

gdk_wayland_window_update_size() window 0x1c473440 surface (nil)
drop_cairo_surfaces() window 0x1c473440 surface (nil)
gdk_wayland_window_update_size() window 0x1c473440 surface (nil)
drop_cairo_surfaces() window 0x1c473440 surface (nil)
gdk_window_impl_wayland_end_paint() window 0x1c473440 surface 0x1c61e590
gdk_window_impl_wayland_end_paint() window 0x1c473440 surface 0x1c61e590
gdk_wayland_window_update_size() window 0x1c473440 surface 0x1c61e590
drop_cairo_surfaces() window 0x1c473440 surface 0x1c61e590
gdk_wayland_window_update_size() window 0x1c473440 surface 0x1c75e430
drop_cairo_surfaces() window 0x1c473440 surface 0x1c75e430
gdk_wayland_window_update_size() window 0x1c473440 surface (nil)
drop_cairo_surfaces() window 0x1c473440 surface (nil)
gdk_wayland_window_update_size() window 0x1c473440 surface (nil)
drop_cairo_surfaces() window 0x1c473440 surface (nil)
gdk_window_impl_wayland_end_paint() window 0x1c473440 surface (nil)
Segmentation fault (core dumped)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>