I'm using osgSim::LineOfSight to answer line-of-sight questions for a larger
application. I'm seeding my osgSim::DatabaseCacheReadCallback with the
appropriate files before I start, and then sending quite a few requests at the
same time, processed through a thread pool. If two threads end up in
osgTerrain::TerrainTile::init() for the same tile at nearly the same time
(which has happened more than once), the following happens. The first thread
in creates a GeometryTechnique and starts calling init() on it. The second
thread replaces that GeometryTechnique with a new one, and unref() deletes the
first one. The first thread, currently in init() on the now-deleted
GeometryTechnique, proceeds to crash the app.
OK, on to my assorted questions:
1) I've currently fixed this by adding a mutex to every TerrainTile, and
locking it on init(). Is this the best solution?
2) Is there a way to force the creation of TerrainTiles and GeometryTiles
at startup?
3) Is there a way to tell VirtualPlanetBuilder to create shorter trees?
osgSim::LineOfSight only uses leaf nodes, so I want to minimize branch nodes as
much as possible.
Thank you for any help you can provide.
[email protected]<mailto:[email protected]>
(who is still working to understand this code)
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org