I noticed a bug in the 2.6.0 version of the API with the viewer config
file reader plugin. I can't access the latest developer source code
right now so I can't verify that the bug still exists in the 2.7 version
of the API, but I've attached the config file that I used to reproduce
the problem. The problem is that the plugin causes a segfault when it
reads that configuration file because the _realized member variable of
the RenderSurface class defined in src/osgPlugins/cfg/RenderSurface.cpp
is never given an initial value. Interestingly enough this problem does
not occur on my Linux box, which is running Redhat Enterprise Client 5.
However, on my Windows box with Visual Studio 2005 Professional the
_realized variable is auto-initialized to true which ends up causing the
segfault to occur. I'm guessing, but haven't verified, that the reason
it works on my Linux box is because the GCC compiler auto-initializes
the variable to false which prevents the bug from occurring.

 

Here is how I ran the osgviewer to get it to crash:

 

osgviewer -c oneWindow.cfg <name of osg file>

 

I also found that once I went into the ReaderSurface's constructor and
added "_realized = false;" to it then the bug went away.

 

Alex

Camera "Camera 1"
{
        RenderSurface "GDE Viewer" {
                Visual  { SetSimple }
                Screen 0;
                WindowRect 0 0 1024 768;
                Border on;
        }
        Lens {
                Perspective 40.0 30.0 1.0 10000.0;
        }
        Offset {
                Shear 0.0 0.0;
        }
}
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to