Hello,
I've encountered a bug in Sequence.cpp where the update function crashes
(OSG 3.1.2, VisualStudio 2005)
The problem is the _begin,_end in conjunction with the frameTime list.
If a setInterval is called with invalid values the update function will
determine an incorrect index into the _frameTime vector.
Now there are two questions how to fix this.
1. As I don't know the details about the sequence implementation I'm
wondering if the indices are put in correctly.
It seems that most of the flt-files insert a range of 1,1 and only
define one frame which later on will access the _frameTime[1].
The question here is, is the frame with number 1 really the index 1?
Maybe someone can help me out here, as I don't know the exact
specification for openflight.
2. I see two approaches here.
First is to fix the sequence numbers and insert begin-1 and end-1
instead of the original values.
Also there should be check before inserting, if the _frameNumber size is
sufficient. I additionally could add a runtime check before accessing
the _frameTime vector.
Second option is to look into the openflight importer. Maybe the problem
is here. Either the source file is not valid at this point, or the
importer is using the wrong indices.
So any opinions how to fix it?
This is the sequence in question:
Sequence {
name "test"
nodeMask 0xffffffff
cullingActive TRUE
defaultTime 1
frameTime {
0
}
lastFrameTime 0
interval LOOP 1 1
duration 1 -1
mode START
sync 0
clearOnStop 0
num_children 1
Geode {
DataVariance STATIC
name "p3813"
nodeMask 0x0
cullingActive TRUE
StateSet {
DataVariance STATIC
rendering_hint DEFAULT_BIN
renderBinMode INHERIT
GL_CULL_FACE ON
GL_LIGHTING ON
Use Material_4
Use CullFace_1
}
num_drawables 1
Geometry {
DataVariance STATIC
useDisplayList TRUE
useVertexBufferObjects FALSE
PrimitiveSets 1
{
DrawArrays QUADS 0 4
}
VertexArray Vec3Array 4
{
-2.04065 -7.8943 -5.90435
5.11647 -6.81152 -5.90435
2.69813 7.57828 -5.90601
-5.07137 5.89075 -5.90601
}
NormalBinding PER_VERTEX
NormalArray Vec3Array 4
{
-2.50113e-005 0.000115154 1
-2.50113e-005 0.000115154 1
-2.50113e-005 0.000115154 1
-2.50113e-005 0.000115154 1
}
ColorBinding OVERALL
ColorArray Vec4Array 1
{
1 1 1 1
}
}
}
}
cheers
Sebastian
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org