Hi Alex, This certainly looks like a bug, do you have a model that I could use to recreate the problem so I can investigate. I have done a quick review of your changes, enough to know that the changes are a bit more complex that I at first expected, which might suggest the particular crash point isn't the only bug in this visitor and that you are also addressing a wider problem. Until I actually understand the issue being addressed and how the changes resolve it I'll hang back from merging changes, having a test file will really help in moving this along.
Cheers, Robert. On Fri, Jun 6, 2008 at 2:15 PM, Pecoraro, Alexander N <[EMAIL PROTECTED]> wrote: > > 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 > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

