ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Warning: class_loader.ClassLoader: SEVERE WARNING!!! Attempting to unload library while objects created by this loader exist in the heap!

asked 2023-05-21 10:55:38 -0500

sniegs gravatar image

updated 2023-05-22 06:14:59 -0500

I've installed ROS 2 Rolling on Ubuntu 22.04 and after launching and then closing, for example, rqt_graph, I get the following warning:

Warning: class_loader.ClassLoader: SEVERE WARNING!!! Attempting to unload library while objects created by this loader exist in the heap! You should delete your objects before attempting to unload the library or destroying the ClassLoader. The library will NOT be unloaded. at line 127 in ./src/class_loader.cpp

I had at first installed ROS 2 Humble with apt-get and I had no such warning so I am assuming it has something to do with my latest install or removal of previous ROS 2 version. Is it possible to fix this without reinstalling ROS 2?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-05-22 07:21:00 -0500

danzimmerman gravatar image

This is a warning about memory (de)allocation /C++ object deletion at runtime and should not have anything to do with your ROS installation details.

This is not the only common ROS 2 package where I see this warning on exit. I think there are known issues with class_loader like this, and I've seen this warning in other base installation and common packages.

Here's a PR talking about some memory issues with class_loader:

https://github.com/ros/class_loader/p...

I'd love to know more about the exact problem as well because I have some instances in my ROS 2 installations where I see this all the time. For personal and prototype work I have been ignoring it with no obvious ill effects.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2023-05-21 10:55:38 -0500

Seen: 615 times

Last updated: May 22 '23