Hi,

the current osgTerrain code has some bugs and will lead to deadlocks.
Two bugs are fixed in the appended file, while for the deadlocks the solution 
is not clear to me.

One deadlock can be avoided by setting updateNeighboursImmediately = false - 
but I don't think this is the right solution. If updateNeighboursImmediately is 
true, the deadlock appears when the GeometryTechnique locks itself for update, 
and then locks the neighbour - and the neighbour does the same in another 
database thread.

There is still one deadlock in the Terrain and TerrainTile/GeometryTechnique - 
Terrain::traverse() locks first the terrain and then the 
TerrainTile/GeometryTechnique while in GeometryTechnique::init() first the 
GeometryTechnique is locked, and later in the function 
Terrain::updateTerrainTileOnNextFrame() is called which gets the lock on 
Terrain. 

I have no idea yet how to resolve this.

Thank you!

Cheers,
Andreas

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27225#27225




Attachments: 
http://forum.openscenegraph.org//files/geometrytechnique_424.cpp


_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to