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

state machine can end up in invalid states

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.4.1, 5.5.0 Alpha
    • Fix Version/s: 5.6.0 RC
    • Component/s: Core: State Machine
    • Labels:
      None
    • Commits:
      b2f6406b6f3c6374df2751a4669fbe51f04d09e7

      Description

      conflicting transitions (transitions having a non null intersection of their exit set (list of states that are exited by the transition)) are not detected, and removed (choosing only one transition) as the scxml standard specifies, only simple nesting (inner transition hiding outer one), is handled.

      This can have effects ranging from simply non compliance (the transition non conformly to the standard in case of conflict), to landing the state machine non sensical and invalid states as showed in this example:

      <scxml
          datamodel="ecmascript"
          xmlns="http://www.w3.org/2005/07/scxml"
          version="1.0"
          initial="b">
      
          <parallel id="b">
              <state id="c" initial="c1">
                  <state id="c1">
                      <transition event="t" target="c2"/>
                  </state>
                  <state id="c2"/>
              </state>
              <state id="d" initial="d1">
                  <state id="d1">
                      <transition event="t" target="a1"/>
                  </state>
              </state>
          </parallel>
          <state id="a1"/>
      </scxml>
      

      that lands in the nonsensical c2, a1 state after event t (i.e. in one of the two parallel states, and outside it at the same time).
      Tomorrow I will add a pure QStateMachine c++ program having this behaviour to the bug.

        Attachments

        1. main.cpp
          2 kB
        2. smParallelBug.pro
          0.3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            erikv Erik Verbruggen
            Reporter:
            fawzi Fawzi Mohamed
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes