Initiating the command rosrun gpd_ros detect_grasps_server results in a SIGSEGV with backtrace:
(gdb) bt
#0 0x000000000040e30c in GraspDetectionServer::GraspDetectionServer (this=0xffeffee70, node=...)
at ~/catkin_ws/src/gpd2_ros/src/gpd_ros/grasp_detection_server.cpp:14
#1 0x000000000040d71e in main (argc=1, argv=<optimized out>)
at ~/catkin_ws/src/gpd2_ros/src/gpd_ros/grasp_detection_server.cpp:132
and valgrind is saying:
==20809== Invalid read of size 8
==20809== at 0x40E30C: GraspDetectionServer::GraspDetectionServer(ros::NodeHandle&) (grasp_detection_server.cpp:14)
==20809== by 0x40D71D: main (grasp_detection_server.cpp:132)
==20809== Address 0x0 is not stack'd, malloc'd or (recently) free'd
It didn't make much sense (the error was alternating between the std::string constructor and the ros::NodeHandle object) and the culprit is unrelated to the error messages:
Initiating the command
rosrun gpd_ros detect_grasps_server
results in a SIGSEGV with backtrace:and valgrind is saying:
It didn't make much sense (the error was alternating between the
std::string
constructor and theros::NodeHandle
object) and the culprit is unrelated to the error messages:https://github.com/atenpas/gpd2_ros/blob/63cec397d5c2ee064f32d21afe373290da5b63fa/src/gpd_ros/grasp_detection_server.cpp#L11
Commenting this line, and it's declaration in https://github.com/atenpas/gpd2_ros/blob/master/include/gpd_ros/grasp_detection_server.h#L103 results in no more segfaults. The variable is uninitialized (and never used anyways) so either a simple
or deleting the variable, work.