This file tracks reported bugs from GitHub issues. For each bug, the workflow is:
- Write a unit test that reproduces the issue
- Evaluate whether the behavior diverges from intended library semantics
- Fix the issue (if confirmed as a bug)
IMPORTANT: NEVER modify existing tests that were not created in this branch. Only add new tests.
- URL: #1045
- Summary: The
Parallel.PauseWithRetrytest fails intermittently due to tight timing assertions. Measured time drifts beyond the allowed margin. - Component:
tests/gtest_parallel.cpp - Test file:
tests/gtest_parallel.cpp
- URL: #1041
- Summary: After prolonged operation, when a parallel node's child detects an exception and exits, the interval before other nodes wait for execution becomes increasingly longer. Likely related to resource accumulation or thread management.
- Component:
src/controls/parallel_node.cpp - Test file:
tests/gtest_parallel.cpp(or new)
- URL: #966
- Summary:
ParallelAlldocumentsmax_failuresas "if the number of children returning FAILURE exceeds this value" but implements>=(greater-than-or-equal). Documentation and implementation disagree. - Component:
src/controls/parallel_all_node.cpp - Test file:
tests/gtest_parallel.cpp
- URL: #1031
- Summary: With backchaining patterns, a previously
RUNNINGchild is halted only after another child'sonStartis executed. Two children are inRUNNINGstate simultaneously briefly, causing race conditions. - Component:
src/controls/reactive_sequence.cpp,src/controls/reactive_fallback.cpp - Test file:
tests/gtest_reactive.cpp(or new)
- URL: #917
- Summary: When a node has a
_successIfprecondition inside aReactiveSequence, the precondition is never re-evaluated after the node entersRUNNINGstate. The node continues returningRUNNINGinstead ofSUCCESS. - Component:
src/controls/reactive_sequence.cpp,src/tree_node.cpp - Test file:
tests/gtest_reactive.cpp
- URL: #979
- Summary: A behavior tree can reference its own ID as a SubTree, causing infinite recursion and stack overflow during XML parsing. The parser does not detect or prevent cyclic subtree references.
- Component:
src/xml_parsing.cpp - Test file:
tests/gtest_factory.cpp(or new)
- URL: #883
- Summary: Setting a port value to a JSON string in XML (e.g.,
settings='{{"a": 0.8}}') causes{}content to be interpreted as blackboard variable references instead of literal JSON. - Component:
src/xml_parsing.cpp,src/tree_node.cpp - Test file:
tests/gtest_factory.cpp(or new)
- URL: #880
- Summary: When a subtree is registered via
registerBehaviorTreeFromFile()and then referenced from inline XML viacreateTreeFromText(), the factory throws"Can't find a tree with name: MyTree". - Component:
src/xml_parsing.cpp,src/bt_factory.cpp - Test file:
tests/gtest_factory.cpp
- URL: #672
- Summary: AddressSanitizer detects a stack-buffer-overflow in
xml_parsing.cppwhen parsing certain XML tree definitions. Memory safety issue in the XML parser. - Component:
src/xml_parsing.cpp - Test file:
tests/gtest_factory.cpp(or new)
- URL: #1046
- Summary: If
BehaviorTreeFactoryis destroyed before its created tree is ticked,NodeConfigholds a dangling pointer toTreeNodeManifestowned by the factory. Accessing it causes heap-use-after-free. - Component:
src/bt_factory.cpp,include/behaviortree_cpp/tree_node.h - Test file:
tests/gtest_factory.cpp
- URL: #937
- Summary: Making
BehaviorTreeFactorynon-copyable also inadvertently prevents returning it by value from functions. Some compilers do not apply guaranteed copy elision in all contexts. - Component:
include/behaviortree_cpp/bt_factory.h - Test file:
tests/gtest_factory.cpp(or new)
- URL: #934
- Summary:
factory.loadSubstitutionRuleFromJSON()followed byfactory.createTree()causes a segmentation fault when the substitution target is a subtree node. - Component:
src/bt_factory.cpp - Test file:
tests/gtest_factory.cpp
- URL: #930
- Summary: When using mock node substitution rules with
registerSimpleAction(), the behavior tree gets stuck after an async delay finishes. The substituted node does not behave like the original. - Component:
src/bt_factory.cpp - Test file:
tests/gtest_factory.cpp(or new)
- URL: #1057
- Summary:
Groot2Publishercan enter an infinite loop during destruction. Whenactive_serveris set tofalse, it can be reset totruedepending on timing, causingserver_thread.join()to hang indefinitely. - Component:
src/loggers/groot2_publisher.cpp - Test file: New test needed
- URL: #686
- Summary:
haltTree()resets tree status toIDLE, which only breaks the inner loop oftickRoot. The outer loop then restarts execution becauseIDLEsatisfies its condition, so the tree is never truly halted withtickWhileRunning(). - Component:
src/bt_factory.cpp,include/behaviortree_cpp/bt_factory.h - Test file:
tests/gtest_tree.cpp(or new)
- URL: #861
- Summary: The
std::chronocalls aroundexecuteTick()intree_node.cppcan be reordered by the compiler, resulting in a measured tick duration of 0. - Component:
src/tree_node.cpp - Test file:
tests/gtest_tree.cpp(or new)
- URL: #989
- Summary: A
bad_function_callexception is thrown when convertingstd::vectortypes to JSON viaJsonExporter. The conversion function is not properly registered for vector types. - Component:
include/behaviortree_cpp/json_export.h - Test file: New test needed
- URL: #869
- Summary: Running on VS 2022 in Debug mode causes a read access violation in string hashing within the library DLL. Release mode works fine, suggesting a debug-mode-specific memory issue.
- Component: Core library (platform-specific)
- Test file: Requires Windows environment
| Category | Count | Issue Numbers |
|---|---|---|
| Control Nodes (Parallel) | 3 | #1045, #1041, #966 |
| Control Nodes (Reactive) | 2 | #1031, #917 |
| XML Parsing | 4 | #979, #883, #880, #672 |
| BehaviorTreeFactory | 4 | #1046, #937, #934, #930 |
| Loggers | 1 | #1057 |
| Tree Execution | 1 | #686 |
| TreeNode | 1 | #861 |
| JSON Exporter | 1 | #989 |
| Platform-Specific | 1 | #869 |
| Total | 18 |