From Frashud Lashkari, "I was getting "Unsupported wrapper class..." error messages when attempting to load osgb models simultaneously from multiple threads. I believe the problem is caused by un-synchronized access to the global osgDB::ObjectWrapperManager class. I've attached a change that adds a mutex to the class and uses it when accessing the internal wrapper/compress maps. This appears to fix the issues I was having."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14880 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#ifndef OSGDB_OBJECTWRAPPER
|
||||
#define OSGDB_OBJECTWRAPPER
|
||||
|
||||
#include <OpenThreads/ReentrantMutex>
|
||||
#include <osgDB/Serializer>
|
||||
#include <osg/ScriptEngine>
|
||||
|
||||
@@ -169,6 +170,8 @@ protected:
|
||||
ObjectWrapperManager();
|
||||
virtual ~ObjectWrapperManager();
|
||||
|
||||
OpenThreads::ReentrantMutex _wrapperMutex;
|
||||
|
||||
WrapperMap _wrappers;
|
||||
CompressorMap _compressors;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user