I have pasted all trace information to the forum.
It seems that the problems are happend in the part 3, end part of them. How to do next?
I have pasted all trace information to the forum.
It seems that the problems are happend in the part 3, end part of them. How to do next?
Wow, thatâs a lot of information to wade through. All I wanted to see was the stack trace. Most of this is meaningless to me.
Itâs hard to tell, but it looks like the error is happening on line 39, or possibly line 15, of your own Dynamic_CubeMap.cxx file. What is happening on those lines?
Do you have experience with debugging a crashing C++ program? This is a fairly common situation with C++ development. I donât know what your normal approach to solving this kind of problem would be, but I would usually first look at the stack trace to find the line that caused the crash. That usually gives you the first clue as to the nature of the problemâfor instance, if youâre referencing a pointer there, maybe itâs a bad pointer for some reason; and then you know more details about the sort of thing to look for.
Edit: Oh, I see a little more clearly now. It looks like itâs crashing in glCopyTexImage2D(), which is a standard OpenGL call. Hmm, thatâs troubling, indeed. Can you post a complete sample program that replicates the crash?
David
I have found one reason of the crashing: because of this code were running on a virtual machine.
int main(int argc, char *argv[]) {
framework.open_framework(argc, argv);
framework.set_window_title("Dynamic Cube Map");
WindowFramework *window = framework.open_window();
if (window != (WindowFramework *)NULL) {
window->enable_keyboard();
window->setup_trackball();
camera = window->get_camera_group();
NodePath teapot = window->load_model(framework.get_models(),"teapot.egg");
NodePath scene = window->load_model(framework.get_models(),"streetscene/street-scene.egg");
render = window->get_render();
teapot.reparent_to(render);
scene.reparent_to(render);
scene.set_z(-2);
NodePath rig = NodePath("rig");
PT(GraphicsOutput) buffer = window->get_graphics_output()->make_cube_map("env",64,rig);
rig.reparent_to(teapot);
PT(TextureStage) defaultOne = TextureStage::get_default();
teapot.set_tex_gen(defaultOne, TexGenAttrib::M_world_cube_map);
teapot.set_texture(buffer->get_texture());
Thread *current_thread = Thread::get_current_thread();
while(framework.do_frame(current_thread)) {
}
} else {
nout << "Could not load the window!\n";
}
framework.close_framework();
return (0);
}
So, the 15th and 39th lines are:
framework.open_framework(argc, argv);
......
PT(GraphicsOutput) buffer = window->get_graphics_output()->make_cube_map("env",64,rig);
However, in the real host environment, even python code has some bugs:
Can you help us?
OK, right, I donât think you can expect it to work in a virtual machine. In general, graphics drivers arenât available to the virtual machine. Iâd be very surprised if you can render anything at all in a virtual machine.
The âreal host environmentâ error looks like it might be a known issue, a spurious error message generated at shutdown (see this thread). But it could be something differentâdo you get good results in spite of the error message?
David
Yes, Itâs OK in the host environment(Windows).
Thanks!