Hi, I'm hoping someone can shed some light on an issue we are having, running 
OSG 2.8.2 (redhat 5.3) in single threaded mode and creating scenegraph 
components on a background thread. 

Basically, we are using a background thread to build up scenegraph components 
and then adding them to our 'main' scenegraph. For the most part, this works 
fine, but when the activity on the background and main threads are high (eg. a 
lot of stuff moving around/ being drawn in the main scene, plus lots of updates 
happening on our background thread) we are seeing occasional crashes in 
setAssociatedModes() and other stateset related functions.

My first thought was that somehow our calls to getOrCreateStateSet() from our 
background thread were interfering with state set manipulation on the main 
thread,  indeed replacing getOrCreateStateSet with a call to explicitly create 
the stateset appears to resolve the crash.

Can anyone confirm whether calling getOrCreateStateSet() outside the main 
thread is a safe / sensible  thing to do? As I say, I have what appears to be a 
fix for the problem, but it would be nice to understand what is going wrong 
before progressing it.

Thanks in advance for any help.

Cheers,

Paul

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





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to