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

physics::Link::Fini() leaves zombie update functions in sdf #2627

Open
osrf-migration opened this issue May 11, 2019 · 0 comments
Open

physics::Link::Fini() leaves zombie update functions in sdf #2627

osrf-migration opened this issue May 11, 2019 · 0 comments
Labels
all bug Something isn't working major physics

Comments

@osrf-migration
Copy link

Original report (archived issue) by Yoshito Okada (Bitbucket: yoshito-okada).


Some member functions of physics::Link set update functions for the link’s sdf (ex. https://github.com/osrf/gazebo/blob/63cce1db38286ba373cfb5e54c2a58dfb4d42501/gazebo/physics/Link.cc#L159 ). And these update functions remains after the link has been removed by physics::Model::RemoveChild() or others. If these zombie update functions are called by Update() of a parent model’s sdf or others, a runtime error or segmentation fault occur.

In my opinion, physics::Link::Fini() should make the final call of Update() to write link’s final states to the sdf, and then detach update functions from the sdf.

Finally, this is an issue not only for physics::Link, but also for all classes which set update functions (as of now, Battery, Inertial, Link and Model).

@osrf-migration osrf-migration added major physics bug Something isn't working all labels Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
all bug Something isn't working major physics
Projects
None yet
Development

No branches or pull requests

1 participant