Skip to content

Fix/duplicate behavior tree id registration#1133

Open
KImanalieva wants to merge 2 commits intoBehaviorTree:masterfrom
KImanalieva:fix/duplicate-behavior-tree-id-registration
Open

Fix/duplicate behavior tree id registration#1133
KImanalieva wants to merge 2 commits intoBehaviorTree:masterfrom
KImanalieva:fix/duplicate-behavior-tree-id-registration

Conversation

@KImanalieva
Copy link
Copy Markdown

Bug
When we have 2 files with the same BehaviorTree ID they get randomly chosen and executed without any warnings or errors.

Detect duplicate registrations in the shared XML parser and throw RuntimeError with both source locations (first registration vs conflicting registration). Silent map overwrite is removed; intentional reload uses BehaviorTreeFactory::clearRegisteredBehaviorTrees() before registering again.

Breaking (behavioral): Registering XML that defines an id already registered on the same factory throws where it previously overwrote silently. Callers who relied on overwrite must clearRegisteredBehaviorTrees() then register again (same pattern as PR #439).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant