Hi Mikhail, I have resolved the threading bug associated with osg::State::objectDeleted() by removing the _appliedProgramObjectSet container that was the cause of the threading bug. Reviewing the OSG code base I found that the need for this container centered around State::reset() method that is only called by SceneView::releaseGLObjects() method this method itself isn't used by osgViewer so in effect State::reset() is never called in normal OSG usage and own't have been for a while. Removing this problem container address the threading bug and removes some overhead associated with populating, managing and keeping checking the contents of the container.
With this change I can't get your example to crash any more, even if I up the thread count to 100 and leave it running. This change is now checked into svn/trunk and will be wrapped up in the next dev release (3.3.3). Unfortunately the changes break the ABI of the core OSG so I'm reluctant to apply them to the OSG-3.2 branch, so I'm currently looking at whether I can simply remove the code that is associated with the _appliedProgramObjectSet without removing any public methods like I did with the svn/trunk changes. Robert.
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

