ros-visualization / rqt_image_view

http://wiki.ros.org/rqt_image_view
25 stars 59 forks source link

ROS1 Cannot allocate memory in static TLS block #37

Closed emmanuel-senft closed 4 years ago

emmanuel-senft commented 4 years ago

OS: Ubuntu 20.04 Build type: Debian and from source ROS1 Noetic

I realized yesterday that I could not open rqt_image_view anymore on my normal Ros install. When starting just a roscore and rqt_image_view, I get the following error:

[ERROR] [1596246588.597161607]: Failed to load nodelet [rqt_image_view/ImageView_0] of type [rqt_image_view/ImageView]: Failed to load library /home/senft/ros_catkin_ws/install_isolated/lib//librqt_image_view.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /lib/x86_64-linux-gnu/libstdc++.so.6: cannot allocate memory in static TLS block) RosPluginlibPluginProvider::load_explicit_type(rqt_image_view/ImageView) failed creating instance PluginManager._load_plugin() could not load plugin "rqt_image_view/ImageView": RosPluginlibPluginProvider.load() could not load plugin "rqt_image_view/ImageView" terminate called after throwing an instance of 'boost::wrapexcept' what(): boost: mutex lock failed in pthread_mutex_lock: Invalid argument Aborted (core dumped)

The only solution I found to resolve this issue is setting: export LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6 But it does not seem like a good fix.

I tried it on a fresh install on Ubuntu 20.04 with only ros-noetic-desktop-full (or built from sources from sources) and I get the same issue in both cases.

jakebonney10 commented 4 years ago

I'm also receiving this error message when attempting to run rqt_image_view.

rqt_image_view

I have reinstalled ROS from source and that did not solve the problem. I have also tried purging rqt and reinstalling using apt.

All other rqt plugins and nodes seem to run just fine.

dirk-thomas commented 4 years ago

Thanks for the report.

@emmanuel-senft @jakebonney10 Please try the proposed ~fix~ hack from ros-visualization/qt_gui_core#233 (while it targets ROS 2 the same change should be applicable to ROS 1) and comment here if it resolves the problem for you.

brennanpeter commented 4 years ago

I was running into this issue and after running a sudo apt update && sudo apt upgrade the error went away and the plugin worked again

jakebonney10 commented 4 years ago

I was running into this issue and after running a sudo apt update && sudo apt upgrade the error went away and the plugin worked again

An update has fixed my error as well...

emmanuel-senft commented 4 years ago

@dirk-thomas Thanks a lot for the fast response and the proposed solution. It seems that the hack would have solved the issue, but I could not test it as I updated my libraries in the meantime for another reason and the problem disappeared (I just discovered it now).