-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.6.0
-
None
-
-
560fe5a9f (dev), cde4ab20c (6.7), bfa91e3ad (6.6)
We ran into this bug during our upgrade from 6.4.2 to 6.6.0. This is when the animation of the placeholder text is still running:
---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Debug Error!
Program: C:\Qt\6.6.0\msvc2019_64\bin\Qt6Cored.dll
Module: 6.6.0
File: C:\Users\qt\work\qt\qtdeclarative\src\quickcontrols\material\impl\qquickmaterialplaceholdertext.cpp
Line: 220
ASSERT: "!m_focusInAnimation" in file C:\Users\qt\work\qt\qtdeclarative\src\quickcontrols\material\impl\qquickmaterialplaceholdertext.cpp, line 220
(Press Retry to debug the application)
---------------------------
Abort Retry Ignore
---------------------------
Main.qml from the attached example:
import QtQuick import QtQuick.Controls.Material ApplicationWindow { id: window width: 640 height: 480 visible: true title: qsTr("Hello World") property var textField Component.onCompleted: { sv.push(mainView) } FocusScope { id: root anchors.fill: parent Button { id: btn anchors.right: parent.right text: focus ? "focus" : "no focus" } Keys.onEscapePressed: function (event) { print("onEscapePressed") event.accepted = true btn.forceActiveFocus() print("forceActiveFocus 1") textField.forceActiveFocus() print("pop") sv.pop() } StackView { id: sv anchors.fill: parent initialItem: empty } Component { id: empty Rectangle { color: "orange" } } Component { id: mainView TextField { id: tf1 placeholderText: "placeholderText" Component.onCompleted: window.textField = this } } } }
For Gerrit Dashboard: QTBUG-118889 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
520882,7 | Material: fix assertion failure when quickly changing TextField's focus | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
540309,2 | Material: fix assertion failure when quickly changing TextField's focus | 6.7 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
540575,2 | Material: fix assertion failure when quickly changing TextField's focus | 6.6 | qt/qtdeclarative | Status: MERGED | +2 | 0 |