Unexplainable double free or corruption
The following code detect the position of the objects using a LIDAR sonsor, it records in a list the objects with the min and max angles of each object. The code works correctly but after a while it stops with double free or corruption.
https://gist.github.com/hdd-robot/15dfe1b1e944eabfd92bd87a2b46bdf3
I have debugged the code with GDB, it tells that the program has received a SIGABRT signal and it is stop at line 128 "loop_rate.sleep ();"
Do you have any idea ? Thanks in advance !
Asked by hdd-robot on 2019-04-23 05:30:17 UTC
Comments
This kind of error means there is something wrong with the memory, have you tried debugging using valgrind ?
I tried your code it didn't cause any issue, does it happen all the time after some time or does it depend of the lidar data ?
Asked by Delb on 2019-04-23 07:19:06 UTC
Thanks for your answer, here you find data test file created with rosbag ros_bag_file To launch rosbag file just do : rosbag play -l laser_scan_2019-04-23-09-58-14.bag
The issue is happen all the time after some time of runing. Thanks.
Asked by hdd-robot on 2019-04-23 07:50:52 UTC
Can we see the output of your node when you pass
--cmake-args -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-fsanitize=address"
tocatkin_make
(pleaserm -rf build
in your catkin workspace before you run the above).Asked by allenh1 on 2019-04-23 10:41:00 UTC