Home | Tutorials | Wiki | Issues
Ask Your Question

Segmentation Fault on Load Function

asked 2017-09-23 08:22:04 -0500

Haini gravatar image

I am trying to run the Hello World Plugin Tutorial from the Gazebo Website.

After following all the steps and executing gzserver ~/gazebo_plugin_tutorial/hello.world --verbose the "Hello World" Message from the Constructor ist posted, but after that noting happens.

Debugging the Plugin / Gzserver with gdb and Debugging Symbols activated yields the following output: https://pastebin.com/QV0PdFQJ

With the backtrace:

#0  __memcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S:160
#1  0x00007ffff71c53c2 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x00007ffff62a5ed2 in ?? () from /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.7
#3  0x00007ffff628b3cd in gazebo::physics::World::LoadPlugin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<sdf::Element>) ()
   from /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.7
#4  0x00007ffff628d879 in gazebo::physics::World::LoadPlugin(std::shared_ptr<sdf::Element>) ()
   from /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.7
#5  0x00007ffff628dbb0 in gazebo::physics::World::LoadPlugins() ()
   from /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.7
#6  0x00007ffff62a0345 in gazebo::physics::World::Step() ()
   from /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.7
#7  0x00007ffff62a06d5 in gazebo::physics::World::RunLoop() ()
   from /usr/lib/x86_64-linux-gnu/libgazebo_physics.so.7
#8  0x00007ffff40435d5 in ?? () from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0
#9  0x00007ffff65c36ba in start_thread (arg=0x7fffb9bc6700) at pthread_create.c:333
#10 0x00007ffff6bcd3dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

My code is exactly as specified in the tutorial, with the exception of the Makefile where the Debug Symbols are added.

gazebo -v yields version 7.8.1

cmake --version yields version 3.5.1

make -v yields GNU Make 4.1

lsb-release -a yields Ubuntu 16.04.3 LTS

roscore -v yields /rosdistro: kinetic and /rosversion: 1.12.7

What am I doing wrong? My only guess is that I am running Gazebo within VirtualBox and only have a Intel Core i7-4500U with Integrated Graphics (whereas Gazebo states it needs a dedicated NVIDA Card). But running Gazebo without plugins works just fine, so there needs to be a hint that I am missing.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-09-25 04:07:33 -0500

Haini gravatar image

The problem seems to be related with me using g++ and gcc < 5.0 as the default, while completely removing g++ and gcc > 5.0 (5.4 in my case) from the priority list with the update-alternatives utility.

After setting up a fresh VirtualBox Machine everything worked out fine and I was able to reproduce the behavior on my real Ubuntu 16.04 install - where the same default compiler settings were made.

As a bonus I was then able to compile the V-REP RosInterface and use it without producing segmentation faults. So the issue is most probable related to the ROS Part of the process.

I guess Simulink / Matlab will have to live with the fact that the default compiler is not supported, at least they can fallback to the older versions after producing some error messages.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-09-23 08:22:04 -0500

Seen: 100 times

Last updated: Sep 25 '17