Skip to content

Commit

Permalink
Fix memory corruption due to faulty refcount tracking (#480)
Browse files Browse the repository at this point in the history
The memory corruption seems to occur only on DART 6.9.2 (version that comes with Ubuntu 20.04), but not 6.12 (Ubuntu 22.04), so I'm led to believe it's a bug in dart that has since been fixed. But the patch in this PR seems to avoid the problem by not storing the freejoint created when creating links. My suspicion is that this freejoint is not properly taken into account when removing skeletons.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
  • Loading branch information
azeey authored Feb 16, 2023
1 parent 6170ad9 commit 48216e9
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion dartsim/src/SDFFeatures.cc
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,6 @@ Identity SDFFeatures::ConstructSdfLink(
world->getName(),
::sdf::JoinName(modelInfo.model->getName(), bn->getName()));
const std::size_t linkID = this->AddLink(bn, fullName, _modelID, sdfInertia);
this->AddJoint(joint);

auto linkIdentity = this->GenerateIdentity(linkID, this->links.at(linkID));

Expand Down

0 comments on commit 48216e9

Please sign in to comment.