P3D app crashes on startup

Hello!
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.

Hi, welcome!

Did you compile your project in Release mode, and did you remove NDEBUG from the project settings, as described in the manual?

David

Yes, I did everything as described in the manual but it still crashes. :frowning:

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?

David

I am absolutely sure.

Sorry for forgetting this…
This is the content of VS’ call stack window: (strange that it crashes in ntdll)

>	ntdll.dll!77e515de() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]	
 	ntdll.dll!77e515de() 	
 	ntdll.dll!77e4014e() 	
 	kernel32.dll!755814dd() 	
 	cgGL.dll!0110a852() 	
 	cgGL.dll!0110a79b() 	
 	cgGL.dll!010e2e31() 	
 	cgGL.dll!010e3fb0() 	
 	libpandagl.dll!0107c0d0() 	
 	libpandagl.dll!0108c77e() 	
 	libpandagl.dll!01091033() 	
 	libpanda.dll!017e5c4d() 	
 	libpanda.dll!0181a6e9() 	
 	user32.dll!75f183a4() 	
 	user32.dll!75f16939() 	
 	libp3windisplay.dll!009d1c13() 	
 	libp3windisplay.dll!009e440b() 	
 	libpanda.dll!017e5c4d() 	
 	libpanda.dll!017fb583() 	
 	libpanda.dll!017ec610() 	
 	libp3windisplay.dll!009d499a() 	
 	libpanda.dll!017dbc8c() 	
 	libpanda.dll!017e513c() 	
 	libpanda.dll!0181b933() 	
 	libpanda.dll!01822e75() 	
 	libpanda.dll!01822ed0() 	
 	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.