smithay icon indicating copy to clipboard operation
smithay copied to clipboard

Segfaults when OpenGL application exits when the `dmabuf` global is not registered.

Open i509VCB opened this issue 4 years ago • 1 comments

Discovered this while working on #371 and forgot to create the dmabuf globals.

Reproduction:

  • Comment out the code inside winit (or the X11 backend from #371) that registers the dmabuf global.
  • Open weston-terminal
  • Open some OpenGL application, in my case I've have this happens with qutebrowser and alacritty.
  • Close the OpenGL application using the X in the window decorations.

Having used the debugger, this seems to happen when the cleanup of dead surfaces occurs in anvil and then dropping the Gles2Texture that is boxed up inside of SurfaceData which releases the buffer.

Capture from debugger: image

i509VCB avatar Oct 01 '21 06:10 i509VCB

So, this is pretty likely related to the way we handle wl_drm buffers.

elinorbgr avatar Oct 01 '21 13:10 elinorbgr