-
Notifications
You must be signed in to change notification settings - Fork 285
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
Duplicate entries in Skeleton::mBodyNodes causing segfault in destructor #671
Comments
Presumably, the test tries to parse a model (maybe This patch would resolve the segfault by ignoring the loops, but the test will possibly fail anyways since the closed loop constraint will be violated. I think the test in Gazebo should be disabled until this is resolved in DART. By the way, thanks for reminding us that DART is missing this feature. See also: #465 |
The This does raise some red flags in my mind, though. The only ways I could imagine this happening are:
Rather than silently handle and ignore this situation as proposed, I think we should patch it to print a warning to the user that they have provided a malformed Skeleton. |
Yes, we discovered this issue while simulating the pr2 (joint_screw.cc). That test is actually already disabled for dart, but it doesn't exit until after loading the pr2 world, and it seg-faults during the destructor. Due to memory management issues in gazebo (shared pointer reference loops), the destructors weren't being called until recently. For now, we can keep the test disabled, but make sure it doesn't even load the PR2 model. |
I think it's reasonable to patch DART v4.3 so that it prints a warning and dodges the segfault. The resulting tree just won't reflect the original intent of the model, because it will not close that loop. I'll make a PR for this. |
Patch for double-delete issue reported by #671
The patch has been merged in #672 |
On Skeleton::Init, the vector of body nodes within the skeleton is rearranged with breadth first search. During the rearrangement, there are circumstances in which the same node gets added twice. For example, if the same body node is the child of two different joints.
This causes a segfault on the skeleton's destructor, where it tries to delete the same pointer twice.
I was able to avoid the crash with the following patch, but I'm not sure if this would break other things.
The issue was discovered while debugging a test failure in Gazebo where the skeleton's destructor is called, see this pull request.
The text was updated successfully, but these errors were encountered: