-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Race condition in ModelRanger::Sensor #85
Comments
Is this problem solved? I am facing this issue. |
I am experiencing the same issue on Ubuntu 18.04 (NVidia Grapics) with melodic. ros-melodic-stage 4.3.0
My crappy workaround is a shell script which launches stageros until it doesnt crash 😂 |
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
The text was updated successfully, but these errors were encountered: