Skip to content

Composite states with orthogonal regions of composite states behave strangely #645

@jefftrull

Description

@jefftrull

When a composite state OrthoContainer containing two submachines A and B, each in an orthogonal region, is itself used in a composite machine, strange errors are observed:

  1. initial anonymous transitions within the A and B submachines are not executed
  2. if the OrthoContainer state is returned to, it is in an invalid terminal state.

Refer to this diagram:

Image

If you construct the machine shown and process the ENTER_ORTHO event you will find that the A and B submachines are in their START states, despite there being an anonymous transition to MID in both cases.

If you follow this by processing the A::E event, you will find that both the A and B submachines move to the previously expected MID state, even though the START states have no event-based transitions.

If you then process B::E, ENTER_C, C::E, and ENTER_ORTHO to bring us back to the OrthoContainer state, you will find that the A state has correctly (for the first time) transitioned to MID, but the B state has for some reason terminated completely, ignoring the required B::E event.

I would be very grateful for a fix or workaround. Reproduction code matching the diagram is attached. Thank you.

ortho_bug_repro.cpp

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions