ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Sounds like a pretty typical memory corruption bug. You're probably reading or writing past the end of an array somewhere.
The obvious thing that I notice is that you're not bounds-checking num_dev, but the real solution here is to run your node in a memory checker like valgrind. That will check your memory accesses and point out which function and which line is writing where it shouldn't.
If you're running your node with rosrun, you can use the --prefix option to rosrun or if you're running your node from a launch file, you can follow Roslaunch Nodes in Valgrind or GDB