0
$\begingroup$

Rosanswers logo

Hi

I only got the following error message:

[package-2] process has died [pid 14880, exit code -6, cmd /home/user/catkin_ws/devel/lib/package/package_node /package/sub_topic:=/topic __name:=package __log:=/home/user/.ros/log/74b3f964-c270-11ea-9dfa-98e743bf11b3/package-2.log].
log file: /home/user/.ros/log/74b3f964-c270-11ea-9dfa-98e743bf11b3/package-2*.log

How do I find the line of code, where the code crashed?

Edit: Is there also a way to run the executable via rosrun or roslaunch?

I don't get any errors with gdb <path to ros executable>, but the node is also not getting any input topics (for example the navigation goal I usually set in RVIZ).

Thanks


Originally posted by gab27 on ROS Answers with karma: 15 on 2020-07-10

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hello,

you should compile your code to include the debug symbols. You need to run your catkin command with:

catkin_make_isolated --cmake-args -DCMAKE_BUILD_TYPE=Debug --pkg <your package>

Then you need to run your code with gdb.

gdb <path to your ros executable>

When the code fails use the command bt to see the backtrace and see what is going on in your code.


Originally posted by ahcorde with karma: 421 on 2020-07-10

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by gab27 on 2020-07-12:
Thanks, I try that.

Comment by gab27 on 2020-07-12:
Is there also a way to run the executable via rosrun or roslaunch?

I don't get any errors with gdb <path to ros executable>, but the node is also not getting any input topics (for example the navigation goal I usually set in rviz, but I could also publish it via the terminal).

Comment by billy on 2020-07-13:
That's cool. + 1 I started on ubuntu/linux just to play with ROS. No background in linux and never heard of this(GDB) until your post. Thank you.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.