FYI, I've used the Referenced.cpp file you posted to get things running. On Fri, Feb 19, 2010 at 9:57 AM, Rafa Gaitan <[email protected]> wrote: > PERFECT! :) > > Thanks Robert! now closes ok, and all is running perfect. > > Singletons sometimes makes life easier.. sometimes not! :) > > > Rafa. > > > On Fri, Feb 19, 2010 at 9:50 AM, Robert Osfield > <[email protected]> wrote: >> Hi Rafa, >> >> Based on the assumption that there is ordering of destruction issue >> with the static Observer::getGlobalObserverMutex() I have tweaked >> src/osg/Referenced.cpp to have the lines: >> >> // helper class for forcing the global mutex to be constructed when >> the library is loaded. >> struct InitGlobalMutexes >> { >> InitGlobalMutexes() >> { >> OSG_NOTICE<<"Forcing the creation of the >> Referenced::getGlobalReferencedMutex()"<<std::endl; >> Referenced::getGlobalReferencedMutex(); >> >> OSG_NOTICE<<"Forcing the creation of the >> Observer::getGlobalObserverMutex()"<<std::endl; >> Observer::getGlobalObserverMutex(); >> } >> }; >> static InitGlobalMutexes s_initGlobalMutexes; >> >> >> Which basically creates a proxy object to force the initializations of >> the static mutexes, and hopefully this will be done before any of the >> scene graph gets constructed, and with these enforced ordering >> hopefully the order of destruction will be sorted out too. >> >> The modified src/osg/Referenced.cpp is now attached. The change to >> ObserverNodePath.cpp can now be reverted as it's taught us all we can >> get from this particular change. >> >> With your own changes at your end it would be good to toggle it the >> changes on/off so we can re-enable the error and test changes in the >> OSG to see if we can fix it. I'm keen to see a fix on the OSG side if >> we can as it may well be not just your app that is affected and could >> well be a wider issue that lurks underneath apps unseen most of the >> time and then pops up randomly. >> >> Thanks for your help, >> Robert. >> >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >> > > > > -- > Rafael Gaitán Linares > Instituto de Automática e Informática Industrial http://www.ai2.upv.es > http://gvsig3d.blogspot.com > Ciudad Politécnica de la Innovación > Universidad Politécnica de Valencia >
-- Rafael Gaitán Linares Instituto de Automática e Informática Industrial http://www.ai2.upv.es http://gvsig3d.blogspot.com Ciudad Politécnica de la Innovación Universidad Politécnica de Valencia _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

