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: #1029
- Summary:
A - B + Cis evaluated asA - (B + C)instead of left-to-right. The expression parser applies incorrect associativity for addition and subtraction at the same precedence level. - Component:
src/scripting/ - Test file:
tests/gtest_scripting.cpp(or new)
- URL: #923
- Summary:
ValidateScriptcan create astd::stringfrom a non-NULL-terminated fixed-size stack buffer when parsing invalid scripts that generate large error messages, causingstrlento read out of bounds. - Component:
src/scripting/ - Test file:
tests/gtest_scripting.cpp(or new)
- URL: #832
- Summary: Using a negative number in a script precondition (e.g.,
_failureIf="A!=-1") throws a runtime exception. The scripting parser cannot handle negative number literals in comparisons. - Component:
src/scripting/ - Test file:
tests/gtest_scripting.cpp(or new)
- URL: #1065
- Summary: Passing a
std::deque<double>through a SubTree port via a string literal (e.g.,"1;2;3") throwsstd::runtime_errorabout no safe conversion betweenstd::stringandstd::shared_ptr<std::deque<double>>. String-to-deque conversion fails at subtree boundary. - Component:
src/xml_parsing.cpp,include/behaviortree_cpp/basic_types.h - Test file:
tests/gtest_ports.cpp(or new)
- URL: #982
- Summary: When a port of type
std::vector<std::string>has a default empty value{}and no input is specified in XML, the vector is initialized with the literal string"json:[]"instead of being an empty vector. - Component:
include/behaviortree_cpp/basic_types.h,src/xml_parsing.cpp - Test file:
tests/gtest_ports.cpp
- URL: #969
- Summary:
LoopNode<T>usesstd::shared_ptr<std::deque<T>>for its queue port, but upstream nodes often producestd::vector<T>. This creates a port type conflict during tree creation. - Component:
include/behaviortree_cpp/decorators/loop_node.h - Test file:
tests/gtest_decorator.cpp(or new)
- URL: #948
- Summary:
parseStringintree_node.hhas an unsafefindon an unordered_map that may not be instantiated yet ifgetInputis called during construction. Also, custom enum types cannot be properly parsed viaconvertFromString. - Component:
include/behaviortree_cpp/tree_node.h,include/behaviortree_cpp/basic_types.h - Test file:
tests/gtest_ports.cpp
- URL: #858
- Summary: Calling
getInputwith a default parameter value throwsstd::out_of_range(_Map_base::at). The internal map lookup fails when the port has a default value but the entry does not exist in the expected location. - Component:
include/behaviortree_cpp/tree_node.h - Test file:
tests/gtest_ports.cpp
- URL: #974
- Summary: When using
blackboard->set(key, value.dump())to set numeric values from JSON, the blackboard stores them as strings. Subsequent scripting operations with numeric operators fail because string types cannot be compared numerically. - Component:
src/blackboard.cpp,include/behaviortree_cpp/blackboard.h - Test file:
tests/gtest_blackboard.cpp
- URL: #942
- Summary: When using
getLockedPortContenton a port with a default blackboard entry, no blackboard entry is actually created on the first call. The returnedAnyPtrLockedis a default/empty value not placed into the blackboard. - Component:
src/blackboard.cpp,include/behaviortree_cpp/blackboard.h - Test file:
tests/gtest_blackboard.cpp
- URL: #408
- Summary:
config().blackboard->debugMessage()inside a SubTree node's constructor does not show remapped entries from the parent blackboard. The function only checksinternal_to_external_after finding an entry instorage_. - Component:
src/blackboard.cpp - Test file:
tests/gtest_blackboard.cpp
- 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: #959
- Summary: The library embeds
nlohmann::jsonv3.11.3 in its headers. If the user's codebase uses a different version, ODR violations occur depending on header include order, potentially causing undefined behavior. - Component:
3rdparty/,CMakeLists.txt - Test file: Build system test / CMake configuration
- 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 |
|---|---|---|
| Scripting / Script Parser | 3 | #1029, #923, #832 |
| Ports / Type Conversion | 5 | #1065, #982, #969, #948, #858 |
| Blackboard | 3 | #974, #942, #408 |
| 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 |
| Build / Dependencies | 1 | #959 |
| Platform-Specific | 1 | #869 |
| Total | 30 |