Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.5
-
None
-
-
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
- resulted in
-
QTBUG-105703 QWaylandWindow::createDecoration() is called from multiple threads
- Closed
For Gerrit Dashboard: QTBUG-105308 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
425498,5 | Avoid calling requestUpdate from wrong thread | dev | qt/qtwayland | Status: MERGED | +2 | 0 |
427198,2 | Avoid calling requestUpdate from wrong thread | 6.3.2 | qt/qtwayland | Status: MERGED | +2 | 0 |
427199,2 | Avoid calling requestUpdate from wrong thread | 6.3 | qt/qtwayland | Status: MERGED | +2 | 0 |
427200,2 | Avoid calling requestUpdate from wrong thread | 6.4 | qt/qtwayland | Status: MERGED | +2 | 0 |
427205,2 | Avoid calling requestUpdate from wrong thread | tqtc/lts-6.2 | qt/tqtc-qtwayland | Status: MERGED | +2 | 0 |
427206,2 | Avoid calling requestUpdate from wrong thread | tqtc/lts-5.15 | qt/tqtc-qtwayland | Status: MERGED | +2 | 0 |