From 44a64165f1d6a612c618cebb7fb0eadc71d7266a Mon Sep 17 00:00:00 2001 From: Ruben Garcia <84038639+rgarciaruiz@users.noreply.github.com> Date: Thu, 18 Jul 2024 17:07:23 -0700 Subject: [PATCH] Fix dds_ros_bridge shutdown so it exits cleanly (#802) Nodelet caused segfault on shutdown which prevented its reload (manager died with it). DDS objects were attempting read/close operations after factory was destroyed leading to segfault inside soraCore. Order of declaration matters, this change lets the factory be the last soraCore reference to be destroyed. Co-authored-by: Ruben Garcia --- .../dds_ros_bridge/include/dds_ros_bridge/dds_ros_bridge.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/communications/dds_ros_bridge/include/dds_ros_bridge/dds_ros_bridge.h b/communications/dds_ros_bridge/include/dds_ros_bridge/dds_ros_bridge.h index a488d1a988..d51c2c9590 100644 --- a/communications/dds_ros_bridge/include/dds_ros_bridge/dds_ros_bridge.h +++ b/communications/dds_ros_bridge/include/dds_ros_bridge/dds_ros_bridge.h @@ -229,8 +229,8 @@ class DdsRosBridge : public ff_util::FreeFlyerNodelet { ros::Publisher robot_name_pub_; ros::ServiceServer srv_set_telem_rate_; - std::map ros_sub_rapid_pubs_; std::shared_ptr dds_entities_factory_; + std::map ros_sub_rapid_pubs_; std::string agent_name_, participant_name_; std::vector rapid_pubs_; std::vector rapid_sub_ros_pubs_;