-
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
Possible memory leaks in constraint solver? #583
Comments
Thanks for reporting this issue. I recommend using gist.github.com when you want to include long snippets of text. Unfortunately, not quite all of DART's codebase has been updated to using C++11 yet, so that leaves us open to some memory leak vulnerabilities. I'm noticing that several vectors of dynamically allocated constraints are not being properly deleted in the destructor of the Just to clarify, are you frequently creating and destroying Also, if you are frequently creating and destroying |
I am waiting for this. When can you have this ready? I can help you on that one, if you can point to me where I should look.
I am not recycling World objects. I am creating and destroying them every time.
I am loading a skeleton once (using URDF file) and then cloning it each time. Inside URDF I only have basic shapes (spheres, cylinders, boxes). So I guess I shouldn't worry about that. |
I'm making the changes right now. It should be done some time this afternoon. |
Although to clarify, for right now I'm only going to focus on changing the known trouble spots in |
Thanks for prompt answer once again. |
I've created a pull request #584 with the changes. I have not yet run any tests to make sure that the leaking is gone, but I'd be very surprised if it still persists (unless there's another leak source that wasn't caught in the Valgrind report). |
This was solved by #584 ! |
Hello,
After running huge simulations in our cluster, we observed some memory leaks that filled up our RAM and swap (64gb + 64gb!). I was able to create a small program that
valgrind
finds possible memory leaks:Just running a few simulations does not make a problem, but we are using DART in evolutionary algorithms and we are running million of small simulations. So, small memory leaks add up and create a problem.
I am using DARTCollisionDetector, but I also tried with FCL and Bullet and I still get similar memory leak errors.
Any ideas on how to solve this issue?
Sorry for the long question. The small simulation code I am using is the following (basically code from your tutorials):
To be able to reproduce the error, you will need
ControllerDuty.hpp
,ControllerDuty.cpp
andpexod.urdf
:The text was updated successfully, but these errors were encountered: