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

DepthCloud memory leak #1621

Closed
christian-rauch opened this issue Apr 15, 2021 · 2 comments
Closed

DepthCloud memory leak #1621

christian-rauch opened this issue Apr 15, 2021 · 2 comments
Labels

Comments

@christian-rauch
Copy link
Contributor

christian-rauch commented Apr 15, 2021

I am using the DepthCloud display type to back-project colour and depth to a 3D point cloud in RViz. When I click the Add button I can add a new display type. While this new pop-up window is shown, the point cloud in the 3D view is not updated and the memory consumption by RViz rises until its process gets killed by oom-kill.

Edit:
I just realised that this issue has already been reported as #868.

Reproduce:

  1. play a bag file with depth and colour images
  2. open RViz
  3. add and configure the DepthCloud display type
  4. try to add a new display type by clicking on the Add button

My configuration:
rviz_screenshot_2021_04_15-15_38_36

Memeory consumption of the process:
Screenshot from 2021-04-15 15-27-46

Your environment

  • OS Version: Ubuntu 20.04
  • ROS Distro: Noetic
  • RViz, Qt, OGRE, OpenGl version as printed by rviz:
rviz version 1.14.5
compiled against Qt version 5.12.8
compiled against OGRE version 1.9.0 (Ghadamon)
Forcing OpenGl version 0.
Stereo is NOT SUPPORTED
OpenGL device: Mesa Intel(R) UHD Graphics 630 (CFL GT2)
OpenGl version: 4.6 (GLSL 4.6) limited to GLSL 1.4 on Mesa system.
@rhaschke
Copy link
Contributor

This is related to #1606. Stopping data processing as introduced in #631 will result in the accumulation of ROS messages in the callback queue. However, this should only happen for large queue sizes (and yours is 1)!?
#868 (comment) suggests that there is another cause for that issue.

@rhaschke rhaschke added the bug label Apr 15, 2021
rhaschke added a commit to rhaschke/rviz that referenced this issue Jun 17, 2021
VisualizationManager uses [start|stop]Update() to pause ROS updates during dialog box interaction (ros-visualization#631).
However, asynchronous updates via threaded_queue_ were still performed, leading to a memory leak (ros-visualization#1621),
because messages were partially processed by the thread (i.e. kept in memory), but not finally processed
(and cleaned up) by the synchronous Display::update() call.
Pausing threaded processing too resolves that issue.
@rhaschke
Copy link
Contributor

Fixed via #1635

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants