Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.8.1
-
-
73227258b (dev), 611bad208 (6.9), 3cc686c2d (6.8)
Description
When using a QML state machine, a crash occurs during a signal transition. The attached example is a simplified version to reproduce the issue. Initially found on Linux, the issue can also be replicated on Windows.
The crash is triggered when the Timer component in MyModel.qml fires, setting the myState property to 1. This property change activates the SignalTransition in MainViewState.qml, leading to an application crash.
Removing "guard: root.myModel.myState === 1" from MainViewState.qml prevents the crash. However, this structure should function correctly with or without the guard.
The SignalTransition which crashes triggers a state change to another state. Using SignalTransitions with guard for the same property as the signal is something we use frequently in our code base. Since the crash could be triggered without changing state I only printed a text in the "onTriggered" for the example."