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

Qt SCXML TrafficLight statechart contains logic errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 5.7, 5.15.0
    • Examples and Demos
    • None
    • All

      TrafficLight statechart from https://doc.qt.io/qt-5/qtscxml-trafficlight-qml-dynamic-example.html generate inner delayed events such as 'blink' or 'unblink' by using SCXML element send. But these delayed events are never cancelled with element cancel and it may lead timeouts to be broken.

      Steps to reproduce:

      1. Start exmple
      2. Submit 'smash', 'repair', 'smash', 'repair' events for multiple times with small interval ~100ms.

      Expected and result:

      Transition time between states 'blinking' and 'unblinking' is expected to be ~1s but in result it will vary from 0 to 1s because uncancelled (unterminated) previous events will be executed.

        1. TrafficLightBug.png
          TrafficLightBug.png
          36 kB
        2. TrafficLightBug.mp4
          6.01 MB
        3. statemachine_corrected.scxml
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            ulherman Ulf Hermann
            alexzhornyak Alex Zhornyak
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes