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


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 :
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 :

Any help will be greatly appreciated.


Ludovic Hussonnois / Sogeti High Tech