Hi,

I have been writing a simple test program to try to solve another issue and 
found that when I use global referenced pointers OSG (trunk) seg faults on exit.

This works without any issue: 


Code:

#include < osgViewer/Viewer >
#include < osg/Node >

int main(int argc, char** argv) 
{
osg::ref_ptr< osgViewer::Viewer > viewer = new osgViewer::Viewer(); 

osg::ref_ptr< osg::Node > globe = new osg::Node;
viewer->setSceneData( globe );

return viewer->run(); 
} 




This seg faults on exit: 


Code:

#include < osgViewer/Viewer >
#include < osg/Node >

osg::ref_ptr< osgViewer::Viewer > viewer; 
osg::ref_ptr< osg::Node > globe; 

int main(int argc, char** argv) 
{
viewer = new osgViewer::Viewer(); 

globe = new osg::Node;
viewer->setSceneData( globe ); 

return viewer->run(); 
} 




The only difference is the global scope reference pointers (it is the same if 
you load cow.osg instead of an empty node). I would have thought this should 
work - am I missing something simple?

Using OSG 3.1.6 (updated today 3 May), Kubuntu 12.04 64 bit.

Thank you!

Cheers,
Roland

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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to