I'm trying to debug a segmentation fault on a ROS nodelet. I've tried to use libSegFault by adding the following lines to CMakeLists.txt:


Further, if I enable verbose output with:


I can see that the nodelet library is indeed being compiled with -g and linked against libSegFault.

However, no additional output is generated when the nodelet crashes.

What am I missing? Is the output maybe being suppressed by the ROS logger?


1 Answer 1


It turns out that (as shown here) I had to set the LD_PRELOAD environment variable prior to starting the nodelet, for example:

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libSegFault.so roslaunch ...

A dump was then correctly printed after the nodelet crashed.


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.