Skip to content
This repository has been archived by the owner on Feb 21, 2021. It is now read-only.

ArDrone and RedDrone possible Gazebo 5 plugin memory leak? #104

Closed
andresjhe opened this issue May 26, 2015 · 3 comments
Closed

ArDrone and RedDrone possible Gazebo 5 plugin memory leak? #104

andresjhe opened this issue May 26, 2015 · 3 comments

Comments

@andresjhe
Copy link
Collaborator

I have been refactoring the referee for the drone contest and I noticed when leaving Gazebo open for testing purposes, that my ram kept getting own by the Gazebo process. This only happened when having the world with these two models open. When my computer started to use swap space Gazebo started to show this message everytime:

[Wrn] [Publisher.cc:131] Queue limit reached for topic /gazebo/default/pose/local/info, deleting message. This warning is printed only once.

I don't know if this message is related or not, but is the only one that posted when launching gazebo --verbose.

@DanielYS
Copy link
Contributor

DanielYS commented Jun 6, 2015

I get that message even if I delete the plugins from the ArDrone SDF file, but I see how memory use increase all the time with the plugins being executed.

I think this issue is related with memory allocation in the imagecallback function on quadrotorplugin.cc. I've moved some lines to the load method and it seems that memory use doesn't increase anymore, so I've made a pull request.

rocapal added a commit that referenced this issue Jun 9, 2015
@varhub
Copy link
Contributor

varhub commented Dec 19, 2015

bug was characterized: miss usage of cv::Mat

cv::Mat is already a smart pointer. So you may never do a new operation.
(This is way cv::Mat has clone() operation, because copy is almost reference copy).

Move new to Load just reduces memory leak to 1 per execution

Related to #216
Bug not present at new component quadrotor2

@jmplaza
Copy link
Member

jmplaza commented Mar 9, 2016

Solved in the solution for #229

@jmplaza jmplaza closed this as completed Mar 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants