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

Unload model plugins when the model is removed from the world #113

Open
diegoferigo opened this issue Apr 29, 2020 · 2 comments
Open

Unload model plugins when the model is removed from the world #113

diegoferigo opened this issue Apr 29, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@diegoferigo
Copy link
Contributor

As discussed in #39 (comment), model plugins are not unloaded when the model is removed from the world.

There are few problems that this behaviour could cause:

  1. Memory leak. If the simulation is very long and models are inserted and deleted multiple times, the RAM consumption slowly increases. (e.g. Possible log playback memory leak #47)
  2. If the plugin access ECM components of the model and it does not handle properly the case when they are not found (because the model has been removed), the behaviour could be undefined.

In #39 the problem was acknowledged but no specific issue was opened to track it.

@ejalaa12
Copy link
Contributor

ejalaa12 commented Dec 22, 2022

Hi,
I can confirm that this problem is still present in gazebo Garden.
It's easily reproducable with an Hydrodynamics system which prints "No linear vel" once its model has been removed from the world. Which means the system is still running, but the entity is not present anymore.

Are there any update on this issue ? If, you can tell where I should look, I can create a PR with a fix.

@takahashi-e6
Copy link

Hi.

This problem seems to occur in Fortress as well, and can be reproduced by simply deleting the plugin-enabled model with the following command:

ign service -s /world/empty/remove --reqtype ignition.msgs.Entity --reptype ignition.msgs.Boolean --timeout 5000 --req 'type: MODEL; name: "my_model"'

How can I properly delete a model?

I looked up the ign command but couldn't find the answer.

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

5 participants