You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When the Ouster is not powered and the code is started, a segmentation fault occurs.
To Reproduce
Checkout the master branch on c6f66d2c439aa27a6018a09a5e5b02fa222b52db
Ensure the sensor is not on
Run the Ouster driver: <include file="$(find ouster_ros)/launch/sensor.launch">
Debugging information
Journal logs:
kernel: nodelet[1922]: segfault at 0 ip 00007f42c4649ae8 sp 00007ffe1f8638e0 error 4 in libouster_ros_nodelets.so[7f42c463a000+7a000]
Stack trace:
Core was generated by `/opt/ros/noetic/lib/nodelet/nodelet manager __name:=os_nodelet_mgr __log:=/var/'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fac5ef63ae8 in ouster_ros::OusterSensor::stop_sensor_connection_thread() () from /opt/ros/noetic/lib//libouster_ros_nodelets.so
[Current thread is 1 (Thread 0x7fac7286d780 (LWP 68))]
(gdb) bt
#0 0x00007fac5ef63ae8 in ouster_ros::OusterSensor::stop_sensor_connection_thread() () from /opt/ros/noetic/lib//libouster_ros_nodelets.so
#1 0x00007fac5ef6482d in ouster_ros::OusterSensor::~OusterSensor() () from /opt/ros/noetic/lib//libouster_ros_nodelets.so
#2 0x00007fac5ef64e8d in ouster_ros::OusterSensor::~OusterSensor() () from /opt/ros/noetic/lib//libouster_ros_nodelets.so
#3 0x00007fac75dd4567 in void class_loader::ClassLoader::onPluginDeletion<nodelet::Nodelet>(nodelet::Nodelet*) () from /opt/ros/noetic/lib/libnodeletlib.so
#4 0x00007fac75dcb999 in boost::detail::sp_counted_impl_pd<nodelet::Nodelet*, boost::_bi::bind_t<void, boost::_mfi::mf1<void, class_loader::ClassLoader, nodelet::Nodelet*>, boost::_bi::list2<boost::_bi::value<class_loader::ClassLoader*>, boost::arg<1> > > >::dispose() ()
from /opt/ros/noetic/lib/libnodeletlib.so
#5 0x000055831b95e07a in boost::detail::sp_counted_base::release() ()
#6 0x00007fac75dca3bf in nodelet::Loader::unload(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /opt/ros/noetic/lib/libnodeletlib.so
#7 0x00007fac75dda13d in nodelet::LoaderROS::unload(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /opt/ros/noetic/lib/libnodeletlib.so
#8 0x00007fac75d3de41 in bond::Bond::flushPendingCallbacks() () from /opt/ros/noetic/lib/libbondcpp.so
#9 0x00007fac75d3df9d in bond::Bond::onConnectTimeout() () from /opt/ros/noetic/lib/libbondcpp.so
#10 0x00007fac75ca8dc1 in ros::TimerManager<ros::SteadyTime, ros::WallDuration, ros::SteadyTimerEvent>::TimerQueueCallback::call() () from /opt/ros/noetic/lib/libroscpp.so
#11 0x00007fac75c76162 in ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS*) () from /opt/ros/noetic/lib/libroscpp.so
#12 0x00007fac75c77873 in ros::CallbackQueue::callAvailable(ros::WallDuration) () from /opt/ros/noetic/lib/libroscpp.so
#13 0x00007fac75ccb02f in ros::SingleThreadedSpinner::spin(ros::CallbackQueue*) () from /opt/ros/noetic/lib/libroscpp.so
#14 0x00007fac75cb324f in ros::spin() () from /opt/ros/noetic/lib/libroscpp.so
#15 0x000055831b95c234 in main ()
My thought:
The start() function returns before start_sensor_connection_thread() is called. Thus, when stop_sensor_connection_thread() is called in the destructor, the std::unique_ptr that is sensor_connection_thread is not initialised, and remains null. A check for a nullptr should be performed in stop_sensor_connection_thread() before checking sensor_connection_thread->joinable().
Describe the bug
When the Ouster is not powered and the code is started, a segmentation fault occurs.
To Reproduce
master
branch onc6f66d2c439aa27a6018a09a5e5b02fa222b52db
<include file="$(find ouster_ros)/launch/sensor.launch">
Debugging information
Journal logs:
Stack trace:
My thought:
The
start()
function returns beforestart_sensor_connection_thread()
is called. Thus, whenstop_sensor_connection_thread()
is called in the destructor, thestd::unique_ptr
that issensor_connection_thread
is not initialised, and remains null. A check for anullptr
should be performed instop_sensor_connection_thread()
before checkingsensor_connection_thread->joinable()
.Platform:
c6f66d2c439aa27a6018a09a5e5b02fa222b52db
The text was updated successfully, but these errors were encountered: