Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-87838

Wayland window destroyed while being rendered on app exit

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 6.0.0 Beta1
    • QPA: Wayland
    • None
    • Linux/Wayland

    Description

      When exiting a QtQuick app using wayland, the app can crash because the Wayland window will be destroyed while swapBuffers is in progress in another thread. With some added debug prints I see the following log on exit (thread id is printed first), you can see the Ctrl+C press:

      ◾ 0x710ffb40 QWaylandGLContext::swapBuffers
      ◾ 0x750f9780 QWaylandDisplay::flushRequests
      ◾ 0x750f9780 QWaylandDisplay::flushRequests
      ◾ 0x750f9780 QWaylandDisplay::flushRequests
      ◾ 0x710ffb40 QWaylandGLContext::swapBuffers done
      ◾ 0x750f9780 QWaylandDisplay::flushRequests
      ◾ 0x750f9780 QWaylandDisplay::flushRequests
      ◾ 0x750f9780 QWaylandDisplay::flushRequests
      ◾ 0x750f9780 QWaylandDisplay::flushRequests
      ◾ 0x710ffb40 QWaylandGLContext::swapBuffers
      ^C◾ 0x750f9780 QWaylandEglWindow::invalidateSurface
      ◾ 0x750f9780 destroy QtWaylandClient::QWaylandSurface(0xa1d11a0)
      ◾ 0x710ffb40 QWaylandGLContext::swapBuffers done
      ◾ 0x750f9780 QWaylandEglWindow::~QWaylandEglWindow
      ◾ 0x750f9780 QWaylandDisplay::flushRequests
      wl_display@1: error 0: invalid object 18
      ◾ The Wayland connection experienced a fatal error: Invalid argument
      Aborted
      

      This is with a single-window client. After the EGL surface is invalidated, the eglSwapBuffers implementation will call wayland attach/commit on the delete wl_surface, which resuls in a protocol error.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            rawoul Arnaud Vrac
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes