Hi Robert, If I remember correctly from the call stack: the call to osg::getGLVersionNumber() was prompted by osgViewer::GraphicsWindowEmbedded's d'tor with several other calls stacked in between.
But thanks for merging in the NULL pointer check anyway;) -- John Robert Osfield wrote:
Thanks John, I have merged your change and submitted to SVN, but why is getGLVersionNumber() being called on close of the application in this instance? It suggest to me a problem lurking elsewhere. On Fri, Sep 19, 2008 at 3:41 PM, John Vidar Larring <[EMAIL PROTECTED]> wrote:Hi Robert, If an application initializes osgViewer::GraphicsWindowEmbedded() but never gets around to do any rendering before the application is closed, the result with be a crash (SIGABRT/std::logic_error) in osg::getGLVersionNumber(). The fix was to check whether glGetString( GL_VERSION ) returned a null pointer (Ref. svn diff below). The altered src/osg/GLExtensions.cpp is zipped and attached to this email. Best regards, John % svnversion 8817M % svn diff src/osg/GLExtensions.cpp Index: src/osg/GLExtensions.cpp =================================================================== --- src/osg/GLExtensions.cpp (revision 8817) +++ src/osg/GLExtensions.cpp (working copy) @@ -44,6 +44,7 @@ { // needs to be extended to do proper things with subversions like 1.5.1, etc. char *versionstring = (char*) glGetString( GL_VERSION ); + if (!versionstring) return 0.0; std::string vs( versionstring ); return( atof( vs.substr( 0, vs.find( " " ) ).c_str() ) ); } -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
-- Best regards, John WeatherOne -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
