Skip to content

"ReactiveSequence is not supposed to reach this point" happens when some children are skipped #515

Closed
@torydebra

Description

@torydebra

Hi,
I am using a ReactiveSequence with _skipIf preconditions on the children, and it throws:

terminate called after throwing an instance of 'BT::LogicError'
  what():  ReactiveSequence is not supposed to reach this point

Looking at the code

case NodeStatus::SKIPPED: {
// node skipped
}
break;
case NodeStatus::IDLE: {
throw LogicError("[", name(), "]: A children should not return IDLE");
}
} // end switch
} //end for
if (success_count == childrenCount())
{
resetChildren();
// Skip if ALL the nodes have been skipped
return status() == (NodeStatus::RUNNING) ? NodeStatus::SUCCESS : NodeStatus::SKIPPED;
}
throw LogicError("ReactiveSequence is not supposed to reach this point");

it seems that this happens because if a children is SKIPPED the success_count is not increased, neither the method returns, ending in the throw. Am I right?

I can provide simple example if necessary to replicate this

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