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

[Reg 6.7.3 -> 6.8.0] Qt StateMachine crashes during a signal transition.

    XMLWordPrintable

Details

    • Linux/Wayland, Windows
    • 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."

      Attachments

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

        Activity

          People

            olivier.decanniere Olivier De Cannière
            chakib Chakib Boutaghane
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes