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

Declarative state machine asserts when triggering transition defined in top-level parallel states

    XMLWordPrintable

Details

    • cfdbfcebbda5f26b89c70df6b191b17ef242e9d7 (qt/qtbase/dev)

    Description

      Here's a minimal example:

      import QtQuick 2.1
      import QtQml.StateMachine 1.0
      
      Item {
          id: root
      
          signal mySignal
      
          Component.onCompleted: {
              machine.start()
          }
      
          Timer {
              interval: 100
              running: true
              onTriggered: root.mySignal()
          }
      
          StateMachine {
              id: machine
              childMode: QState.ParallelStates
              State {
                  id: parentState
                  initialState: firstState
                  SignalTransition { signal: root.mySignal; targetState: otherState }
                  State { id: otherState; onEntered: console.log("entered otherstate");}
                  State { id: firstState; onEntered: console.log("entered firststate"); }
              }
          }
      }
      

      When running:

      $ $ ~/build/qt5.5/qtbase/bin/qmlscene /tmp/test.qml
      qml: entered firststate
      Unrecoverable error detected in running state machine: No common ancestor for targets and source of transition from state ''
      ASSERT: "domain != 0" in file statemachine/qstatemachine.cpp, line 785
      Aborted (core dumped)

      Attachments

        For Gerrit Dashboard: QTBUG-49975
        # Subject Branch Project Status CR V

        Activity

          People

            ulherman Ulf Hermann
            hhvaal Harald Hvaal
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes