[osg-users] osgviewerMFC example crash in 2.1.8
Ricko 3D
ricko3D at gmail.com
Tue Aug 28 10:41:26 PDT 2007
By the way, to clarify when I wrote cOSG::InitSceneGraph ("MFC_OSG.cpp") I
meant it was in the MFC_OSG.cpp file, not that it was a parameter passed. I
didn't realize how poorly I wrote that until reading the mail again. Sorry.
That isn't the issue I'm trying to resolve.
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Ricko 3D
Sent: Tuesday, August 28, 2007 1:19 PM
To: osg-users at lists.openscenegraph.org
Subject: [osg-users] osgviewerMFC example crash in 2.1.8
I'm still finding my way around OSG so I wanted to find out if this issue is
mine before I continue pulling my hair out.
I downloaded and built OSG 2.1.8. I took the code from one of the examples
to test, prior to integrating OSG into my app. This is on WinXP SP2 x86 and
the dev env is VC++ in VS8.
- I created a new project using the code from the "osgViewerMFC" example.
- It compiled fine in both release and debug and it launches with no issues.
- When I use the open command (from menu or toolbar) and direct it to any
test osg file, it crashes with both debug and release builds.
- I used the VS debugger to walk through and find the crash in the debug
build.
- Line 143 of "optimizer.cpp" caused an unhandled exception because node was
a NULL point.
- I walked up the call stack back into the osgViewerMFC code and found the
cause is that mModel in cOSG::InitSceneGraph ("MFC_OSG.cpp") is also NULL.
- It turns out osgDB::readNodeFile, earlier in InitSceneGraph, returned a
NULL mModel even though the filename passed was valid.
To verify it wasn't my settings when creating the example project from
scratch I chose another example, specifically osgShadow example. I created a
new project added the source, compiled, and both debug and release work
perfectly.
Is this a known issue with osgViewerMFC? If not any suggestion on what might
be causing it?
Thanks!
Ricko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070828/62befdfd/attachment.htm
More information about the osg-users
mailing list