[PATCH weston] gl-renderer: Set renderer to NULL after destroyed

Daniel Stone daniel at fooishbar.org
Tue Aug 11 11:11:24 PDT 2015

Hi Emre,

On 11 August 2015 at 14:45, Ucan, Emre (ADITG/SW1) <eucan at de.adit-jv.com> wrote:
> Hi,
>> -----Original Message-----
>> From: Dawid Gajownik [mailto:gajownik at gmail.com]
>> Sent: Dienstag, 11. August 2015 15:31
>> To: Ucan, Emre (ADITG/SW1)
>> Cc: wayland-devel at lists.freedesktop.org
>> Subject: Re: [PATCH weston] gl-renderer: Set renderer to NULL after
>> destroyed
>> On Tue, Aug 11, 2015 at 4:09 AM, Ucan, Emre (ADITG/SW1) <eucan at de.adit-
>> jv.com> wrote:
>> > The pointer of the renderer in the compositor data structure is
>> > controlled in weston_compositor_shutdown. When it is not NULL, the
>> > destroy method of the renderer is called. Therefore, the renderer
>> > pointer should be set to NULL in gl_renderer_destroy, so that it would not
>> be called when it is already destroyed.
>> Hey,
>> when it's destroyed twice? In X11 backend in x11_backend_create()?
>> Maybe we should not call renderer->destroy(compositor) directly but use
>> weston_compositor_shutdown(compositor)?
>> Or did you find another case when renderer is already destroyed?
> Yes, in many places:
> - fbdev_compositor_create
> - drm_compositor_create
> - rpi_compositor_create
> - wayland_compositor_create

As far as I can tell, this is no longer an issue in current git. None
of the backends appear to manually destroy the renderer as well as
calling weston_compositor_shutdown, and the core code does not call
weston_compositor_shutdown if backend_init fails. So I think this
particular problem should be OK now?


More information about the wayland-devel mailing list