BehaviorTree / BehaviorTree.CPP

Behavior Trees Library in C++. Batteries included.
https://www.behaviortree.dev
MIT License
3.03k stars 665 forks source link

Read Access Violation from behaviortree_cppd.dll #869

Open jerylteo opened 2 months ago

jerylteo commented 2 months ago

Running a sample program on VS 2022 v143 C++20 Standard.

"Exception thrown: read access violation." only happens in Debug mode. Release works fine.

Call stack:

behaviortree_cppd.dll!std::_Fnv1a_append_bytes(unsigned __int64 _Val, const unsigned char * const _First, const unsigned __int64 _Count) Line 2301  C++
behaviortree_cppd.dll!std::_Hash_array_representation<char>(const char * const _First, const unsigned __int64 _Count) Line 2335 C++
behaviortree_cppd.dll!std::hash<std::string>::_Do_hash(const std::string & _Keyval) Line 5177   C++
behaviortree_cppd.dll!std::_Conditionally_enabled_hash<std::string,1>::operator()(const std::string & _Keyval) Line 2348    C++
behaviortree_cppd.dll!std::_Uhash_compare<std::string,std::hash<std::string>,std::equal_to<std::string>>::operator()<std::string>(const std::string & _Keyval) Line 146 C++
behaviortree_cppd.dll!std::_Hash<std::_Umap_traits<std::string,std::function<std::unique_ptr<BT::TreeNode,std::default_delete<BT::TreeNode>> __cdecl(std::string const &,BT::NodeConfig const &)>,std::_Uhash_compare<std::string,std::hash<std::string>,std::equal_to<std::string>>,std::allocator<std::pair<std::string const ,std::function<std::unique_ptr<BT::TreeNode,std::default_delete<BT::TreeNode>> __cdecl(std::string const &,BT::NodeConfig const &)>>>,0>>::find<void>(const std::string & _Keyval) Line 1225    C++
behaviortree_cppd.dll!BT::BehaviorTreeFactory::registerBuilder(const BT::TreeNodeManifest & manifest, const std::function<std::unique_ptr<BT::TreeNode,std::default_delete<BT::TreeNode>> __cdecl(std::string const &,BT::NodeConfig const &)> & builder) Line 143  C++
TestBehaviorTree.exe!BT::BehaviorTreeFactory::registerNodeType<SaySomething>(const std::string & ID, const std::unordered_map<std::string,BT::PortInfo,std::hash<std::string>,std::equal_to<std::string>,std::allocator<std::pair<std::string const ,BT::PortInfo>>> & ports) Line 349  C++
TestBehaviorTree.exe!BT::BehaviorTreeFactory::registerNodeType<SaySomething>(const std::string & ID) Line 385   C++
TestBehaviorTree.exe!main() Line 69 C++

Continuation from #868 and #867