Crash after run application

I’m beginner for Panda3D

I install follow the manual and Build code is OK

but application crash after run.

and dialog show

First-chance exception at 0x6a029886 in PandaTest.exe: 0xC0000005: Access violation reading location 0xd015ff50.

Unhandled exception at 0x6a029886 in PandaTest.exe: 0xC0000005: Access violation reading location 0xd015ff50.

Do you know why?

Thank you.

Those numbers mean nothing to anyone, unfortunately. I don’t know why the operating system bothers to print them. To find out why your application is crashing, you’ll need to run your application within the debugger, then examine the stack trace at the time of the crash.

David

I trace the line of code and crash at

   WindowFramework *window = framework.open_window();

debugger point to file crtexe.c at

 /* WPRFLAG */
        __initenv = envp;
        mainret = main(argc, argv, envp);

That is all I know.

Thank you.

Are you calling framework.open_window() a second time after the application has finished?

David

I call WindowFramework just first time follwing is my code

// Include all the stuff
#include “pandaFramework.h”
#include “pandaSystem.h”

// Init the PandaFramework class
PandaFramework framework;

int main(int argc, char *argv[]) {
// Open the framework
framework.open_framework(argc, argv);
// Set a nice title
framework.set_window_title(“Hello World!”);
// Open it!
WindowFramework *window = framework.open_window();

// Check whether the window is loaded correctly
if (window != (WindowFramework *)NULL) {
nout << “Opened the window successfully!\n”;

window->enable_keyboard(); // Enable keyboard detection
window->setup_trackball(); // Enable default camera movement

// Put here your own code, such as the loading of your models

// Do the main loop
framework.main_loop();

} else {
nout << “Could not load the window!\n”;
}
// Close the framework
framework.close_framework();

return (0);
}

I try to avoid calling

WindowFramework *window = framework.open_window();

then nothing crash.

Thank you.

I think you are looking at the wrong end of the call stack, then. What does the other end look like?

David