I am totally new to the Panda3D engine, so I read the tutorial. The first code snippet shown in the tutorial (see here: panda3d.org/manual/index.php … ng_Panda3D) crashes on the line
WindowFramework *window = framework.open_window();
Unfortunately I can’t tell you more than what the debugger told me:
Unhandled exception at 0x77e515de in P3D_Test.exe: 0xC0000005: Access violation reading location 0xccccccd0.
Hopefully useful info:
- OS: Windows 7 Home Premium x86-64
- IDE, Compiler: MS VS 2008 Express, MSVCPP 9.0
- P3D: latest stable (1.7.2)
- Graphics: Nvidia GeForce GT555M
Thanks in advance.
Did you compile your project in Release mode, and did you remove NDEBUG from the project settings, as described in the manual?
Yes, I did everything as described in the manual but it still crashes.
I only ask because what you report is exactly what happens if you fail to do that. So I do have to ask, just to be sure: are you sure you’re building in Release mode with NDEBUG removed from the project settings? And you’re sure you’re using MSVS2008, and not MSVS2010?
The next question is, what is the stack trace at the time of the crash?
I am absolutely sure.
Sorry for forgetting this…
This is the content of VS’ call stack window: (strange that it crashes in ntdll)
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
P3D_Test.exe!__tmainCRTStartup() Line 586 + 0x17 bytes
Does pview run successfully on your computer?
Yes. pview and all examples run without any trouble.
Could it be that 2 different installations of VS (VS 2008 Express and VS 2010 Ultimate) collide with each other? I have read on the net that side-by-side installations shouldn’t be problematic and I have also checked all path macros, like $(VSInstallDir), from within VS and they seem to be right.
Anyway, this is the only cause I could think of why it does not work.
I’m having exactly the same problem on a Win7 64-bit OS. I can recreate the sample exactly and it builds, run it and I get the window to appear for just a few seconds, and then it crashes, same stack.
Maybe someone who has built a Panda3D project in C++ using MSVC 2008 could send me the source for their main() so I could compare? Maybe the sample in the tutorial isn’t correct or is out of date.