strands-project / scitos_2d_navigation

The scitos_2d_navigation stack holds common configuration options for running the 2D navigation stack on a Scitos A5 robot.
2 stars 15 forks source link

Memory leak #24

Closed lucasb-eyer closed 10 years ago

lucasb-eyer commented 10 years ago

There seems to be a big memory leak in subsample_cloud, i.e. subsample_cloud.cpp (unlikely) or noise_approximate_voxel_grid.cpp/.h (likely.)

This morning, the robot stood still. It does so because both the RAM and the swap are completely full. subsample_cloud fills about 3.5Gb and rviz the remaining 2.6Gb.

@marc-hanheide is running the unittests on Jetkins through valgrind an option? Though I guess that wouldn't have found this one as it's not part of a test-suite?

lucasb-eyer commented 10 years ago

This is an obvious one. _history is never deleted... Fixing in a few minutes.

nilsbore commented 10 years ago

Oh, shit. Haven't noticed this. I will have a look at this and try to fix it today.

lucasb-eyer commented 10 years ago

Don't need to, already fixed, gonna push it after testing.

lucasb-eyer commented 10 years ago

Fixed in afaa00bc

nilsbore commented 10 years ago

Fantastic, good catch! I never had a good look at the code since it's taken more or less as is(with one simple addition to remove some of the noise) from pcl. So the leak should be there in pcl approximate_voxel_grid as well.

nilsbore commented 10 years ago

Yeah, destructor missing in ROS version of PCL also, but it is fixed in the new version.