<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Crash when destroying a newly resized EGLsurface with wayland egl (dri2)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=105507#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Crash when destroying a newly resized EGLsurface with wayland egl (dri2)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=105507">bug 105507</a>
from <span class="vcard"><a class="email" href="mailto:daniel@fooishbar.org" title="Daniel Stone <daniel@fooishbar.org>"> <span class="fn">Daniel Stone</span></a>
</span></b>
<pre>(In reply to Pekka Paalanen from <a href="show_bug.cgi?id=105507#c4">comment #4</a>)
<span class="quote">> (In reply to Daniel Stone from <a href="show_bug.cgi?id=105507#c2">comment #2</a>)
> > You could place any orphaned wl_buffers on an per-surface list instead, and
> > spin at destruction until that emptied.
>
> What would guarantee that the last committed wl_buffer would actually get
> released at all?
>
> Destroying the EGLSurface cannot destroy the wl_surface, because the
> wl_surface is caller-owned, isn't it?</span >
Correct, so the only correct (though incredibly counter-intuitive) course of
action is to destroy the wl_surface before destroying the EGLSurface.
Alternately, destroy the wl_surface role object in such a way which guarantees
it's unmapped.
The fact people don't actually do this is why Mesa just immediately destroys
_all_ buffers - released or not - when the EGLSurface is destroyed. If the
buffer hasn't been released, you might catch a client error.
That being said, I was suggesting 'orphaned' wl_buffers: i.e. where they are
still marked busy, but have been discarded from the surface list due to a
resize request. This happens on the first draw call after a surface resize, so
the only point which a buffer could be so orphaned and not have a release
scheduled is if you did: wl_egl_window_resize(); glClear();
eglDestroySurface(); without swapping. Or, I guess, if you were frozen in a
synchronous subsurface.
(I'm really regretting caving in and making it illegal to destroy an unreleased
wl_buffer.)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>