pal-robotics / backward_ros

MIT License
168 stars 25 forks source link

No stacktrace is printed on Segfault #21

Open firesurfer opened 2 weeks ago

firesurfer commented 2 weeks ago

Hi, I am look for some help how to integrate this package.

System

Ubuntu 22.04 Ros2 Iron backward_ros: 1.0.5

Setup

I added <depend>backward_ros</depend> to my package.xml. And find_package(backward_ros REQUIRED)

Additionally I set target_compile_options(my_node PRIVATE "-g") just to make sure that it compiles with debug information.

Unfortunately this doesn't work. I tried the advice from #13 to include find_package(Backward) but that still doesn't work.

This is the output of cmake:

-- BACKWARD_HAS_UNWIND=1
-- BACKWARD_HAS_BACKTRACE=0
-- BACKWARD_HAS_BACKTRACE_SYMBOL=0
-- BACKWARD_HAS_DW=1
-- BACKWARD_HAS_BFD=0
-- Found Backward: /opt/ros/iron/share/backward_ros/cmake  

@christophfroehlich I realized a while ago that also the controller_manager does not print stacktraces anymore. So it might that a dependency has changed, or my system is broken ?

christophfroehlich commented 2 weeks ago

I see stacktraces all around ;) Have you made a clean build after adding backward?

firesurfer commented 2 weeks ago

Yes I did. I just tried again in a clean container environment and still: no backtraces.

For testing purposes I added some lines that produce a segfault.

christophfroehlich commented 2 weeks ago

I have RelWithDebInfo in my colcon defaults. Maybe you can try that instead of the compile options flag.

firesurfer commented 2 weeks ago

I also tried that but it didn't work. I have the feeling it something about the backward_ros package in iron.

What I did now is follow the guide the backward_cpp package: https://github.com/bombela/backward-cpp and directly include it via FetchContent.