-
Notifications
You must be signed in to change notification settings - Fork 259
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
segnet
Node Crashes with "double free or corruption" Error During Launch
#140
Comments
to fix your trouble try download this fix, i see it in another issue, |
After running root@ubuntu:/ros_deep_learning# catkin_make
Base path: /ros_deep_learning
Source space: /ros_deep_learning/src
Build space: /ros_deep_learning/build
Devel space: /ros_deep_learning/devel
Install space: /ros_deep_learning/install
####
#### Running command: "make cmake_check_build_system" in "/ros_deep_learning/build"
####
####
#### Running command: "make -j6 -l6" in "/ros_deep_learning/build"
####
[ 0%] Built target sensor_msgs_generate_messages_lisp
[ 0%] Built target std_msgs_generate_messages_py
[ 0%] Built target sensor_msgs_generate_messages_py
[ 0%] Built target sensor_msgs_generate_messages_nodejs
[ 0%] Built target sensor_msgs_generate_messages_cpp
[ 0%] Built target sensor_msgs_generate_messages_eus
[ 0%] Built target geometry_msgs_generate_messages_eus
[ 0%] Built target geometry_msgs_generate_messages_lisp
[ 0%] Built target geometry_msgs_generate_messages_nodejs
[ 0%] Built target std_msgs_generate_messages_cpp
[ 0%] Built target geometry_msgs_generate_messages_cpp
[ 0%] Built target geometry_msgs_generate_messages_py
[ 0%] Built target std_msgs_generate_messages_lisp
[ 0%] Built target std_msgs_generate_messages_nodejs
[ 0%] Built target std_msgs_generate_messages_eus
[ 1%] Building CXX object ros_deep_learning/CMakeFiles/segnet.dir/src/node_segnet.cpp.o
[ 3%] Building CXX object ros_deep_learning/CMakeFiles/detectnet.dir/src/node_detectnet.cpp.o
[ 5%] Building CXX object ros_deep_learning/CMakeFiles/imagenet.dir/src/node_imagenet.cpp.o
[ 6%] Building CXX object ros_deep_learning/CMakeFiles/video_source.dir/src/node_video_source.cpp.o
[ 8%] Building CXX object ros_deep_learning/CMakeFiles/ros_deep_learning_nodelets.dir/src/nodelet_imagenet.cpp.o
[ 10%] Building CXX object ros_deep_learning/CMakeFiles/video_output.dir/src/node_video_output.cpp.o
/ros_deep_learning/src/ros_deep_learning/src/node_segnet.cpp: In function ‘bool publish_overlay(uint32_t, uint32_t)’:
/ros_deep_learning/src/ros_deep_learning/src/node_segnet.cpp:70:21: warning: control reaches end of non-void function [-Wreturn-type]
70 | sensor_msgs::Image msg;
| ^~~
/ros_deep_learning/src/ros_deep_learning/src/node_segnet.cpp: In function ‘bool publish_mask_color(uint32_t, uint32_t)’:
/ros_deep_learning/src/ros_deep_learning/src/node_segnet.cpp:95:21: warning: control reaches end of non-void function [-Wreturn-type]
95 | sensor_msgs::Image msg;
| ^~~
/ros_deep_learning/src/ros_deep_learning/src/node_segnet.cpp: In function ‘bool publish_mask_class(uint32_t, uint32_t)’:
/ros_deep_learning/src/ros_deep_learning/src/node_segnet.cpp:120:21: warning: control reaches end of non-void function [-Wreturn-type]
120 | sensor_msgs::Image msg;
| ^~~
/ros_deep_learning/src/ros_deep_learning/src/node_imagenet.cpp: In function ‘bool publish_overlay(int, float)’:
/ros_deep_learning/src/ros_deep_learning/src/node_imagenet.cpp:82:21: warning: control reaches end of non-void function [-Wreturn-type]
82 | sensor_msgs::Image msg;
| ^~~
[ 11%] Building CXX object ros_deep_learning/CMakeFiles/video_source.dir/src/image_converter.cpp.o
/ros_deep_learning/src/ros_deep_learning/src/node_detectnet.cpp: In function ‘bool publish_overlay(detectNet::Detection*, int)’:
/ros_deep_learning/src/ros_deep_learning/src/node_detectnet.cpp:72:21: warning: control reaches end of non-void function [-Wreturn-type]
72 | sensor_msgs::Image msg;
| ^~~
[ 13%] Building CXX object ros_deep_learning/CMakeFiles/ros_deep_learning_nodelets.dir/src/image_converter.cpp.o
[ 15%] Building CXX object ros_deep_learning/CMakeFiles/video_output.dir/src/image_converter.cpp.o
[ 16%] Building CXX object ros_deep_learning/CMakeFiles/segnet.dir/src/image_converter.cpp.o
[ 18%] Building CXX object ros_deep_learning/CMakeFiles/imagenet.dir/src/image_converter.cpp.o
[ 20%] Building CXX object ros_deep_learning/CMakeFiles/detectnet.dir/src/image_converter.cpp.o
[ 22%] Building CXX object ros_deep_learning/CMakeFiles/video_source.dir/src/ros_compat.cpp.o
[ 23%] Linking CXX shared library /ros_deep_learning/devel/lib/libros_deep_learning_nodelets.so
[ 25%] Building CXX object ros_deep_learning/CMakeFiles/video_output.dir/src/ros_compat.cpp.o
[ 25%] Built target ros_deep_learning_nodelets
[ 25%] Built target _realsense2_camera_generate_messages_check_deps_DeviceInfo
[ 25%] Built target _realsense2_camera_generate_messages_check_deps_IMUInfo
[ 27%] Building CXX object ros_deep_learning/CMakeFiles/segnet.dir/src/ros_compat.cpp.o
[ 27%] Built target _realsense2_camera_generate_messages_check_deps_Extrinsics
[ 27%] Built target _realsense2_camera_generate_messages_check_deps_Metadata
[ 27%] Built target _catkin_empty_exported_target
[ 28%] Building CXX object ros_deep_learning/CMakeFiles/detectnet.dir/src/ros_compat.cpp.o
[ 30%] Building CXX object ros_deep_learning/CMakeFiles/imagenet.dir/src/ros_compat.cpp.o
[ 30%] Built target roscpp_generate_messages_cpp
[ 30%] Built target roscpp_generate_messages_eus
[ 30%] Built target roscpp_generate_messages_lisp
[ 32%] Linking CXX executable /ros_deep_learning/devel/lib/ros_deep_learning/video_source
[ 32%] Built target roscpp_generate_messages_nodejs
[ 32%] Built target roscpp_generate_messages_py
[ 32%] Built target rosgraph_msgs_generate_messages_cpp
[ 32%] Built target rosgraph_msgs_generate_messages_eus
[ 32%] Built target rosgraph_msgs_generate_messages_lisp
[ 32%] Built target rosgraph_msgs_generate_messages_nodejs
[ 32%] Built target rosgraph_msgs_generate_messages_py
[ 32%] Built target nav_msgs_generate_messages_cpp
[ 32%] Built target nav_msgs_generate_messages_eus
[ 32%] Built target nav_msgs_generate_messages_lisp
[ 32%] Built target nav_msgs_generate_messages_nodejs
[ 32%] Built target nav_msgs_generate_messages_py
[ 32%] Built target actionlib_msgs_generate_messages_cpp
[ 32%] Built target video_source
[ 32%] Built target actionlib_msgs_generate_messages_eus
[ 32%] Built target actionlib_msgs_generate_messages_lisp
[ 32%] Built target actionlib_msgs_generate_messages_py
[ 32%] Built target actionlib_msgs_generate_messages_nodejs
[ 32%] Built target std_srvs_generate_messages_eus
[ 32%] Built target std_srvs_generate_messages_cpp
[ 32%] Built target std_srvs_generate_messages_lisp
[ 32%] Built target std_srvs_generate_messages_nodejs
[ 32%] Built target std_srvs_generate_messages_py
[ 32%] Built target nodelet_generate_messages_eus
[ 32%] Built target nodelet_generate_messages_cpp
[ 32%] Built target nodelet_generate_messages_nodejs
[ 32%] Built target nodelet_generate_messages_lisp
[ 32%] Built target nodelet_generate_messages_py
[ 32%] Built target bond_generate_messages_cpp
[ 32%] Built target bond_generate_messages_eus
[ 32%] Built target bond_generate_messages_lisp
[ 32%] Built target bond_generate_messages_nodejs
[ 32%] Built target bond_generate_messages_py
[ 32%] Built target tf_generate_messages_cpp
[ 32%] Built target tf_generate_messages_eus
[ 32%] Built target tf_generate_messages_lisp
[ 32%] Built target tf_generate_messages_nodejs
[ 32%] Built target tf_generate_messages_py
[ 32%] Built target actionlib_generate_messages_cpp
[ 32%] Built target actionlib_generate_messages_eus
[ 32%] Built target actionlib_generate_messages_lisp
[ 32%] Built target actionlib_generate_messages_nodejs
[ 32%] Built target actionlib_generate_messages_py
[ 32%] Built target tf2_msgs_generate_messages_cpp
[ 32%] Built target tf2_msgs_generate_messages_eus
[ 32%] Built target tf2_msgs_generate_messages_lisp
[ 32%] Built target tf2_msgs_generate_messages_nodejs
[ 32%] Built target tf2_msgs_generate_messages_py
[ 32%] Built target dynamic_reconfigure_generate_messages_cpp
[ 32%] Built target dynamic_reconfigure_generate_messages_eus
[ 32%] Built target dynamic_reconfigure_generate_messages_lisp
[ 32%] Built target dynamic_reconfigure_generate_messages_nodejs
[ 32%] Built target dynamic_reconfigure_generate_messages_py
[ 32%] Built target dynamic_reconfigure_gencfg
[ 32%] Built target diagnostic_msgs_generate_messages_eus
[ 32%] Built target diagnostic_msgs_generate_messages_cpp
[ 32%] Built target diagnostic_msgs_generate_messages_lisp
[ 32%] Built target diagnostic_msgs_generate_messages_nodejs
[ 33%] Built target diagnostic_msgs_generate_messages_py
[ 33%] Linking CXX executable /ros_deep_learning/devel/lib/ros_deep_learning/video_output
[ 35%] Building CXX object vision_opencv/cv_bridge/src/CMakeFiles/cv_bridge.dir/cv_bridge.cpp.o
[ 37%] Building CXX object vision_opencv/cv_bridge/src/CMakeFiles/cv_bridge.dir/rgb_colors.cpp.o
[ 38%] Linking CXX executable /ros_deep_learning/devel/lib/ros_deep_learning/segnet
[ 40%] Linking CXX executable /ros_deep_learning/devel/lib/ros_deep_learning/detectnet
[ 40%] Built target video_output
[ 42%] Building CXX object vision_opencv/image_geometry/CMakeFiles/image_geometry.dir/src/pinhole_camera_model.cpp.o
[ 42%] Built target segnet
[ 44%] Generating Python from MSG realsense2_camera/IMUInfo
[ 44%] Built target detectnet
[ 45%] Generating C++ code from realsense2_camera/IMUInfo.msg
[ 47%] Generating Python from MSG realsense2_camera/Extrinsics
[ 49%] Generating C++ code from realsense2_camera/Extrinsics.msg
[ 50%] Generating C++ code from realsense2_camera/Metadata.msg
[ 52%] Generating Python from MSG realsense2_camera/Metadata
[ 54%] Linking CXX executable /ros_deep_learning/devel/lib/ros_deep_learning/imagenet
[ 55%] Generating C++ code from realsense2_camera/DeviceInfo.srv
[ 57%] Generating Python code from SRV realsense2_camera/DeviceInfo
[ 59%] Generating EusLisp code from realsense2_camera/IMUInfo.msg
[ 61%] Generating Python msg __init__.py for realsense2_camera
[ 61%] Built target realsense2_camera_generate_messages_cpp
[ 62%] Generating EusLisp code from realsense2_camera/Extrinsics.msg
[ 64%] Building CXX object vision_opencv/image_geometry/CMakeFiles/image_geometry.dir/src/stereo_camera_model.cpp.o
[ 66%] Generating Python srv __init__.py for realsense2_camera
[ 67%] Generating EusLisp code from realsense2_camera/Metadata.msg
[ 67%] Built target imagenet
[ 69%] Generating Lisp code from realsense2_camera/IMUInfo.msg
[ 69%] Built target realsense2_camera_generate_messages_py
[ 71%] Generating Lisp code from realsense2_camera/Extrinsics.msg
[ 72%] Generating EusLisp code from realsense2_camera/DeviceInfo.srv
[ 74%] Generating Lisp code from realsense2_camera/Metadata.msg
[ 76%] Generating Lisp code from realsense2_camera/DeviceInfo.srv
[ 77%] Generating EusLisp manifest code for realsense2_camera
[ 79%] Generating Javascript code from realsense2_camera/IMUInfo.msg
[ 79%] Built target realsense2_camera_generate_messages_lisp
[ 81%] Generating Javascript code from realsense2_camera/Extrinsics.msg
[ 83%] Generating Javascript code from realsense2_camera/Metadata.msg
[ 84%] Generating Javascript code from realsense2_camera/DeviceInfo.srv
[ 84%] Built target realsense2_camera_generate_messages_nodejs
[ 84%] Built target realsense2_camera_generate_messages_eus
[ 84%] Built target realsense2_camera_generate_messages
[ 86%] Linking CXX shared library /ros_deep_learning/devel/lib/libimage_geometry.so
[ 86%] Built target image_geometry
[ 88%] Linking CXX shared library /ros_deep_learning/devel/lib/libcv_bridge.so
[ 88%] Built target cv_bridge
[ 91%] Building CXX object vision_opencv/cv_bridge/src/CMakeFiles/cv_bridge_boost.dir/module_opencv4.cpp.o
[ 91%] Building CXX object vision_opencv/cv_bridge/src/CMakeFiles/cv_bridge_boost.dir/module.cpp.o
[ 93%] Building CXX object realsense-ros/realsense2_camera/CMakeFiles/realsense2_camera.dir/src/realsense_node_factory.cpp.o
[ 94%] Building CXX object realsense-ros/realsense2_camera/CMakeFiles/realsense2_camera.dir/src/t265_realsense_node.cpp.o
[ 96%] Building CXX object realsense-ros/realsense2_camera/CMakeFiles/realsense2_camera.dir/src/base_realsense_node.cpp.o
[ 98%] Linking CXX shared library /ros_deep_learning/devel/lib/python3/dist-packages/cv_bridge/boost/cv_bridge_boost.so
[ 98%] Built target cv_bridge_boost
[100%] Linking CXX shared library /ros_deep_learning/devel/lib/librealsense2_camera.so
[100%] Built target realsense2_camera I suspect that these can lead to the memory corruption error. Functions Identified:
How I fix the warningsI updated all the affected functions by adding a Concerns:I am unsure if this solution might break the codebase in any way. However, after making these modifications, I can launch the nodes to start real-time inference without any issues. |
Aha ok thank you @YL-Tan, I had always wondered about those warnings too but was just thought it was some ROS thing and did not experience the double-free or memory corruption issue that you encountered. If you were to submit a PR for these changes I would be happy to merge it, thank you 👍 |
Thanks @YL-Tan, much appreciated - just merged it 👍 |
When trying to launch the
segnet
node using theros_deep_learning
package with the following command:The node crashes with the following error:
Full Log Output:
The text was updated successfully, but these errors were encountered: