How to create gsg?

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? :blush:

Wow, that’s a lot of information to wade through. All I wanted to see was the stack trace. :wink: 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?


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) {


        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();

        NodePath rig = NodePath("rig");

        PT(GraphicsOutput) buffer =  window->get_graphics_output()->make_cube_map("env",64,rig);


        PT(TextureStage) defaultOne = TextureStage::get_default();
        teapot.set_tex_gen(defaultOne, TexGenAttrib::M_world_cube_map);
        Thread *current_thread = Thread::get_current_thread();
        while(framework.do_frame(current_thread)) {
    } else {
    	nout << "Could not load the window!\n";
    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?


Yes, It’s OK in the host environment(Windows).