Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double free issue with when freeing unordered_maps in physics/physics.cc #619

Closed
brawner opened this issue Feb 10, 2021 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@brawner
Copy link
Contributor

brawner commented Feb 10, 2021

I'm finding this issue when running the user_commands integration test on the main branches. I haven't been able to find the exact root issue, but it appears to be a double ownership of a dartsim collision shape. This issue probably exists in other integration tests, but this one is the one I noticed it in.

The implicit destructor makes it hard to pin point the maps that are double freeing, but I believe it's the entityCollisionMap and one of 'entityLinkMeshMapandentityLinkCollisionMap`. The calls to entityCast casts the results into two separate cache maps, I think without properly incrementing shared_ptr count somewhere.

https://github.com/ignitionrobotics/ign-gazebo/blob/2bc062dd5493b3f6550e97c098c2d09ecc47b04f/src/systems/physics/Physics.cc#L922
https://github.com/ignitionrobotics/ign-gazebo/blob/2bc062dd5493b3f6550e97c098c2d09ecc47b04f/src/systems/physics/Physics.cc#L945
https://github.com/ignitionrobotics/ign-gazebo/blob/main/src/systems/physics/Physics.cc#L966

Valgrind output:

==1724518== 
==1724518== HEAP SUMMARY:
==1724518==     in use at exit: 316,790 bytes in 3,576 blocks
==1724518==   total heap usage: 2,054,474 allocs, 2,050,898 frees, 355,226,907 bytes allocated
==1724518== 
==1724518== LEAK SUMMARY:
==1724518==    definitely lost: 4,724 bytes in 276 blocks
==1724518==    indirectly lost: 0 bytes in 0 blocks
==1724518==      possibly lost: 2,496 bytes in 6 blocks
==1724518==    still reachable: 309,570 bytes in 3,294 blocks
==1724518==         suppressed: 0 bytes in 0 blocks
==1724518== Rerun with --leak-check=full to see details of leaked memory
==1724518== 
==1724518== ERROR SUMMARY: 18 errors from 4 contexts (suppressed: 0 from 0)
==1724518== 
==1724518== 3 errors in context 1 of 4:
==1724518== Invalid read of size 8
==1724518==    at 0x535627E2: std::_Hashtable<dart::dynamics::JacobianNode*, dart::dynamics::JacobianNode*, std::allocator<dart::dynamics::JacobianNode*>, std::__detail::_Identity, std::equal_to<dart::dynamics::JacobianNode*>, std::hash<dart::dynamics::JacobianNode*>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::_M_erase(std::integral_constant<bool, true>, dart::dynamics::JacobianNode* const&) (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x535F24F0: dart::dynamics::JacobianNode::~JacobianNode() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x5365DC74: dart::dynamics::ShapeNode::~ShapeNode() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x5365DE6C: dart::dynamics::ShapeNode::~ShapeNode() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x5355E8D5: std::_Sp_counted_ptr<dart::dynamics::NodeDestructor*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x531D1AF7: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x531D1AF7: _M_release (shared_ptr_base.h:148)
==1724518==    by 0x531D1AF7: ~__shared_count (shared_ptr_base.h:730)
==1724518==    by 0x531D1AF7: ~__shared_ptr (shared_ptr_base.h:1169)
==1724518==    by 0x531D1AF7: ~shared_ptr (shared_ptr.h:103)
==1724518==    by 0x531D1AF7: ~TemplateNodePtr (NodePtr.hpp:49)
==1724518==    by 0x531D1AF7: ~ShapeInfo (Base.hh:71)
==1724518==    by 0x531D1AF7: destroy<ignition::physics::dartsim::ShapeInfo> (new_allocator.h:153)
==1724518==    by 0x531D1AF7: destroy<ignition::physics::dartsim::ShapeInfo> (alloc_traits.h:497)
==1724518==    by 0x531D1AF7: std::_Sp_counted_ptr_inplace<ignition::physics::dartsim::ShapeInfo, std::allocator<ignition::physics::dartsim::ShapeInfo>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:557)
==1724518==    by 0x14D927: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x14D927: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:148)
==1724518==    by 0x5199E383: ~__shared_count (shared_ptr_base.h:730)
==1724518==    by 0x5199E383: ~__shared_ptr (shared_ptr_base.h:1169)
==1724518==    by 0x5199E383: ~shared_ptr (shared_ptr.h:103)
==1724518==    by 0x5199E383: ~Identity (Identity.hh:73)
==1724518==    by 0x5199E383: ~Entity (Entity.hh:294)
==1724518==    by 0x5199E383: ~Shape (FeatureList.hh:698)
==1724518==    by 0x5199E383: _M_destroy (optional:257)
==1724518==    by 0x5199E383: _M_reset (optional:277)
==1724518==    by 0x5199E383: ~_Optional_payload (optional:398)
==1724518==    by 0x5199E383: ~_Optional_base (optional:471)
==1724518==    by 0x5199E383: ~optional (optional:656)
==1724518==    by 0x5199E383: ~EntityPtr (Entity.hh:47)
==1724518==    by 0x5199E383: ~pair (stl_pair.h:208)
==1724518==    by 0x5199E383: destroy<std::pair<long unsigned int const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > > > (new_allocator.h:153)
==1724518==    by 0x5199E383: destroy<std::pair<long unsigned int const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > > > (alloc_traits.h:497)
==1724518==    by 0x5199E383: std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned long const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3ul>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > >, false> > >::_M_deallocate_node(std::__detail::_Hash_node<std::pair<unsigned long const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3ul>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > >, false>*) [clone .isra.0] (hashtable_policy.h:2102)
==1724518==    by 0x519CD6DA: _M_deallocate_nodes (hashtable_policy.h:2124)
==1724518==    by 0x519CD6DA: clear (hashtable.h:2028)
==1724518==    by 0x519CD6DA: ~_Hashtable (hashtable.h:1352)
==1724518==    by 0x519CD6DA: ~unordered_map (unordered_map.h:102)
==1724518==    by 0x519CD6DA: ignition::gazebo::v5::systems::PhysicsPrivate::~PhysicsPrivate() (Physics.cc:107)
==1724518==    by 0x5199E9D3: operator() (unique_ptr.h:81)
==1724518==    by 0x5199E9D3: ~unique_ptr (unique_ptr.h:292)
==1724518==    by 0x5199E9D3: ignition::gazebo::v5::systems::Physics::~Physics() (Physics.hh:64)
==1724518==    by 0x5199E9FC: ignition::gazebo::v5::systems::Physics::~Physics() (Physics.hh:64)
==1724518==    by 0x4BA7F95: operator() (std_function.h:688)
==1724518==    by 0x4BA7F95: ignition::plugin::PluginWithDlHandle::~PluginWithDlHandle() (Plugin.cc:64)
==1724518==  Address 0x9ce5cb0 is 48 bytes inside a block of size 104 free'd
==1724518==    at 0x483CFBF: operator delete(void*) (vg_replace_malloc.c:586)
==1724518==    by 0x535F24F9: dart::dynamics::JacobianNode::~JacobianNode() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x53558070: dart::dynamics::BodyNode::~BodyNode() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x5355831C: dart::dynamics::BodyNode::~BodyNode() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x536729D6: dart::dynamics::Skeleton::~Skeleton() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x536732AC: dart::dynamics::Skeleton::~Skeleton() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x14D927: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x14D927: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:148)
==1724518==    by 0x531D1AB3: set (BodyNodePtr.hpp:175)
==1724518==    by 0x531D1AB3: ~TemplateBodyNodePtr (BodyNodePtr.hpp:136)
==1724518==    by 0x531D1AB3: ~TemplateNodePtr (NodePtr.hpp:49)
==1724518==    by 0x531D1AB3: ~ShapeInfo (Base.hh:71)
==1724518==    by 0x531D1AB3: destroy<ignition::physics::dartsim::ShapeInfo> (new_allocator.h:153)
==1724518==    by 0x531D1AB3: destroy<ignition::physics::dartsim::ShapeInfo> (alloc_traits.h:497)
==1724518==    by 0x531D1AB3: std::_Sp_counted_ptr_inplace<ignition::physics::dartsim::ShapeInfo, std::allocator<ignition::physics::dartsim::ShapeInfo>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:557)
==1724518==    by 0x14D927: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x14D927: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:148)
==1724518==    by 0x5199E383: ~__shared_count (shared_ptr_base.h:730)
==1724518==    by 0x5199E383: ~__shared_ptr (shared_ptr_base.h:1169)
==1724518==    by 0x5199E383: ~shared_ptr (shared_ptr.h:103)
==1724518==    by 0x5199E383: ~Identity (Identity.hh:73)
==1724518==    by 0x5199E383: ~Entity (Entity.hh:294)
==1724518==    by 0x5199E383: ~Shape (FeatureList.hh:698)
==1724518==    by 0x5199E383: _M_destroy (optional:257)
==1724518==    by 0x5199E383: _M_reset (optional:277)
==1724518==    by 0x5199E383: ~_Optional_payload (optional:398)
==1724518==    by 0x5199E383: ~_Optional_base (optional:471)
==1724518==    by 0x5199E383: ~optional (optional:656)
==1724518==    by 0x5199E383: ~EntityPtr (Entity.hh:47)
==1724518==    by 0x5199E383: ~pair (stl_pair.h:208)
==1724518==    by 0x5199E383: destroy<std::pair<long unsigned int const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > > > (new_allocator.h:153)
==1724518==    by 0x5199E383: destroy<std::pair<long unsigned int const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > > > (alloc_traits.h:497)
==1724518==    by 0x5199E383: std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned long const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3ul>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > >, false> > >::_M_deallocate_node(std::__detail::_Hash_node<std::pair<unsigned long const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3ul>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > >, false>*) [clone .isra.0] (hashtable_policy.h:2102)
==1724518==    by 0x519CD6DA: _M_deallocate_nodes (hashtable_policy.h:2124)
==1724518==    by 0x519CD6DA: clear (hashtable.h:2028)
==1724518==    by 0x519CD6DA: ~_Hashtable (hashtable.h:1352)
==1724518==    by 0x519CD6DA: ~unordered_map (unordered_map.h:102)
==1724518==    by 0x519CD6DA: ignition::gazebo::v5::systems::PhysicsPrivate::~PhysicsPrivate() (Physics.cc:107)
==1724518==    by 0x5199E9D3: operator() (unique_ptr.h:81)
==1724518==    by 0x5199E9D3: ~unique_ptr (unique_ptr.h:292)
==1724518==    by 0x5199E9D3: ignition::gazebo::v5::systems::Physics::~Physics() (Physics.hh:64)
==1724518==  Block was alloc'd at
==1724518==    at 0x483BE63: operator new(unsigned long) (vg_replace_malloc.c:344)
==1724518==    by 0x53550EC0: ??? (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x53565282: std::_Hashtable<dart::dynamics::JacobianNode*, dart::dynamics::JacobianNode*, std::allocator<dart::dynamics::JacobianNode*>, std::__detail::_Identity, std::equal_to<dart::dynamics::JacobianNode*>, std::hash<dart::dynamics::JacobianNode*>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::_M_rehash(unsigned long, unsigned long const&) (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x535F2D7B: std::pair<std::__detail::_Node_iterator<dart::dynamics::JacobianNode*, true, false>, bool> std::_Hashtable<dart::dynamics::JacobianNode*, dart::dynamics::JacobianNode*, std::allocator<dart::dynamics::JacobianNode*>, std::__detail::_Identity, std::equal_to<dart::dynamics::JacobianNode*>, std::hash<dart::dynamics::JacobianNode*>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::_M_insert<dart::dynamics::JacobianNode*, std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<dart::dynamics::JacobianNode*, false> > > >(dart::dynamics::JacobianNode*&&, std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<dart::dynamics::JacobianNode*, false> > > const&, std::integral_constant<bool, true>, unsigned long) (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x535F2A0D: dart::dynamics::JacobianNode::JacobianNode(dart::dynamics::BodyNode*) (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x5359A149: dart::common::CompositeJoiner<dart::dynamics::EntityNode<dart::dynamics::TemplatedJacobianNode<dart::dynamics::FixedJacobianNode> >, dart::common::Virtual<dart::dynamics::FixedFrame> >::CompositeJoiner<dart::dynamics::BodyNode*&>(dart::dynamics::BodyNode*&) (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x53599382: dart::dynamics::FixedJacobianNode::FixedJacobianNode(dart::dynamics::BodyNode*, Eigen::Transform<double, 3, 1, 0> const&) (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x5365D503: dart::dynamics::CompositeNode<dart::common::CompositeJoiner<dart::dynamics::FixedJacobianNode, dart::dynamics::ShapeFrame> >::CompositeNode<std::tuple<dart::dynamics::BodyNode*, Eigen::Transform<double, 3, 1, 0> >, dart::dynamics::BodyNode*&, dart::common::detail::ComposeData<dart::common::detail::CompositeData<std::map<std::type_index, std::unique_ptr<dart::common::Aspect::Properties, std::default_delete<dart::common::Aspect::Properties> >, std::less<std::type_index>, std::allocator<std::pair<std::type_index const, std::unique_ptr<dart::common::Aspect::Properties, std::default_delete<dart::common::Aspect::Properties> > > > >, dart::common::detail::GetProperties>, dart::common::detail::GetProperties, dart::common::EmbeddedPropertiesAspect<dart::dynamics::EntityNode<dart::dynamics::TemplatedJacobianNode<dart::dynamics::FixedJacobianNode> >, dart::dynamics::detail::EntityNodeProperties>, dart::dynamics::FixedFrame, dart::dynamics::ShapeFrame> const&>(std::tuple<dart::dynamics::BodyNode*, Eigen::Transform<double, 3, 1, 0> >&&, dart::dynamics::BodyNode*&, dart::common::detail::ComposeData<dart::common::detail::CompositeData<std::map<std::type_index, std::unique_ptr<dart::common::Aspect::Properties, std::default_delete<dart::common::Aspect::Properties> >, std::less<std::type_index>, std::allocator<std::pair<std::type_index const, std::unique_ptr<dart::common::Aspect::Properties, std::default_delete<dart::common::Aspect::Properties> > > > >, dart::common::detail::GetProperties>, dart::common::detail::GetProperties, dart::common::EmbeddedPropertiesAspect<dart::dynamics::EntityNode<dart::dynamics::TemplatedJacobianNode<dart::dynamics::FixedJacobianNode> >, dart::dynamics::detail::EntityNodeProperties>, dart::dynamics::FixedFrame, dart::dynamics::ShapeFrame> const&) (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x5365A840: dart::dynamics::ShapeNode::ShapeNode(dart::dynamics::BodyNode*, dart::common::detail::ComposeData<dart::common::detail::CompositeData<std::map<std::type_index, std::unique_ptr<dart::common::Aspect::Properties, std::default_delete<dart::common::Aspect::Properties> >, std::less<std::type_index>, std::allocator<std::pair<std::type_index const, std::unique_ptr<dart::common::Aspect::Properties, std::default_delete<dart::common::Aspect::Properties> > > > >, dart::common::detail::GetProperties>, dart::common::detail::GetProperties, dart::common::EmbeddedPropertiesAspect<dart::dynamics::EntityNode<dart::dynamics::TemplatedJacobianNode<dart::dynamics::FixedJacobianNode> >, dart::dynamics::detail::EntityNodeProperties>, dart::dynamics::FixedFrame, dart::dynamics::ShapeFrame> const&) (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x531D4134: createNode<dart::dynamics::ShapeNode, dart::common::detail::ComposeData<dart::common::detail::CompositeData<std::map<std::type_index, std::unique_ptr<dart::common::Aspect::Properties, std::default_delete<dart::common::Aspect::Properties> >, std::less<std::type_index>, std::allocator<std::pair<const std::type_index, std::unique_ptr<dart::common::Aspect::Properties, std::default_delete<dart::common::Aspect::Properties> > > > >, dart::common::detail::GetProperties>, dart::common::detail::GetProperties, dart::common::EmbeddedPropertiesAspect<dart::dynamics::EntityNode<dart::dynamics::TemplatedJacobianNode<dart::dynamics::FixedJacobianNode> >, dart::dynamics::detail::EntityNodeProperties>, dart::dynamics::FixedFrame, dart::dynamics::ShapeFrame>&> (BodyNode.hpp:136)
==1724518==    by 0x531D4134: dart::dynamics::ShapeNode* dart::dynamics::BodyNode::createShapeNode<dart::common::detail::ComposeData<dart::common::detail::CompositeData<std::map<std::type_index, std::unique_ptr<dart::common::Aspect::Properties, std::default_delete<dart::common::Aspect::Properties> >, std::less<std::type_index>, std::allocator<std::pair<std::type_index const, std::unique_ptr<dart::common::Aspect::Properties, std::default_delete<dart::common::Aspect::Properties> > > > >, dart::common::detail::GetProperties>, dart::common::detail::GetProperties, dart::common::EmbeddedPropertiesAspect<dart::dynamics::EntityNode<dart::dynamics::TemplatedJacobianNode<dart::dynamics::FixedJacobianNode> >, dart::dynamics::detail::EntityNodeProperties>, dart::dynamics::FixedFrame, dart::dynamics::ShapeFrame> >(dart::common::detail::ComposeData<dart::common::detail::CompositeData<std::map<std::type_index, std::unique_ptr<dart::common::Aspect::Properties, std::default_delete<dart::common::Aspect::Properties> >, std::less<std::type_index>, std::allocator<std::pair<std::type_index const, std::unique_ptr<dart::common::Aspect::Properties, std::default_delete<dart::common::Aspect::Properties> > > > >, dart::common::detail::GetProperties>, dart::common::detail::GetProperties, dart::common::EmbeddedPropertiesAspect<dart::dynamics::EntityNode<dart::dynamics::TemplatedJacobianNode<dart::dynamics::FixedJacobianNode> >, dart::dynamics::detail::EntityNodeProperties>, dart::dynamics::FixedFrame, dart::dynamics::ShapeFrame>, bool) (BodyNode.hpp:153)
==1724518==    by 0x531D462D: dart::dynamics::ShapeNode* dart::dynamics::BodyNode::createShapeNode<dart::dynamics::Shape, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::shared_ptr<dart::dynamics::Shape> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (BodyNode.hpp:176)
==1724518==    by 0x531D49F7: dart::dynamics::ShapeNode* dart::dynamics::BodyNode::createShapeNodeWith<dart::dynamics::CollisionAspect, dart::dynamics::DynamicsAspect>(std::shared_ptr<dart::dynamics::Shape> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (BodyNode.hpp:192)
==1724518== 
==1724518== 
==1724518== 3 errors in context 2 of 4:
==1724518== Invalid read of size 8
==1724518==    at 0x535627D4: std::_Hashtable<dart::dynamics::JacobianNode*, dart::dynamics::JacobianNode*, std::allocator<dart::dynamics::JacobianNode*>, std::__detail::_Identity, std::equal_to<dart::dynamics::JacobianNode*>, std::hash<dart::dynamics::JacobianNode*>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::_M_erase(std::integral_constant<bool, true>, dart::dynamics::JacobianNode* const&) (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x535F24F0: dart::dynamics::JacobianNode::~JacobianNode() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x5365DC74: dart::dynamics::ShapeNode::~ShapeNode() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x5365DE6C: dart::dynamics::ShapeNode::~ShapeNode() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x5355E8D5: std::_Sp_counted_ptr<dart::dynamics::NodeDestructor*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x531D1AF7: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x531D1AF7: _M_release (shared_ptr_base.h:148)
==1724518==    by 0x531D1AF7: ~__shared_count (shared_ptr_base.h:730)
==1724518==    by 0x531D1AF7: ~__shared_ptr (shared_ptr_base.h:1169)
==1724518==    by 0x531D1AF7: ~shared_ptr (shared_ptr.h:103)
==1724518==    by 0x531D1AF7: ~TemplateNodePtr (NodePtr.hpp:49)
==1724518==    by 0x531D1AF7: ~ShapeInfo (Base.hh:71)
==1724518==    by 0x531D1AF7: destroy<ignition::physics::dartsim::ShapeInfo> (new_allocator.h:153)
==1724518==    by 0x531D1AF7: destroy<ignition::physics::dartsim::ShapeInfo> (alloc_traits.h:497)
==1724518==    by 0x531D1AF7: std::_Sp_counted_ptr_inplace<ignition::physics::dartsim::ShapeInfo, std::allocator<ignition::physics::dartsim::ShapeInfo>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:557)
==1724518==    by 0x14D927: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x14D927: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:148)
==1724518==    by 0x5199E383: ~__shared_count (shared_ptr_base.h:730)
==1724518==    by 0x5199E383: ~__shared_ptr (shared_ptr_base.h:1169)
==1724518==    by 0x5199E383: ~shared_ptr (shared_ptr.h:103)
==1724518==    by 0x5199E383: ~Identity (Identity.hh:73)
==1724518==    by 0x5199E383: ~Entity (Entity.hh:294)
==1724518==    by 0x5199E383: ~Shape (FeatureList.hh:698)
==1724518==    by 0x5199E383: _M_destroy (optional:257)
==1724518==    by 0x5199E383: _M_reset (optional:277)
==1724518==    by 0x5199E383: ~_Optional_payload (optional:398)
==1724518==    by 0x5199E383: ~_Optional_base (optional:471)
==1724518==    by 0x5199E383: ~optional (optional:656)
==1724518==    by 0x5199E383: ~EntityPtr (Entity.hh:47)
==1724518==    by 0x5199E383: ~pair (stl_pair.h:208)
==1724518==    by 0x5199E383: destroy<std::pair<long unsigned int const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > > > (new_allocator.h:153)
==1724518==    by 0x5199E383: destroy<std::pair<long unsigned int const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > > > (alloc_traits.h:497)
==1724518==    by 0x5199E383: std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned long const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3ul>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > >, false> > >::_M_deallocate_node(std::__detail::_Hash_node<std::pair<unsigned long const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3ul>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > >, false>*) [clone .isra.0] (hashtable_policy.h:2102)
==1724518==    by 0x519CD6DA: _M_deallocate_nodes (hashtable_policy.h:2124)
==1724518==    by 0x519CD6DA: clear (hashtable.h:2028)
==1724518==    by 0x519CD6DA: ~_Hashtable (hashtable.h:1352)
==1724518==    by 0x519CD6DA: ~unordered_map (unordered_map.h:102)
==1724518==    by 0x519CD6DA: ignition::gazebo::v5::systems::PhysicsPrivate::~PhysicsPrivate() (Physics.cc:107)
==1724518==    by 0x5199E9D3: operator() (unique_ptr.h:81)
==1724518==    by 0x5199E9D3: ~unique_ptr (unique_ptr.h:292)
==1724518==    by 0x5199E9D3: ignition::gazebo::v5::systems::Physics::~Physics() (Physics.hh:64)
==1724518==    by 0x5199E9FC: ignition::gazebo::v5::systems::Physics::~Physics() (Physics.hh:64)
==1724518==    by 0x4BA7F95: operator() (std_function.h:688)
==1724518==    by 0x4BA7F95: ignition::plugin::PluginWithDlHandle::~PluginWithDlHandle() (Plugin.cc:64)
==1724518==  Address 0xc639c78 is 712 bytes inside a block of size 3,760 free'd
==1724518==    at 0x483CA3F: free (vg_replace_malloc.c:540)
==1724518==    by 0x536729D6: dart::dynamics::Skeleton::~Skeleton() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x536732AC: dart::dynamics::Skeleton::~Skeleton() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x14D927: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x14D927: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:148)
==1724518==    by 0x531D1AB3: set (BodyNodePtr.hpp:175)
==1724518==    by 0x531D1AB3: ~TemplateBodyNodePtr (BodyNodePtr.hpp:136)
==1724518==    by 0x531D1AB3: ~TemplateNodePtr (NodePtr.hpp:49)
==1724518==    by 0x531D1AB3: ~ShapeInfo (Base.hh:71)
==1724518==    by 0x531D1AB3: destroy<ignition::physics::dartsim::ShapeInfo> (new_allocator.h:153)
==1724518==    by 0x531D1AB3: destroy<ignition::physics::dartsim::ShapeInfo> (alloc_traits.h:497)
==1724518==    by 0x531D1AB3: std::_Sp_counted_ptr_inplace<ignition::physics::dartsim::ShapeInfo, std::allocator<ignition::physics::dartsim::ShapeInfo>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:557)
==1724518==    by 0x14D927: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x14D927: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:148)
==1724518==    by 0x5199E383: ~__shared_count (shared_ptr_base.h:730)
==1724518==    by 0x5199E383: ~__shared_ptr (shared_ptr_base.h:1169)
==1724518==    by 0x5199E383: ~shared_ptr (shared_ptr.h:103)
==1724518==    by 0x5199E383: ~Identity (Identity.hh:73)
==1724518==    by 0x5199E383: ~Entity (Entity.hh:294)
==1724518==    by 0x5199E383: ~Shape (FeatureList.hh:698)
==1724518==    by 0x5199E383: _M_destroy (optional:257)
==1724518==    by 0x5199E383: _M_reset (optional:277)
==1724518==    by 0x5199E383: ~_Optional_payload (optional:398)
==1724518==    by 0x5199E383: ~_Optional_base (optional:471)
==1724518==    by 0x5199E383: ~optional (optional:656)
==1724518==    by 0x5199E383: ~EntityPtr (Entity.hh:47)
==1724518==    by 0x5199E383: ~pair (stl_pair.h:208)
==1724518==    by 0x5199E383: destroy<std::pair<long unsigned int const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > > > (new_allocator.h:153)
==1724518==    by 0x5199E383: destroy<std::pair<long unsigned int const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > > > (alloc_traits.h:497)
==1724518==    by 0x5199E383: std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned long const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3ul>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > >, false> > >::_M_deallocate_node(std::__detail::_Hash_node<std::pair<unsigned long const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3ul>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > >, false>*) [clone .isra.0] (hashtable_policy.h:2102)
==1724518==    by 0x519CD6DA: _M_deallocate_nodes (hashtable_policy.h:2124)
==1724518==    by 0x519CD6DA: clear (hashtable.h:2028)
==1724518==    by 0x519CD6DA: ~_Hashtable (hashtable.h:1352)
==1724518==    by 0x519CD6DA: ~unordered_map (unordered_map.h:102)
==1724518==    by 0x519CD6DA: ignition::gazebo::v5::systems::PhysicsPrivate::~PhysicsPrivate() (Physics.cc:107)
==1724518==    by 0x5199E9D3: operator() (unique_ptr.h:81)
==1724518==    by 0x5199E9D3: ~unique_ptr (unique_ptr.h:292)
==1724518==    by 0x5199E9D3: ignition::gazebo::v5::systems::Physics::~Physics() (Physics.hh:64)
==1724518==    by 0x5199E9FC: ignition::gazebo::v5::systems::Physics::~Physics() (Physics.hh:64)
==1724518==    by 0x4BA7F95: operator() (std_function.h:688)
==1724518==    by 0x4BA7F95: ignition::plugin::PluginWithDlHandle::~PluginWithDlHandle() (Plugin.cc:64)
==1724518==    by 0x4BA6BDF: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x4BA6BDF: _M_release (shared_ptr_base.h:148)
==1724518==    by 0x4BA6BDF: ~__shared_count (shared_ptr_base.h:730)
==1724518==    by 0x4BA6BDF: ~__shared_ptr (shared_ptr_base.h:1169)
==1724518==    by 0x4BA6BDF: ~shared_ptr (shared_ptr.h:103)
==1724518==    by 0x4BA6BDF: ~Implementation (Plugin.cc:107)
==1724518==    by 0x4BA6BDF: operator() (unique_ptr.h:81)
==1724518==    by 0x4BA6BDF: ~unique_ptr (unique_ptr.h:292)
==1724518==    by 0x4BA6BDF: ignition::plugin::Plugin::~Plugin() (Plugin.cc:385)
==1724518==  Block was alloc'd at
==1724518==    at 0x483B7F3: malloc (vg_replace_malloc.c:309)
==1724518==    by 0x531C9327: aligned_malloc (Memory.h:159)
==1724518==    by 0x531C9327: conditional_aligned_malloc<true> (Memory.h:214)
==1724518==    by 0x531C9327: operator new (BodyNode.hpp:1199)
==1724518==    by 0x531C9327: createJointAndBodyNodePair<dart::dynamics::FreeJoint> (Skeleton.hpp:83)
==1724518==    by 0x531C9327: ignition::physics::dartsim::SDFFeatures::ConstructSdfLink(ignition::physics::Identity const&, sdf::v11::Link const&) (SDFFeatures.cc:459)
==1724518==    by 0x519D2BE3: ignition::physics::sdf::ConstructSdfLink::Model<ignition::physics::FeaturePolicy<double, 3ul>, ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList>::ConstructLink(sdf::v11::Link const&) (ConstructLink.hh:54)
==1724518==    by 0x519A0915: ignition::gazebo::v5::systems::PhysicsPrivate::CreatePhysicsEntities(ignition::gazebo::v5::EntityComponentManager const&)::{lambda(unsigned long const&, ignition::gazebo::v5::components::Component<std::add_lvalue_reference<void>, ignition::gazebo::v5::components::LinkTag, ignition::gazebo::v5::serializers::DefaultSerializer<std::add_lvalue_reference<void> > > const*, ignition::gazebo::v5::components::Component<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ignition::gazebo::v5::components::NameTag, ignition::gazebo::v5::serializers::StringSerializer> const*, ignition::gazebo::v5::components::Component<ignition::math::v6::Pose3<double>, ignition::gazebo::v5::components::PoseTag, ignition::gazebo::v5::serializers::DefaultSerializer<ignition::math::v6::Pose3<double> > > const*, ignition::gazebo::v5::components::Component<unsigned long, ignition::gazebo::v5::components::ParentEntityTag, ignition::gazebo::v5::serializers::DefaultSerializer<unsigned long> > const*)#3}::operator()(unsigned long const&, ignition::gazebo::v5::components::Component<std::add_lvalue_reference<void>, ignition::gazebo::v5::components::LinkTag, ignition::gazebo::v5::serializers::DefaultSerializer<std::add_lvalue_reference<void> > > const*, ignition::gazebo::v5::components::Component<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ignition::gazebo::v5::components::NameTag, ignition::gazebo::v5::serializers::StringSerializer> const*, ignition::gazebo::v5::components::Component<ignition::math::v6::Pose3<double>, ignition::gazebo::v5::components::PoseTag, ignition::gazebo::v5::serializers::DefaultSerializer<ignition::math::v6::Pose3<double> > > const*, ignition::gazebo::v5::components::Component<unsigned long, ignition::gazebo::v5::components::ParentEntityTag, ignition::gazebo::v5::serializers::DefaultSerializer<unsigned long> > const*) const [clone .isra.0] (Physics.cc:853)
==1724518==    by 0x519F97F6: operator() (std_function.h:688)
==1724518==    by 0x519F97F6: void ignition::gazebo::v5::EntityComponentManager::EachNew<ignition::gazebo::v5::components::Component<std::add_lvalue_reference<void>, ignition::gazebo::v5::components::LinkTag, ignition::gazebo::v5::serializers::DefaultSerializer<std::add_lvalue_reference<void> > >, ignition::gazebo::v5::components::Component<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ignition::gazebo::v5::components::NameTag, ignition::gazebo::v5::serializers::StringSerializer>, ignition::gazebo::v5::components::Component<ignition::math::v6::Pose3<double>, ignition::gazebo::v5::components::PoseTag, ignition::gazebo::v5::serializers::DefaultSerializer<ignition::math::v6::Pose3<double> > >, ignition::gazebo::v5::components::Component<unsigned long, ignition::gazebo::v5::components::ParentEntityTag, ignition::gazebo::v5::serializers::DefaultSerializer<unsigned long> > >(ignition::gazebo::v5::EntityComponentManager::identity<std::function<bool (unsigned long const&, ignition::gazebo::v5::components::Component<std::add_lvalue_reference<void>, ignition::gazebo::v5::components::LinkTag, ignition::gazebo::v5::serializers::DefaultSerializer<std::add_lvalue_reference<void> > > const*, ignition::gazebo::v5::components::Component<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ignition::gazebo::v5::components::NameTag, ignition::gazebo::v5::serializers::StringSerializer> const*, ignition::gazebo::v5::components::Component<ignition::math::v6::Pose3<double>, ignition::gazebo::v5::components::PoseTag, ignition::gazebo::v5::serializers::DefaultSerializer<ignition::math::v6::Pose3<double> > > const*, ignition::gazebo::v5::components::Component<unsigned long, ignition::gazebo::v5::components::ParentEntityTag, ignition::gazebo::v5::serializers::DefaultSerializer<unsigned long> > const*)> >::type) const (EntityComponentManager.hh:426)
==1724518==    by 0x519A51BC: ignition::gazebo::v5::systems::PhysicsPrivate::CreatePhysicsEntities(ignition::gazebo::v5::EntityComponentManager const&) (Physics.cc:814)
==1724518==    by 0x519A6237: ignition::gazebo::v5::systems::Physics::Update(ignition::gazebo::v5::UpdateInfo const&, ignition::gazebo::v5::EntityComponentManager&) (Physics.cc:646)
==1724518==    by 0x4A2D9D1: ignition::gazebo::v5::SimulationRunner::UpdateSystems() (SimulationRunner.cc:483)
==1724518==    by 0x4A33E1A: ignition::gazebo::v5::SimulationRunner::Step(ignition::gazebo::v5::UpdateInfo const&) (SimulationRunner.cc:728)
==1724518==    by 0x4A3468A: ignition::gazebo::v5::SimulationRunner::Run(unsigned long) (SimulationRunner.cc:693)
==1724518==    by 0x4A281EB: ignition::gazebo::v5::ServerPrivate::Run(unsigned long, std::optional<std::condition_variable*>) (ServerPrivate.cc:165)
==1724518==    by 0x4A1F2AB: ignition::gazebo::v5::Server::Run(bool, unsigned long, bool) (Server.cc:235)
==1724518== 
==1724518== 
==1724518== 3 errors in context 3 of 4:
==1724518== Invalid read of size 8
==1724518==    at 0x535627D0: std::_Hashtable<dart::dynamics::JacobianNode*, dart::dynamics::JacobianNode*, std::allocator<dart::dynamics::JacobianNode*>, std::__detail::_Identity, std::equal_to<dart::dynamics::JacobianNode*>, std::hash<dart::dynamics::JacobianNode*>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >::_M_erase(std::integral_constant<bool, true>, dart::dynamics::JacobianNode* const&) (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x535F24F0: dart::dynamics::JacobianNode::~JacobianNode() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x5365DC74: dart::dynamics::ShapeNode::~ShapeNode() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x5365DE6C: dart::dynamics::ShapeNode::~ShapeNode() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x5355E8D5: std::_Sp_counted_ptr<dart::dynamics::NodeDestructor*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x531D1AF7: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x531D1AF7: _M_release (shared_ptr_base.h:148)
==1724518==    by 0x531D1AF7: ~__shared_count (shared_ptr_base.h:730)
==1724518==    by 0x531D1AF7: ~__shared_ptr (shared_ptr_base.h:1169)
==1724518==    by 0x531D1AF7: ~shared_ptr (shared_ptr.h:103)
==1724518==    by 0x531D1AF7: ~TemplateNodePtr (NodePtr.hpp:49)
==1724518==    by 0x531D1AF7: ~ShapeInfo (Base.hh:71)
==1724518==    by 0x531D1AF7: destroy<ignition::physics::dartsim::ShapeInfo> (new_allocator.h:153)
==1724518==    by 0x531D1AF7: destroy<ignition::physics::dartsim::ShapeInfo> (alloc_traits.h:497)
==1724518==    by 0x531D1AF7: std::_Sp_counted_ptr_inplace<ignition::physics::dartsim::ShapeInfo, std::allocator<ignition::physics::dartsim::ShapeInfo>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:557)
==1724518==    by 0x14D927: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x14D927: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:148)
==1724518==    by 0x5199E383: ~__shared_count (shared_ptr_base.h:730)
==1724518==    by 0x5199E383: ~__shared_ptr (shared_ptr_base.h:1169)
==1724518==    by 0x5199E383: ~shared_ptr (shared_ptr.h:103)
==1724518==    by 0x5199E383: ~Identity (Identity.hh:73)
==1724518==    by 0x5199E383: ~Entity (Entity.hh:294)
==1724518==    by 0x5199E383: ~Shape (FeatureList.hh:698)
==1724518==    by 0x5199E383: _M_destroy (optional:257)
==1724518==    by 0x5199E383: _M_reset (optional:277)
==1724518==    by 0x5199E383: ~_Optional_payload (optional:398)
==1724518==    by 0x5199E383: ~_Optional_base (optional:471)
==1724518==    by 0x5199E383: ~optional (optional:656)
==1724518==    by 0x5199E383: ~EntityPtr (Entity.hh:47)
==1724518==    by 0x5199E383: ~pair (stl_pair.h:208)
==1724518==    by 0x5199E383: destroy<std::pair<long unsigned int const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > > > (new_allocator.h:153)
==1724518==    by 0x5199E383: destroy<std::pair<long unsigned int const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > > > (alloc_traits.h:497)
==1724518==    by 0x5199E383: std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned long const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3ul>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > >, false> > >::_M_deallocate_node(std::__detail::_Hash_node<std::pair<unsigned long const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3ul>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > >, false>*) [clone .isra.0] (hashtable_policy.h:2102)
==1724518==    by 0x519CD6DA: _M_deallocate_nodes (hashtable_policy.h:2124)
==1724518==    by 0x519CD6DA: clear (hashtable.h:2028)
==1724518==    by 0x519CD6DA: ~_Hashtable (hashtable.h:1352)
==1724518==    by 0x519CD6DA: ~unordered_map (unordered_map.h:102)
==1724518==    by 0x519CD6DA: ignition::gazebo::v5::systems::PhysicsPrivate::~PhysicsPrivate() (Physics.cc:107)
==1724518==    by 0x5199E9D3: operator() (unique_ptr.h:81)
==1724518==    by 0x5199E9D3: ~unique_ptr (unique_ptr.h:292)
==1724518==    by 0x5199E9D3: ignition::gazebo::v5::systems::Physics::~Physics() (Physics.hh:64)
==1724518==    by 0x5199E9FC: ignition::gazebo::v5::systems::Physics::~Physics() (Physics.hh:64)
==1724518==    by 0x4BA7F95: operator() (std_function.h:688)
==1724518==    by 0x4BA7F95: ignition::plugin::PluginWithDlHandle::~PluginWithDlHandle() (Plugin.cc:64)
==1724518==  Address 0xc639c80 is 720 bytes inside a block of size 3,760 free'd
==1724518==    at 0x483CA3F: free (vg_replace_malloc.c:540)
==1724518==    by 0x536729D6: dart::dynamics::Skeleton::~Skeleton() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x536732AC: dart::dynamics::Skeleton::~Skeleton() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x14D927: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x14D927: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:148)
==1724518==    by 0x531D1AB3: set (BodyNodePtr.hpp:175)
==1724518==    by 0x531D1AB3: ~TemplateBodyNodePtr (BodyNodePtr.hpp:136)
==1724518==    by 0x531D1AB3: ~TemplateNodePtr (NodePtr.hpp:49)
==1724518==    by 0x531D1AB3: ~ShapeInfo (Base.hh:71)
==1724518==    by 0x531D1AB3: destroy<ignition::physics::dartsim::ShapeInfo> (new_allocator.h:153)
==1724518==    by 0x531D1AB3: destroy<ignition::physics::dartsim::ShapeInfo> (alloc_traits.h:497)
==1724518==    by 0x531D1AB3: std::_Sp_counted_ptr_inplace<ignition::physics::dartsim::ShapeInfo, std::allocator<ignition::physics::dartsim::ShapeInfo>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:557)
==1724518==    by 0x14D927: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x14D927: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:148)
==1724518==    by 0x5199E383: ~__shared_count (shared_ptr_base.h:730)
==1724518==    by 0x5199E383: ~__shared_ptr (shared_ptr_base.h:1169)
==1724518==    by 0x5199E383: ~shared_ptr (shared_ptr.h:103)
==1724518==    by 0x5199E383: ~Identity (Identity.hh:73)
==1724518==    by 0x5199E383: ~Entity (Entity.hh:294)
==1724518==    by 0x5199E383: ~Shape (FeatureList.hh:698)
==1724518==    by 0x5199E383: _M_destroy (optional:257)
==1724518==    by 0x5199E383: _M_reset (optional:277)
==1724518==    by 0x5199E383: ~_Optional_payload (optional:398)
==1724518==    by 0x5199E383: ~_Optional_base (optional:471)
==1724518==    by 0x5199E383: ~optional (optional:656)
==1724518==    by 0x5199E383: ~EntityPtr (Entity.hh:47)
==1724518==    by 0x5199E383: ~pair (stl_pair.h:208)
==1724518==    by 0x5199E383: destroy<std::pair<long unsigned int const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > > > (new_allocator.h:153)
==1724518==    by 0x5199E383: destroy<std::pair<long unsigned int const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > > > (alloc_traits.h:497)
==1724518==    by 0x5199E383: std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned long const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3ul>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > >, false> > >::_M_deallocate_node(std::__detail::_Hash_node<std::pair<unsigned long const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3ul>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > >, false>*) [clone .isra.0] (hashtable_policy.h:2102)
==1724518==    by 0x519CD6DA: _M_deallocate_nodes (hashtable_policy.h:2124)
==1724518==    by 0x519CD6DA: clear (hashtable.h:2028)
==1724518==    by 0x519CD6DA: ~_Hashtable (hashtable.h:1352)
==1724518==    by 0x519CD6DA: ~unordered_map (unordered_map.h:102)
==1724518==    by 0x519CD6DA: ignition::gazebo::v5::systems::PhysicsPrivate::~PhysicsPrivate() (Physics.cc:107)
==1724518==    by 0x5199E9D3: operator() (unique_ptr.h:81)
==1724518==    by 0x5199E9D3: ~unique_ptr (unique_ptr.h:292)
==1724518==    by 0x5199E9D3: ignition::gazebo::v5::systems::Physics::~Physics() (Physics.hh:64)
==1724518==    by 0x5199E9FC: ignition::gazebo::v5::systems::Physics::~Physics() (Physics.hh:64)
==1724518==    by 0x4BA7F95: operator() (std_function.h:688)
==1724518==    by 0x4BA7F95: ignition::plugin::PluginWithDlHandle::~PluginWithDlHandle() (Plugin.cc:64)
==1724518==    by 0x4BA6BDF: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x4BA6BDF: _M_release (shared_ptr_base.h:148)
==1724518==    by 0x4BA6BDF: ~__shared_count (shared_ptr_base.h:730)
==1724518==    by 0x4BA6BDF: ~__shared_ptr (shared_ptr_base.h:1169)
==1724518==    by 0x4BA6BDF: ~shared_ptr (shared_ptr.h:103)
==1724518==    by 0x4BA6BDF: ~Implementation (Plugin.cc:107)
==1724518==    by 0x4BA6BDF: operator() (unique_ptr.h:81)
==1724518==    by 0x4BA6BDF: ~unique_ptr (unique_ptr.h:292)
==1724518==    by 0x4BA6BDF: ignition::plugin::Plugin::~Plugin() (Plugin.cc:385)
==1724518==  Block was alloc'd at
==1724518==    at 0x483B7F3: malloc (vg_replace_malloc.c:309)
==1724518==    by 0x531C9327: aligned_malloc (Memory.h:159)
==1724518==    by 0x531C9327: conditional_aligned_malloc<true> (Memory.h:214)
==1724518==    by 0x531C9327: operator new (BodyNode.hpp:1199)
==1724518==    by 0x531C9327: createJointAndBodyNodePair<dart::dynamics::FreeJoint> (Skeleton.hpp:83)
==1724518==    by 0x531C9327: ignition::physics::dartsim::SDFFeatures::ConstructSdfLink(ignition::physics::Identity const&, sdf::v11::Link const&) (SDFFeatures.cc:459)
==1724518==    by 0x519D2BE3: ignition::physics::sdf::ConstructSdfLink::Model<ignition::physics::FeaturePolicy<double, 3ul>, ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList>::ConstructLink(sdf::v11::Link const&) (ConstructLink.hh:54)
==1724518==    by 0x519A0915: ignition::gazebo::v5::systems::PhysicsPrivate::CreatePhysicsEntities(ignition::gazebo::v5::EntityComponentManager const&)::{lambda(unsigned long const&, ignition::gazebo::v5::components::Component<std::add_lvalue_reference<void>, ignition::gazebo::v5::components::LinkTag, ignition::gazebo::v5::serializers::DefaultSerializer<std::add_lvalue_reference<void> > > const*, ignition::gazebo::v5::components::Component<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ignition::gazebo::v5::components::NameTag, ignition::gazebo::v5::serializers::StringSerializer> const*, ignition::gazebo::v5::components::Component<ignition::math::v6::Pose3<double>, ignition::gazebo::v5::components::PoseTag, ignition::gazebo::v5::serializers::DefaultSerializer<ignition::math::v6::Pose3<double> > > const*, ignition::gazebo::v5::components::Component<unsigned long, ignition::gazebo::v5::components::ParentEntityTag, ignition::gazebo::v5::serializers::DefaultSerializer<unsigned long> > const*)#3}::operator()(unsigned long const&, ignition::gazebo::v5::components::Component<std::add_lvalue_reference<void>, ignition::gazebo::v5::components::LinkTag, ignition::gazebo::v5::serializers::DefaultSerializer<std::add_lvalue_reference<void> > > const*, ignition::gazebo::v5::components::Component<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ignition::gazebo::v5::components::NameTag, ignition::gazebo::v5::serializers::StringSerializer> const*, ignition::gazebo::v5::components::Component<ignition::math::v6::Pose3<double>, ignition::gazebo::v5::components::PoseTag, ignition::gazebo::v5::serializers::DefaultSerializer<ignition::math::v6::Pose3<double> > > const*, ignition::gazebo::v5::components::Component<unsigned long, ignition::gazebo::v5::components::ParentEntityTag, ignition::gazebo::v5::serializers::DefaultSerializer<unsigned long> > const*) const [clone .isra.0] (Physics.cc:853)
==1724518==    by 0x519F97F6: operator() (std_function.h:688)
==1724518==    by 0x519F97F6: void ignition::gazebo::v5::EntityComponentManager::EachNew<ignition::gazebo::v5::components::Component<std::add_lvalue_reference<void>, ignition::gazebo::v5::components::LinkTag, ignition::gazebo::v5::serializers::DefaultSerializer<std::add_lvalue_reference<void> > >, ignition::gazebo::v5::components::Component<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ignition::gazebo::v5::components::NameTag, ignition::gazebo::v5::serializers::StringSerializer>, ignition::gazebo::v5::components::Component<ignition::math::v6::Pose3<double>, ignition::gazebo::v5::components::PoseTag, ignition::gazebo::v5::serializers::DefaultSerializer<ignition::math::v6::Pose3<double> > >, ignition::gazebo::v5::components::Component<unsigned long, ignition::gazebo::v5::components::ParentEntityTag, ignition::gazebo::v5::serializers::DefaultSerializer<unsigned long> > >(ignition::gazebo::v5::EntityComponentManager::identity<std::function<bool (unsigned long const&, ignition::gazebo::v5::components::Component<std::add_lvalue_reference<void>, ignition::gazebo::v5::components::LinkTag, ignition::gazebo::v5::serializers::DefaultSerializer<std::add_lvalue_reference<void> > > const*, ignition::gazebo::v5::components::Component<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ignition::gazebo::v5::components::NameTag, ignition::gazebo::v5::serializers::StringSerializer> const*, ignition::gazebo::v5::components::Component<ignition::math::v6::Pose3<double>, ignition::gazebo::v5::components::PoseTag, ignition::gazebo::v5::serializers::DefaultSerializer<ignition::math::v6::Pose3<double> > > const*, ignition::gazebo::v5::components::Component<unsigned long, ignition::gazebo::v5::components::ParentEntityTag, ignition::gazebo::v5::serializers::DefaultSerializer<unsigned long> > const*)> >::type) const (EntityComponentManager.hh:426)
==1724518==    by 0x519A51BC: ignition::gazebo::v5::systems::PhysicsPrivate::CreatePhysicsEntities(ignition::gazebo::v5::EntityComponentManager const&) (Physics.cc:814)
==1724518==    by 0x519A6237: ignition::gazebo::v5::systems::Physics::Update(ignition::gazebo::v5::UpdateInfo const&, ignition::gazebo::v5::EntityComponentManager&) (Physics.cc:646)
==1724518==    by 0x4A2D9D1: ignition::gazebo::v5::SimulationRunner::UpdateSystems() (SimulationRunner.cc:483)
==1724518==    by 0x4A33E1A: ignition::gazebo::v5::SimulationRunner::Step(ignition::gazebo::v5::UpdateInfo const&) (SimulationRunner.cc:728)
==1724518==    by 0x4A3468A: ignition::gazebo::v5::SimulationRunner::Run(unsigned long) (SimulationRunner.cc:693)
==1724518==    by 0x4A281EB: ignition::gazebo::v5::ServerPrivate::Run(unsigned long, std::optional<std::condition_variable*>) (ServerPrivate.cc:165)
==1724518==    by 0x4A1F2AB: ignition::gazebo::v5::Server::Run(bool, unsigned long, bool) (Server.cc:235)
==1724518== 
==1724518== 
==1724518== 9 errors in context 4 of 4:
==1724518== Invalid read of size 4
==1724518==    at 0x53555484: dart::dynamics::SkeletonRefCountingBase::decrementReferenceCount() const (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x531B71DE: set (BodyNodePtr.hpp:175)
==1724518==    by 0x531B71DE: ~TemplateBodyNodePtr (BodyNodePtr.hpp:136)
==1724518==    by 0x531B71DE: ~LinkInfo (Base.hh:57)
==1724518==    by 0x531B71DE: destroy<ignition::physics::dartsim::LinkInfo> (new_allocator.h:153)
==1724518==    by 0x531B71DE: destroy<ignition::physics::dartsim::LinkInfo> (alloc_traits.h:497)
==1724518==    by 0x531B71DE: std::_Sp_counted_ptr_inplace<ignition::physics::dartsim::LinkInfo, std::allocator<ignition::physics::dartsim::LinkInfo>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:557)
==1724518==    by 0x14D927: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x14D927: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:148)
==1724518==    by 0x5199E789: ~__shared_count (shared_ptr_base.h:730)
==1724518==    by 0x5199E789: ~__shared_ptr (shared_ptr_base.h:1169)
==1724518==    by 0x5199E789: ~shared_ptr (shared_ptr.h:103)
==1724518==    by 0x5199E789: ~Identity (Identity.hh:73)
==1724518==    by 0x5199E789: ~Entity (Entity.hh:294)
==1724518==    by 0x5199E789: ~Link (FeatureList.hh:696)
==1724518==    by 0x5199E789: _M_destroy (optional:257)
==1724518==    by 0x5199E789: _M_reset (optional:277)
==1724518==    by 0x5199E789: ~_Optional_payload (optional:398)
==1724518==    by 0x5199E789: ~_Optional_base (optional:471)
==1724518==    by 0x5199E789: ~optional (optional:656)
==1724518==    by 0x5199E789: ~EntityPtr (Entity.hh:47)
==1724518==    by 0x5199E789: ~pair (stl_pair.h:208)
==1724518==    by 0x5199E789: destroy<std::pair<long unsigned int const, ignition::physics::EntityPtr<ignition::physics::Link<ignition::physics::FeaturePolicy<double, 3>, ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision> > > > > (new_allocator.h:153)
==1724518==    by 0x5199E789: destroy<std::pair<long unsigned int const, ignition::physics::EntityPtr<ignition::physics::Link<ignition::physics::FeaturePolicy<double, 3>, ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision> > > > > (alloc_traits.h:497)
==1724518==    by 0x5199E789: std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned long const, ignition::physics::EntityPtr<ignition::physics::Link<ignition::physics::FeaturePolicy<double, 3ul>, ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision> > > >, false> > >::_M_deallocate_node(std::__detail::_Hash_node<std::pair<unsigned long const, ignition::physics::EntityPtr<ignition::physics::Link<ignition::physics::FeaturePolicy<double, 3ul>, ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision> > > >, false>*) [clone .isra.0] (hashtable_policy.h:2102)
==1724518==    by 0x519CD7BA: _M_deallocate_nodes (hashtable_policy.h:2124)
==1724518==    by 0x519CD7BA: clear (hashtable.h:2028)
==1724518==    by 0x519CD7BA: ~_Hashtable (hashtable.h:1352)
==1724518==    by 0x519CD7BA: ~unordered_map (unordered_map.h:102)
==1724518==    by 0x519CD7BA: ignition::gazebo::v5::systems::PhysicsPrivate::~PhysicsPrivate() (Physics.cc:107)
==1724518==    by 0x5199E9D3: operator() (unique_ptr.h:81)
==1724518==    by 0x5199E9D3: ~unique_ptr (unique_ptr.h:292)
==1724518==    by 0x5199E9D3: ignition::gazebo::v5::systems::Physics::~Physics() (Physics.hh:64)
==1724518==    by 0x5199E9FC: ignition::gazebo::v5::systems::Physics::~Physics() (Physics.hh:64)
==1724518==    by 0x4BA7F95: operator() (std_function.h:688)
==1724518==    by 0x4BA7F95: ignition::plugin::PluginWithDlHandle::~PluginWithDlHandle() (Plugin.cc:64)
==1724518==    by 0x4BA6BDF: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x4BA6BDF: _M_release (shared_ptr_base.h:148)
==1724518==    by 0x4BA6BDF: ~__shared_count (shared_ptr_base.h:730)
==1724518==    by 0x4BA6BDF: ~__shared_ptr (shared_ptr_base.h:1169)
==1724518==    by 0x4BA6BDF: ~shared_ptr (shared_ptr.h:103)
==1724518==    by 0x4BA6BDF: ~Implementation (Plugin.cc:107)
==1724518==    by 0x4BA6BDF: operator() (unique_ptr.h:81)
==1724518==    by 0x4BA6BDF: ~unique_ptr (unique_ptr.h:292)
==1724518==    by 0x4BA6BDF: ignition::plugin::Plugin::~Plugin() (Plugin.cc:385)
==1724518==    by 0x4A31922: ~SpecializedPlugin (SpecializedPlugin.hh:307)
==1724518==    by 0x4A31922: operator() (unique_ptr.h:81)
==1724518==    by 0x4A31922: ~unique_ptr (unique_ptr.h:292)
==1724518==    by 0x4A31922: ~TemplatePluginPtr (PluginPtr.hh:57)
==1724518==    by 0x4A31922: ~SystemInternal (SimulationRunner.hh:97)
==1724518==    by 0x4A31922: _Destroy<ignition::gazebo::v5::SystemInternal> (stl_construct.h:98)
==1724518==    by 0x4A31922: __destroy<ignition::gazebo::v5::SystemInternal*> (stl_construct.h:108)
==1724518==    by 0x4A31922: _Destroy<ignition::gazebo::v5::SystemInternal*> (stl_construct.h:137)
==1724518==    by 0x4A31922: _Destroy<ignition::gazebo::v5::SystemInternal*, ignition::gazebo::v5::SystemInternal> (stl_construct.h:206)
==1724518==    by 0x4A31922: ~vector (stl_vector.h:677)
==1724518==    by 0x4A31922: ignition::gazebo::v5::SimulationRunner::~SimulationRunner() (SimulationRunner.cc:228)
==1724518==    by 0x4A31B0C: ignition::gazebo::v5::SimulationRunner::~SimulationRunner() (SimulationRunner.cc:231)
==1724518==    by 0x4A28D66: operator() (unique_ptr.h:81)
==1724518==    by 0x4A28D66: ~unique_ptr (unique_ptr.h:292)
==1724518==    by 0x4A28D66: _Destroy<std::unique_ptr<ignition::gazebo::v5::SimulationRunner> > (stl_construct.h:98)
==1724518==    by 0x4A28D66: __destroy<std::unique_ptr<ignition::gazebo::v5::SimulationRunner>*> (stl_construct.h:108)
==1724518==    by 0x4A28D66: _Destroy<std::unique_ptr<ignition::gazebo::v5::SimulationRunner>*> (stl_construct.h:137)
==1724518==    by 0x4A28D66: _Destroy<std::unique_ptr<ignition::gazebo::v5::SimulationRunner>*, std::unique_ptr<ignition::gazebo::v5::SimulationRunner> > (stl_construct.h:206)
==1724518==    by 0x4A28D66: ~vector (stl_vector.h:677)
==1724518==    by 0x4A28D66: ignition::gazebo::v5::ServerPrivate::~ServerPrivate() (ServerPrivate.cc:96)
==1724518==  Address 0xc639bf8 is 584 bytes inside a block of size 3,760 free'd
==1724518==    at 0x483CA3F: free (vg_replace_malloc.c:540)
==1724518==    by 0x536729D6: dart::dynamics::Skeleton::~Skeleton() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x536732AC: dart::dynamics::Skeleton::~Skeleton() (in /usr/lib/x86_64-linux-gnu/libdart.so.6.9.2)
==1724518==    by 0x14D927: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x14D927: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:148)
==1724518==    by 0x531D1AB3: set (BodyNodePtr.hpp:175)
==1724518==    by 0x531D1AB3: ~TemplateBodyNodePtr (BodyNodePtr.hpp:136)
==1724518==    by 0x531D1AB3: ~TemplateNodePtr (NodePtr.hpp:49)
==1724518==    by 0x531D1AB3: ~ShapeInfo (Base.hh:71)
==1724518==    by 0x531D1AB3: destroy<ignition::physics::dartsim::ShapeInfo> (new_allocator.h:153)
==1724518==    by 0x531D1AB3: destroy<ignition::physics::dartsim::ShapeInfo> (alloc_traits.h:497)
==1724518==    by 0x531D1AB3: std::_Sp_counted_ptr_inplace<ignition::physics::dartsim::ShapeInfo, std::allocator<ignition::physics::dartsim::ShapeInfo>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:557)
==1724518==    by 0x14D927: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x14D927: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:148)
==1724518==    by 0x5199E383: ~__shared_count (shared_ptr_base.h:730)
==1724518==    by 0x5199E383: ~__shared_ptr (shared_ptr_base.h:1169)
==1724518==    by 0x5199E383: ~shared_ptr (shared_ptr.h:103)
==1724518==    by 0x5199E383: ~Identity (Identity.hh:73)
==1724518==    by 0x5199E383: ~Entity (Entity.hh:294)
==1724518==    by 0x5199E383: ~Shape (FeatureList.hh:698)
==1724518==    by 0x5199E383: _M_destroy (optional:257)
==1724518==    by 0x5199E383: _M_reset (optional:277)
==1724518==    by 0x5199E383: ~_Optional_payload (optional:398)
==1724518==    by 0x5199E383: ~_Optional_base (optional:471)
==1724518==    by 0x5199E383: ~optional (optional:656)
==1724518==    by 0x5199E383: ~EntityPtr (Entity.hh:47)
==1724518==    by 0x5199E383: ~pair (stl_pair.h:208)
==1724518==    by 0x5199E383: destroy<std::pair<long unsigned int const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > > > (new_allocator.h:153)
==1724518==    by 0x5199E383: destroy<std::pair<long unsigned int const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > > > (alloc_traits.h:497)
==1724518==    by 0x5199E383: std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<unsigned long const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3ul>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > >, false> > >::_M_deallocate_node(std::__detail::_Hash_node<std::pair<unsigned long const, ignition::physics::EntityPtr<ignition::physics::Shape<ignition::physics::FeaturePolicy<double, 3ul>, ignition::physics::FeatureList<ignition::physics::FeatureList<ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList, ignition::physics::GetContactsFromLastStepFeature, ignition::physics::sdf::ConstructSdfCollision>, ignition::physics::CollisionFilterMaskFeature> > > >, false>*) [clone .isra.0] (hashtable_policy.h:2102)
==1724518==    by 0x519CD6DA: _M_deallocate_nodes (hashtable_policy.h:2124)
==1724518==    by 0x519CD6DA: clear (hashtable.h:2028)
==1724518==    by 0x519CD6DA: ~_Hashtable (hashtable.h:1352)
==1724518==    by 0x519CD6DA: ~unordered_map (unordered_map.h:102)
==1724518==    by 0x519CD6DA: ignition::gazebo::v5::systems::PhysicsPrivate::~PhysicsPrivate() (Physics.cc:107)
==1724518==    by 0x5199E9D3: operator() (unique_ptr.h:81)
==1724518==    by 0x5199E9D3: ~unique_ptr (unique_ptr.h:292)
==1724518==    by 0x5199E9D3: ignition::gazebo::v5::systems::Physics::~Physics() (Physics.hh:64)
==1724518==    by 0x5199E9FC: ignition::gazebo::v5::systems::Physics::~Physics() (Physics.hh:64)
==1724518==    by 0x4BA7F95: operator() (std_function.h:688)
==1724518==    by 0x4BA7F95: ignition::plugin::PluginWithDlHandle::~PluginWithDlHandle() (Plugin.cc:64)
==1724518==    by 0x4BA6BDF: _M_release (shared_ptr_base.h:155)
==1724518==    by 0x4BA6BDF: _M_release (shared_ptr_base.h:148)
==1724518==    by 0x4BA6BDF: ~__shared_count (shared_ptr_base.h:730)
==1724518==    by 0x4BA6BDF: ~__shared_ptr (shared_ptr_base.h:1169)
==1724518==    by 0x4BA6BDF: ~shared_ptr (shared_ptr.h:103)
==1724518==    by 0x4BA6BDF: ~Implementation (Plugin.cc:107)
==1724518==    by 0x4BA6BDF: operator() (unique_ptr.h:81)
==1724518==    by 0x4BA6BDF: ~unique_ptr (unique_ptr.h:292)
==1724518==    by 0x4BA6BDF: ignition::plugin::Plugin::~Plugin() (Plugin.cc:385)
==1724518==  Block was alloc'd at
==1724518==    at 0x483B7F3: malloc (vg_replace_malloc.c:309)
==1724518==    by 0x531C9327: aligned_malloc (Memory.h:159)
==1724518==    by 0x531C9327: conditional_aligned_malloc<true> (Memory.h:214)
==1724518==    by 0x531C9327: operator new (BodyNode.hpp:1199)
==1724518==    by 0x531C9327: createJointAndBodyNodePair<dart::dynamics::FreeJoint> (Skeleton.hpp:83)
==1724518==    by 0x531C9327: ignition::physics::dartsim::SDFFeatures::ConstructSdfLink(ignition::physics::Identity const&, sdf::v11::Link const&) (SDFFeatures.cc:459)
==1724518==    by 0x519D2BE3: ignition::physics::sdf::ConstructSdfLink::Model<ignition::physics::FeaturePolicy<double, 3ul>, ignition::gazebo::v5::systems::PhysicsPrivate::MinimumFeatureList>::ConstructLink(sdf::v11::Link const&) (ConstructLink.hh:54)
==1724518==    by 0x519A0915: ignition::gazebo::v5::systems::PhysicsPrivate::CreatePhysicsEntities(ignition::gazebo::v5::EntityComponentManager const&)::{lambda(unsigned long const&, ignition::gazebo::v5::components::Component<std::add_lvalue_reference<void>, ignition::gazebo::v5::components::LinkTag, ignition::gazebo::v5::serializers::DefaultSerializer<std::add_lvalue_reference<void> > > const*, ignition::gazebo::v5::components::Component<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ignition::gazebo::v5::components::NameTag, ignition::gazebo::v5::serializers::StringSerializer> const*, ignition::gazebo::v5::components::Component<ignition::math::v6::Pose3<double>, ignition::gazebo::v5::components::PoseTag, ignition::gazebo::v5::serializers::DefaultSerializer<ignition::math::v6::Pose3<double> > > const*, ignition::gazebo::v5::components::Component<unsigned long, ignition::gazebo::v5::components::ParentEntityTag, ignition::gazebo::v5::serializers::DefaultSerializer<unsigned long> > const*)#3}::operator()(unsigned long const&, ignition::gazebo::v5::components::Component<std::add_lvalue_reference<void>, ignition::gazebo::v5::components::LinkTag, ignition::gazebo::v5::serializers::DefaultSerializer<std::add_lvalue_reference<void> > > const*, ignition::gazebo::v5::components::Component<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ignition::gazebo::v5::components::NameTag, ignition::gazebo::v5::serializers::StringSerializer> const*, ignition::gazebo::v5::components::Component<ignition::math::v6::Pose3<double>, ignition::gazebo::v5::components::PoseTag, ignition::gazebo::v5::serializers::DefaultSerializer<ignition::math::v6::Pose3<double> > > const*, ignition::gazebo::v5::components::Component<unsigned long, ignition::gazebo::v5::components::ParentEntityTag, ignition::gazebo::v5::serializers::DefaultSerializer<unsigned long> > const*) const [clone .isra.0] (Physics.cc:853)
==1724518==    by 0x519F97F6: operator() (std_function.h:688)
==1724518==    by 0x519F97F6: void ignition::gazebo::v5::EntityComponentManager::EachNew<ignition::gazebo::v5::components::Component<std::add_lvalue_reference<void>, ignition::gazebo::v5::components::LinkTag, ignition::gazebo::v5::serializers::DefaultSerializer<std::add_lvalue_reference<void> > >, ignition::gazebo::v5::components::Component<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ignition::gazebo::v5::components::NameTag, ignition::gazebo::v5::serializers::StringSerializer>, ignition::gazebo::v5::components::Component<ignition::math::v6::Pose3<double>, ignition::gazebo::v5::components::PoseTag, ignition::gazebo::v5::serializers::DefaultSerializer<ignition::math::v6::Pose3<double> > >, ignition::gazebo::v5::components::Component<unsigned long, ignition::gazebo::v5::components::ParentEntityTag, ignition::gazebo::v5::serializers::DefaultSerializer<unsigned long> > >(ignition::gazebo::v5::EntityComponentManager::identity<std::function<bool (unsigned long const&, ignition::gazebo::v5::components::Component<std::add_lvalue_reference<void>, ignition::gazebo::v5::components::LinkTag, ignition::gazebo::v5::serializers::DefaultSerializer<std::add_lvalue_reference<void> > > const*, ignition::gazebo::v5::components::Component<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ignition::gazebo::v5::components::NameTag, ignition::gazebo::v5::serializers::StringSerializer> const*, ignition::gazebo::v5::components::Component<ignition::math::v6::Pose3<double>, ignition::gazebo::v5::components::PoseTag, ignition::gazebo::v5::serializers::DefaultSerializer<ignition::math::v6::Pose3<double> > > const*, ignition::gazebo::v5::components::Component<unsigned long, ignition::gazebo::v5::components::ParentEntityTag, ignition::gazebo::v5::serializers::DefaultSerializer<unsigned long> > const*)> >::type) const (EntityComponentManager.hh:426)
==1724518==    by 0x519A51BC: ignition::gazebo::v5::systems::PhysicsPrivate::CreatePhysicsEntities(ignition::gazebo::v5::EntityComponentManager const&) (Physics.cc:814)
==1724518==    by 0x519A6237: ignition::gazebo::v5::systems::Physics::Update(ignition::gazebo::v5::UpdateInfo const&, ignition::gazebo::v5::EntityComponentManager&) (Physics.cc:646)
==1724518==    by 0x4A2D9D1: ignition::gazebo::v5::SimulationRunner::UpdateSystems() (SimulationRunner.cc:483)
==1724518==    by 0x4A33E1A: ignition::gazebo::v5::SimulationRunner::Step(ignition::gazebo::v5::UpdateInfo const&) (SimulationRunner.cc:728)
==1724518==    by 0x4A3468A: ignition::gazebo::v5::SimulationRunner::Run(unsigned long) (SimulationRunner.cc:693)
==1724518==    by 0x4A281EB: ignition::gazebo::v5::ServerPrivate::Run(unsigned long, std::optional<std::condition_variable*>) (ServerPrivate.cc:165)
==1724518==    by 0x4A1F2AB: ignition::gazebo::v5::Server::Run(bool, unsigned long, bool) (Server.cc:235)
==1724518== 
==1724518== ERROR SUMMARY: 18 errors from 4 contexts (suppressed: 0 from 0)

@brawner brawner added the bug Something isn't working label Feb 10, 2021
@chapulina
Copy link
Contributor

This may be fixed by #586

@brawner
Copy link
Contributor Author

brawner commented Feb 10, 2021

Ooh, I think so. Sounds like this issue in dart is also a part of the issue. dartsim/dart#1534

@chapulina
Copy link
Contributor

I suspect this has been fixed, please reopen if I'm mistaken

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants