Open richmattes opened 7 years ago
Is this problem solved? I am facing this issue. Is there a way to overcome this with our controller code? I am currently using Stage 4.3.0 Player 3.1.0 Ubuntu 16.04 LTS
I am experiencing the same issue on Ubuntu 18.04 (NVidia Grapics) with melodic.
ros-melodic-stage 4.3.0 ros-melodic-stage-ros 1.8.0
Thread 1 "stageros" received signal SIGSEGV, Segmentation fault.
0x00007ffff693f0ca in Stg::ModelRanger::Sensor::Visualize(Stg::ModelRanger::Vis*, Stg::ModelRanger*) const () from /opt/ros/melodic/lib/libstage.so.4.3.0
(gdb) bt
#0 0x00007ffff693f0ca in Stg::ModelRanger::Sensor::Visualize(Stg::ModelRanger::Vis*, Stg::ModelRanger*) const () from /opt/ros/melodic/lib/libstage.so.4.3.0
#1 0x00007ffff693f7f5 in Stg::ModelRanger::Vis::Visualize(Stg::Model*, Stg::Camera*) () from /opt/ros/melodic/lib/libstage.so.4.3.0
#2 0x00007ffff6936b8a in Stg::Model::DataVisualizeTree(Stg::Camera*) () from /opt/ros/melodic/lib/libstage.so.4.3.0
#3 0x00007ffff6936bbf in Stg::Model::DataVisualizeTree(Stg::Camera*) () from /opt/ros/melodic/lib/libstage.so.4.3.0
#4 0x00007ffff6956d3c in Stg::Canvas::renderFrame() () from /opt/ros/melodic/lib/libstage.so.4.3.0
#5 0x00007ffff6954a4e in Stg::Canvas::draw() () from /opt/ros/melodic/lib/libstage.so.4.3.0
#6 0x00007ffff34559b6 in Fl_Gl_Window::flush() () from /usr/lib/x86_64-linux-gnu/libfltk_gl.so.1.3
#7 0x00007ffff3164837 in Fl::flush() () from /usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#8 0x00007ffff316594d in Fl::wait(double) () from /usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#9 0x00007ffff3165a1d in Fl::wait() () from /usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#10 0x00007ffff6947941 in Stg::World::Run() () from /opt/ros/melodic/lib/libstage.so.4.3.0
#11 0x0000555555565c83 in main ()
My crappy workaround is a shell script which launches stageros until it doesnt crash :joy: Takes about 15 times ^^
This bug came out of a thread on the player-users mailing list.
Software Version
Stage version: 4.3.0 Player version: 3.1.0
Bug Description
I believe there's a race condition between the worker thread that runs
ModelRanger::Sensor::Update
and the main thread that is responsible for visualization (and callsModelRanger::Sensor::Visualize
) The segmentation fault occurs inModelRanger::Sensor::Visualize
, where the code tries to access theranges
member vector. At this point, the ranges vector size is zero, so accessing the first index of the vector causes a segfault. A gdb trace is supplied at the end of the bug report.The
ranges
vector gets resized to the proper size in theModelRanger::Sensor::Update
function, so I believe that the visualize function is getting called before the update function.Possible solutions:
Update
always gets called beforeVisualize
Load
functionVisualize
function that returns early ifranges.size()
is 0How to reproduce
speedup
to 1player simple.cfg
playerprint ranger
)Expected Results
The ranger values get printed through the player proxy.
Actual results
Segmentation Fault
GDB output