Hello Robert,

I'm having a problem with my application crashing when I try to create a 
while(!viewer->done()) loop. The run time error I am getting is:

Unhandled exception at 0x00361710 in elevator.exe: 0xC0000005: Access violation 
reading location 0x00000415.

You should run your program in a debugger and see where it crashes. This kind of message is totally useless, and just running in a debugger will likely point out exactly where the problem occurs, and since you have the code in front of you, you'll be able to fix it.

Could someone take a look and help me out?

In the posted code, several functions are not declared or defined (initTracker(), camUpdate(viewer) ) and I don't even see where the viewer variable is declared. You don't seem to be including any of your own headers so I don't see where those come from. We can have a quick look at some code but that's generally not very useful as it will leave us with more questions than answers. Post the complete code to a small example that reproduces your issue for best results.

In your particular case I'd be suspicious of the camUpdate(viewer) function, since it's being passed a pointer to the viewer, we can't know what's going on in there but something bad seems to be happening to the viewer.

Then again, you might also be mixing release and debug binaries when compiling, we have no way of knowing that either. A lot has been said about the need to be sure you link release with release, debug with debug when using Visual C++. Have a search in the archives or the forum for more details.

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                    http://whitestar02.dyndns-web.com/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to