Hi Jason,

The crash is happening at:

            dispVertInfo = vbsp_reader->getDispVertex(dispVertIndex);

Of the block:

        // Generate the vertices for this section
        for (j = 0; j < numEdgeVertices; j++)
        {
            // Get the displacement info for this vertex
            dispVertIndex = dispInfo.disp_vert_start;
            dispVertIndex += i * numEdgeVertices + j;
            dispVertInfo = vbsp_reader->getDispVertex(dispVertIndex);

            // Calculate the flat vertex
            flatVertex = leftEnd + (leftRightStep * (double) j);

The values of the variables of interest are:

(gdb) print j
$1 = 125292
(gdb) print numEdgeVertices
$2 = 2147483649
(gdb) print dispVertIndex
$3 = 114596

numEdgeVertices certainly looks wrong, and I'd guess it's an issue of
casting.  Since there is a warning about an overflow I think there is
a good chance that this might be related:

home/robert/OpenSceneGraph/src/osgPlugins/bsp/VBSPReader.cpp: In
member function 'std::string bsp::VBSPReader::getToken(std::string,
const char*, int&)':
/home/robert/OpenSceneGraph/src/osgPlugins/bsp/VBSPReader.cpp:388:
warning: overflow in implicit constant conversion

Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to