Vrep possible memory leakage problem on start-up

Typically: "How do I... ", "How can I... " questions
Post Reply
TMmichi
Posts: 4
Joined: 09 Mar 2020, 23:42

Vrep possible memory leakage problem on start-up

Post by TMmichi »

Hi. I'm struggling to create environment for reinforcement learning using V-rep (and Coppelia from different machine), and have encountered some problem regarding (what I suppose to be) memory leakages.

I have my custom Jaco model (not in the model browser) implemented over a customizable Table with several cups.

Whenever I try to stop and start simulation in order to reset the environment, I found out that memory usage gradually increases by 50 ~ 60 MB per each reset motion.

Would there be any proper solution to the problem, or any workarounds, maybe?
Thanks in advance.



PS. I'll attach my scene just in case you'd like to reproduce my problem
https://drive.google.com/file/d/1hwN5Um ... sp=sharing

coppelia
Site Admin
Posts: 10366
Joined: 14 Dec 2012, 00:25

Re: Vrep possible memory leakage problem on start-up

Post by coppelia »

Hello,

indeed, there seems to be some memory leaks. It is very strange because I can't get a consistent leaking behaviour, and can't put the finger on the cause. Need to check more... also let me know should you get more insight what functionality could be causing this.

Cheers

TMmichi
Posts: 4
Joined: 09 Mar 2020, 23:42

Re: Vrep possible memory leakage problem on start-up

Post by TMmichi »

Thank you for your answer. Having said you can't get a consistent leaking behaviour, operating system that I have checked on was: MacOS 10.15.3 and Ubuntu 18.04. While starting simulation on MacOS adds about 100 ~ 120 MB at start simulation, and recover 50 ~ 60MB at stop, Ubuntu kept adds up 50 ~ 60 MB of memory without any recovering at the stop request.

I have tested with the test scene without any other stuffs but the bare jaco itself from the model tree within the vrep, but I think it shows same behaviour - assuming, probably something's wrong with the jaco model..?

coppelia
Site Admin
Posts: 10366
Joined: 14 Dec 2012, 00:25

Re: Vrep possible memory leakage problem on start-up

Post by coppelia »

Sorry I didn't express myself clearly. I can consistently get the memory leak. But can't (for now) identify what part is causing this. Usually one would proceed by removing as much from the scene until the memory leak disappear, and iterate over a few times until the reason for the leak has been found. Other models also could has some small memory leak, but your scene surprisingly show quite a large memory leak, which makes me wonder. We'll have to dive into the source code of the physics engines most certainly...

Cheers

TMmichi
Posts: 4
Joined: 09 Mar 2020, 23:42

Re: Vrep possible memory leakage problem on start-up

Post by TMmichi »

Thanks for your considerate answer. I also will have a look at the model again in which I have imported to check if there is anything wrong with it. Please let me know if you find something, and I will do too if there are any bugs related to my model. Looking forward to your reply! Really appreciate your great help.

TMmichi
Posts: 4
Joined: 09 Mar 2020, 23:42

Re: Vrep possible memory leakage problem on start-up

Post by TMmichi »

Hi. I'd like to share you an update so far.

I have made another scene with bare jaco-arm and gripper on a table from the Coppelia model list.

It turns out to be still problematic when stop and restarting simulation since I still can experience the memory leakage with my own model.

Have any thoughts where this might occur? Maybe I can lookup to the source code and try to figure out the solution.

Thanks.

coppelia
Site Admin
Posts: 10366
Joined: 14 Dec 2012, 00:25

Re: Vrep possible memory leakage problem on start-up

Post by coppelia »

We unfortunately can't find enough time at the moment to look into this. But the problem appears to be more severe with the Newton engine.

The dynamics plugins source code is located here.

Cheers

Post Reply