Hi Tugkan, On 2/23/07, Tugkan Calapoglu <[EMAIL PROTECTED]> wrote:
This was a step in the correct direction I think. Adding osg::Referenced::setThreadSafeReferenceCounting(true); solved the problem. I removed all setThreadSafeRefUnref()'s and it was still ok. Maybe setThreadSafeReferenceCounting should be automatically enabled depending on the threading mode.
This is what osgProducer does, but this requires the user to constuct the viewer and the threading model before loading the scene graph. For osgViewer I have tried to do the setting when required and allow construction order of viewer/scene graph to be interchangable. What we are missing is is a setThreadSafeRefUnRef on the objects that are being a problem, we just need to isolate which objects they are.
However, now I observe a crash when I cycle through the modes with 'm' and come back to DrawThreadPerContext mode. Application starts with default threading mode then I set to SingleThreaded in code and then in runtime I go to DrawThreadPerContext again. You can find the stack trace and the code I used as attachment.
The stack trace is again associated with StateSet's so it sounds like we have the same issue just appearing in different places. I'll download load your latest modified osgviewer to see if I can recreate the same errors, if I can then tracking down and fix the problem will become a lot easier. Robert. _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/