Hi Pecoraro thank to spot the bug please send your submissions on osg-submissions the next time.
after review the original code, at line Optimizer.cpp:1561 lod->getNumRanges() is used to know how many iteration will be done in the "for loop", and getNumRanges have to be equal to getNumChild, so lod->getChild(i) at line 1563 is not the problem. Perhaps you LOD is not synchronised (num of children and num of range are not equal)i don't know why or how is possible. Anyway, in a case of a PagedLOD, only the code of LOD is used, so not special case for a PagedLOD. correct me if i'm wrong. Cheers David Callu 2008/6/6 Pecoraro, Alexander N <[EMAIL PROTECTED]>: > > I think there is a bug in the osgUtil::Optimizer::CombineLODVisitor - at > line 1530 of Optimizer.cpp it does a dynamic_cast on and osg::Node* to > osg::LOD* and then at line 1563 it calls getChild(i) (even if > getNumChildren() == 0) on the dynamically casted LOD node. This works > fine when the node is an LOD node, but when it is a PagedLOD node then > it causes in invalid access to the _children vector. I attached a screen > shot to show what I mean. > > This situation would only ocurr when a PagedLOD node was a sibling of an > LOD node, which is probably why it hasn't been spotted before. > > Not sure if this is the accepted way to submit a fix, but anyway I made > a fix to the Optimizer code (version 2.4) and attached it to the email. > > Alex > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org