Ask Your Question
0

Segmentation fault in rtt_ros_integration_example

asked 2011-03-24 23:21:15 -0600

Miguel Prada gravatar image

updated 2011-03-27 05:11:37 -0600

Hi,

I'm trying to run the hello world example in rtt_ros_integration_example and I get a segmentation fault after (or while, not sure) importing the ROS types. Last lines before the segfault are:

0.084 [ Info   ][TypekitRepository::Import] Loading Typekit ros-primitives.
0.084 [ Debug  ][TypekitRepository::Import] Registered Type name 'time' to the Orocos Type System.
0.084 [ Debug  ][TypekitRepository::Import] Registered Type name 'int8' to the Orocos Type System.
0.084 [ Debug  ][TypekitRepository::Import] Registered Type name 'int8[]' to the Orocos Type System.
0.084 [ Debug  ][TypekitRepository::Import] Registered Type name 'uint8' to the Orocos Type System.
0.084 [ Debug  ][TypekitRepository::Import] Registered Type name 'uint8[]' to the Orocos Type System.
0.084 [ Debug  ][TypekitRepository::Import] Registered Type name 'int16' to the Orocos Type System.
0.084 [ Debug  ][TypekitRepository::Import] Registered Type name 'int16[]' to the Orocos Type System.
0.084 [ Debug  ][TypekitRepository::Import] Registered Type name 'uint16' to the Orocos Type System.
0.084 [ Debug  ][TypekitRepository::Import] Registered Type name 'uint16[]' to the Orocos Type System.
0.084 [ Debug  ][TypekitRepository::Import] Registered Type name 'int32' to the Orocos Type System.
0.085 [ Warning][TypekitRepository::Import] Overriding TypeInfo for 'ints' with 'int32[]'.
0.085 [ Debug  ][TypekitRepository::Import] Registered Type name 'int32[]' to the Orocos Type System.
0.085 [ Debug  ][TypekitRepository::Import] Registered Type name 'uint32' to the Orocos Type System.
0.085 [ Debug  ][TypekitRepository::Import] Registered Type name 'uint32[]' to the Orocos Type System.
0.085 [ Debug  ][TypekitRepository::Import] Registered Type name 'int64' to the Orocos Type System.
0.085 [ Debug  ][TypekitRepository::Import] Registered Type name 'int64[]' to the Orocos Type System.
0.085 [ Debug  ][TypekitRepository::Import] Registered Type name 'uint64' to the Orocos Type System.
0.085 [ Debug  ][TypekitRepository::Import] Registered Type name 'uint64[]' to the Orocos Type System.
0.085 [ Debug  ][TypekitRepository::Import] Registered Type name 'float32' to the Orocos Type System.
0.085 [ Debug  ][TypekitRepository::Import] Registered Type name 'float32[]' to the Orocos Type System.
0.085 [ Debug  ][TypekitRepository::Import] Registered Type name 'float64' to the Orocos Type System.
0.085 [ Debug  ][TypekitRepository::Import] Registered Type name 'float64[]' to the Orocos Type System.
0.085 [ Debug  ][TypekitRepository::Import] Registered Type name 'string' to the Orocos Type System.
Segmentation fault

I'm running ROS diamondback using pre-compiled debian packages. Has anyone managed to run this example? Any idea of what might be going wrong?

Edit: I provide a gdb backtrace, as Ruben suggested.

6.331 [ Debug  ][TypekitRepository::Import] Registered Type name 'string' to the Orocos Type System.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff0a69dd7 in ros_integration::ROSPrimitivesTypekitPlugin::loadConstructors (this=<value optimised out>)
    at /tmp/buildd/ros-diamondback-orocos-toolchain-ros-0.2.1/debian/ros-diamondback-orocos-toolchain-ros/opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt_ros_integration/src/orocos/types/ros_primitives_typekit_plugin.cpp:122
122 /tmp/buildd/ros-diamondback-orocos-toolchain-ros-0.2.1/debian/ros-diamondback-orocos-toolchain-ros/opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt_ros_integration/src/orocos/types/ros_primitives_typekit_plugin.cpp: No such file or directory.
    in /tmp/buildd/ros-diamondback-orocos-toolchain-ros-0.2.1/debian/ros-diamondback-orocos-toolchain-ros/opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt_ros_integration/src/orocos/types/ros_primitives_typekit_plugin.cpp
(gdb) backtrace
#0  0x00007ffff0a69dd7 in ros_integration::ROSPrimitivesTypekitPlugin::loadConstructors (this=<value optimised out>)
    at ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2011-03-28 08:34:35 -0600

updated 2011-03-28 08:39:00 -0600

Ok, it's really strange that no-one, including me, never bumped into this one. It looks like the 'float' type is not known to the RTT typesystem before importing the ros_primitives typekit. This can happen if the rtt_primitives typekit is not loaded yet.

Could you retry after exporting

 RTT_COMPONENT_PATH=`rospack find rtt`/install/lib/orocos

this should make sure the rtt_primitives are loaded at startup. Can you verify this in the log?

If it still does not work, could you post the entire log so I can see why the rtt_primitives are not loaded?

-- Ruben

edit flag offensive delete link more

Comments

It does work now. I can see that the 'float' type gets loaded from librtt-typekit-gnulinux.so (I guess this is the typekit you're referring to) before being overriden by float32 in librtt-ros-primitives-typekit-gnulinux.so. If you need me to run any other test to see why it happens, please ask.
Miguel Prada gravatar imageMiguel Prada ( 2011-03-28 09:42:26 -0600 )edit
0

answered 2011-03-24 23:58:42 -0600

could you provide a gdb backtrace.

-- Ruben

edit flag offensive delete link more

Comments

I updated the question with the backtrace.
Miguel Prada gravatar imageMiguel Prada ( 2011-03-27 05:13:08 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-03-24 23:21:15 -0600

Seen: 309 times

Last updated: Mar 28 '11