Thanks Nick and Michael for the quick response. The problem was mine. I
didn't realize opening the native OSG file required a plug-in. I was
skipping a build step to make sure I understood what every component did
(helps me learn).

When I built the required plug-in for loading the basic OSG file it worked
fine.

I have to tip the hat to the error response system in OSG. I'm impressed.
Walking through with a debugger I noticed the ReaderWriter::ReadResult
returned from readNode gave me exactly what the root cause of the null model
was...

ERROR_IN_READING_FILE
"Warning: Could not find plugin to read objects from file"

I'm spoiled now. Well done.

Thanks!



________________________________
> From: [EMAIL PROTECTED]
> To: osg-users@lists.openscenegraph.org
> Date: Tue, 28 Aug 2007 13:18:52 -0400
> 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


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to