I'm using VC9 64-bit. The application creates multiple threads and loads and
saves files (think of it like a parallel osgConv).

It is crashing here.
static TextureGLModeSet& getTextureGLModeSet()
{
    static TextureGLModeSet s_textureGLModeSet;
    return s_textureGLModeSet;
}

This is called by bool osg::isTextureMode(StateAttribute::GLMode mode)
during loading files. This static object creation is not threadsafe and thus
is crashes when two threads attempt to create the set at the same time. I
noticed problems with this function were reported before
http://comments.gmane.org/gmane.comp.graphics.openscenegraph.user/2732

One potential solution would be copying the mutex based implementation
located at static const Node::DescriptionList& getStaticDescriptionList()

The solution I currently have explicitly calls osg::isTextureMode(0); before
starting the threads. Which works however it is not a good solution for
applications who have not run into this problem.

Regards,
Colin Branch
-- 
Colin Branch
Senior Software Engineer, VR-Vantage
VT-MAK
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to