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

Hierarchical state machines transitions not handled as expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.12.5
    • State Machine: SCXML
    • None
    • Linux/X11

      In a hierarchical state machine the transitions of the parent state should take precedence compared to the ones of the children states.

      In this example the s1 state should repeat (after START is called) until the HALT event is raised.

      This doesn't seem to work at the moment. This is the state machine that generates the previous graph:

      TestStateMachine.scxml

      The state machine is stuck inside the s1 state in an endless loop, the HALT event (raised by the main function) is never handled.

      I made some tests, the main loop is never returned, therefore no other events are processed. Even when trying to debug using gammaray, the state machine is "stuck".

      If instead of using <send> I use a <script> with a QTimer that raises the event, the processing returns to the main loop and the events are handled as expected.

        1. Screenshot_20200302_181258.png
          20 kB
          Daniele E. Domenichelli
        2. CMakeLists.txt
          0.6 kB
          Daniele E. Domenichelli
        3. TestDataModel.h
          0.2 kB
          Daniele E. Domenichelli
        4. TestStateMachine.scxml
          0.6 kB
          Daniele E. Domenichelli
        5. main.cpp
          2 kB
          Daniele E. Domenichelli
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            ulherman Ulf Hermann
            drdanz Daniele E. Domenichelli
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes