Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.12.3, 5.12.4
-
None
-
-
28c852df3825be05bea9e3d17475c73c409ee534 (qt/qtwayland/5.12)
Description
Start the "phong-cubes" example for instance, it may either crash or continuously print warnings like this:
Using Wayland-EGL Using the 'xdg-shell' shell integration QWaylandGLContext::makeCurrent: eglError: 300d, this: 0x7f151415d620 Qt3D.Renderer.Backend: bool Qt3DRender::Render::GraphicsContext::makeCurrent(QSurface *) makeCurrent failed QWaylandGLContext::makeCurrent: eglError: 300d, this: 0x7f151415d620 Qt3D.Renderer.Backend: bool Qt3DRender::Render::GraphicsContext::makeCurrent(QSurface *) makeCurrent failed QWaylandGLContext::makeCurrent: eglError: 300d, this: 0x7f151415d620 Qt3D.Renderer.Backend: bool Qt3DRender::Render::GraphicsContext::makeCurrent(QSurface *) makeCurrent failed QWaylandGLContext::makeCurrent: eglError: 300d, this: 0x7f151415d620 Qt3D.Renderer.Backend: bool Qt3DRender::Render::GraphicsContext::makeCurrent(QSurface *) makeCurrent failed QWaylandGLContext::makeCurrent: eglError: 300d, this: 0x7f151415d620 Qt3D.Renderer.Backend: bool Qt3DRender::Render::GraphicsContext::makeCurrent(QSurface *) makeCurrent failed QWaylandGLContext::makeCurrent: eglError: 300d, this: 0x7f151415d620 Qt3D.Renderer.Backend: bool Qt3DRender::Render::GraphicsContext::makeCurrent(QSurface *) makeCurrent failed QWaylandGLContext::makeCurrent: eglError: 300d, this: 0x7f151415d620 Qt3D.Renderer.Backend: bool Qt3DRender::Render::GraphicsContext::makeCurrent(QSurface *) makeCurrent failed QWaylandGLContext::makeCurrent: eglError: 300d, this: 0x7f151415d620 Qt3D.Renderer.Backend: bool Qt3DRender::Render::GraphicsContext::makeCurrent(QSurface *) makeCurrent failed
Stack trace for the crash:
#0 0x00007ffff22cb0fc in wl_egl_window_resize () from /usr/lib/libwayland-egl.so.1 #1 0x00007ffff035389e in QtWaylandClient::QWaylandEglWindow::updateSurface (this=0x555558b95840, create=true) at /home/johan/dev/qt/12/qtwayland/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp:135 #2 0x00007ffff035048e in QtWaylandClient::QWaylandGLContext::makeCurrent (this=0x7fffbc15d6a0, surface=0x555558b95850) at /home/johan/dev/qt/12/qtwayland/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp:422 #3 0x00007ffff69c01be in QOpenGLContext::makeCurrent (this=0x7fffbc005470, surface=0x7fffffffd898) at /home/johan/dev/qt/12/qtbase/src/gui/kernel/qopenglcontext.cpp:987 #4 0x00007ffff7ccbafe in Qt3DRender::Render::GraphicsContext::makeCurrent (this=0x7fffbc004400, surface=0x7fffffffd898) at /home/johan/dev/qt/12/qt3d/src/render/renderers/opengl/graphicshelpers/graphicscontext.cpp:198 #5 0x00007ffff7cfb883 in Qt3DRender::Render::SubmissionContext::beginDrawing (this=0x7fffbc004400, surface=0x7fffffffd898) at /home/johan/dev/qt/12/qt3d/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp:427 #6 0x00007ffff7c71691 in Qt3DRender::Render::Renderer::doRender (this=0x7fffe4008bd0, scene3dBlocking=false) at /home/johan/dev/qt/12/qt3d/src/render/renderers/opengl/renderer/renderer.cpp:692 #7 0x00007ffff7c712be in Qt3DRender::Render::Renderer::render (this=0x7fffe4008bd0) at /home/johan/dev/qt/12/qt3d/src/render/renderers/opengl/renderer/renderer.cpp:618 #8 0x00007ffff79ffed9 in Qt3DRender::Render::RenderThread::run (this=0x7fffe4008f70) at /home/johan/dev/qt/12/qt3d/src/render/backend/renderthread.cpp:84 #9 0x00007ffff56f2111 in QThreadPrivate::start (arg=0x7fffe4008f70) at /home/johan/dev/qt/12/qtbase/src/corelib/thread/qthread_unix.cpp:361 #10 0x00007ffff5516a92 in start_thread () from /usr/lib/libpthread.so.0 #11 0x00007ffff5152cd3 in clone () from /usr/lib/libc.so.6
This is caused by a race for QWaylandIntegration::clientBufferIntegration() (which lazily initializes the client buffer integration).
It's called simultaneously from QWaylandIntegration::createPlatformWindow (called from the GUI thread when showing the window) and QWaylandIntegration::createPlatformOpenGLContext (called from the Qt3d render thread).