Skip to content

syskit misses orogen state updates during exceptions #251

Description

@g-arjones

I caught this while testing a component so I'm not sure whether it happens in "runtime" as well. The component code is:

void Task::updateHook() {
    if (!doStuff()) { // <- may set an "emergency" internal state
        throw myException();
    }
}

void Task::stopHook() {
    if (hasEmergency()) {
        exception(EMERGENCY);
    }
}

Test code:

expect_execution { send_stuff_to_task }
    .to { emit task.emergency_state }

The behavior is not deterministic, sometimes it passes, sometimes it doesn't. If I try to catch exception_state rather than emergency_state then it passes consistently. Asserting task.orogen_state is also not deterministic, it varies between :EXCEPTION and :EMERGENCY

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions