Add/RemoveImageLayer thread safety and crash

classic Classic list List threaded Threaded
1 message Options
lhussonn lhussonn
Reply | Threaded
Open this post in threaded view
|

Add/RemoveImageLayer thread safety and crash

Hello,

With osgEarth-2.8 I found that a crash can happen randomly by repeatedly removing or adding an image layer from the map (during viewer traversal event).
With a simple call of osgEarth::Map::removeImageLayer;

Following a previous post related to thread safety question : http://forum.osgearth.org/Add-Remove-Layer-thread-safety-td7589855.html.
All instructions and precautions indicated have been followed to add and remove an image layer.

You will find in attachment stack_trace.txt which shows that a crash occurs in the DatabasePager thread (nullptr access) while removeImageLayer is call in the viewer event traversal thread.

So, is there a known issue about thread safety that can explain a crash with multiple call to add or remove Image Layer?
Or do you have any idea where the problems might come from?

Also note that recent commit/pull request on osgEarth seems to be related to thread safety with layer :
https://github.com/gwaldron/osgearth/pull/1068
https://github.com/gwaldron/osgearth/pull/1014

Any help will be greatly appreciated.
Thanks.

L.H.







Ludovic Hussonnois / Sogeti High Tech