Regression in Xwayland/EGLstream backend causes Xwayland to crash
Description
Xwayland 21.1.0 would crash with the NVidia closes soruce driver and EGLStream because of an Wayland error while trying to attach the buffer.
Issue reported downstream in Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1943936
Version
Xwayland 21.1.0
Steps to reproduce
Unclear.
It's been reported to occur randomly when using Clion
and Firefox
.
Additional data
This is not a crash but an abort triggered by a Wayland error:
(EE) Fatal server error:
(EE) wl_surface@56: error 2: Failed to attach buffer to surface 56: Unknown buffer type
The compositor (mutter) would raise that error when it fails to attach the given buffer to the Wayland surface.
That error, however, comes immediately after a couple of GL errors reported by glamor:
(EE) glamor0: GL error: GL_INVALID_OPERATION error generated.
(EE) glamor0: GL error: GL_INVALID_FRAMEBUFFER_OPERATION error generated. Operation is not valid because a bound framebuffer is not framebuffer complete.
This happens with the NVidia proprietary driver and Xwayland
standalone so with all the latest changes in glamor, so most likely something glamor does that the NVidia close source driver doesn't like.
It is worth noting, however, that the GL_FRAMEBUFFER_COMPLETE
state is supposedly tested in glamor's glamor_pixmap_ensure_fb()
so it is unclear as to why the error GL_INVALID_FRAMEBUFFER_OPERATION
is triggered.