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

ASSERT failure in QWindow: "Updates can only be scheduled from the GUI (main) thread"

    XMLWordPrintable

Details

    • Linux/Wayland
    • 6c733dadeb (qt/qtwayland/6.3.2) 6c733dadeb (qt/tqtc-qtwayland/6.3.2) 60776608a9 (qt/qtwayland/6.3) 60776608a9 (qt/tqtc-qtwayland/6.3) e16bf27756 (qt/tqtc-qtwayland/6.4.1)

    Description

      The following error appears on Qt 6.5, but not on 6.4, only when using Wayland:

      ASSERT failure in QWindow: "Updates can only be scheduled from the GUI (main) thread" file [...]/qwindow.cpp, line 2594

      The problem occurs when pressing a button that has the following text property:

      text: root.testWindow.visibility === Window.FullScreen ? "exit fullscreen" : "go fullscreen"
      

      and the following onClicked:

      onClicked: {
        if (root.testWindow.visibility === Window.FullScreen)
          root.testWindow.visibility = Window.AutomaticVisibility
        else
          root.testWindow.visibility = Window.FullScreen
      }
      

      Notably, the button itself is inside this testWindow. If the text property checks the visibility of another window, everything works fine. So apparently there is a problem when the visibility property is checked in the button text property while the visibility property of the button's window is changing (as happens when clicking the button).

      Before the failed assert, qwaylandwindow.cpp:935 is executed whereby a full extra update of the window is requested as a workaround for an older issue:

              // This is a special case where the buffer is recreated, but since
              // the content rect remains the same, the widgets remain the same
              // size and are not redrawn, leaving the new buffer empty. As a simple
              // work-around, we trigger a full extra update whenever the client-side
              // window decorations are toggled while the window is showing.
              window()->requestUpdate();
      

      Only requesting this update when the current thread is the main GUI thread works as a workaround, but I assume that would not be a sufficient fix.

      Attachments

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              adherrma Adrian Herrmann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes