Re: [osg-users] Crash when application closes if linking with OSG

2015-10-05 Thread David Siñuela
Hello, Thanks for your input. We can wait for an upstream fix, in the meanwhile we will patch it in our development branch. I tried your proposed solution, calling DisplaySettings::instance() from main(), and it didn't work, when s_InitRegistry is destroyed the DisplaySettings::s_displaySettings

Re: [osg-users] Crash when application closes if linking with OSG

2015-10-05 Thread Robert Osfield
Hi David, I have removed the InitRegistry proxy object from src/osgViewer/ViewerBase.cpp and introduced OSG_INIT_SINGLETON_PROXY usage in DatabasePager.cpp and Registry.cpp which should ensure that the singleton's are initialized in a single threaded way and destructed in an appropriate order. I

Re: [osg-users] Crash when application closes if linking with OSG

2015-10-05 Thread Robert Osfield
Hi David, I have just had a look at DisplaySettings.cpp and there is a line: OSG_INIT_SINGLETON_PROXY(ProxyInitDisplaySettings, DisplaySettings::instance()) That should in theory force the initialization of the DisplaySettings::instance() singleton during the static initialization of the osg

Re: [osg-users] Crash when application closes if linking with OSG

2015-10-05 Thread Robert Osfield
Hi David, On 5 October 2015 at 14:32, David Siñuela wrote: > It is working fine now, I tested it on Linux and Windows. > That's great to hear. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] Crash when application closes if linking with OSG

2015-10-05 Thread David Siñuela
Hello Robert, It is working fine now, I tested it on Linux and Windows. Thanks! David On Mon, Oct 5, 2015 at 12:48 PM, Robert Osfield wrote: > Hi David, > > I have removed the InitRegistry proxy object from > src/osgViewer/ViewerBase.cpp and introduced

Re: [osg-users] Crash when application closes if linking with OSG

2015-10-02 Thread Robert Osfield
Hi David, Curious bug. Perhaps another solution would be to call DisplaySettings::instance() at the start of main. An actual bug fix might be to put in a proxy object into src/osg/DisplauySettings.cpp that forces that DisplaySettings::instance() to be constructed during static initialization,