I tested the code in trunk with OSG_USE_BOUND defined and I now get crashes 
when loading files. After some debugging it looks like expressions like these 
(see Geode::computeBound() and Group::computeBound()):

bb.expandBy((*itr)->getBound());

do not work anymore because the compiler can not know in advance which overload 
of expandBy to use for the function call. If the wrong overload is chosen a 
null pointer will be passed to the function resulting in a crash. After 
changing te lines to:

bb.expandBy((const osg::BoundingSphere&)((*itr)->getBound()));

it crashes later in the cull traversal in CullVisitor::apply(osg::Drawable& 
drawable) because the line

const BoundingBox &bb =drawable.getBound();

expects a BoundingBox while the Bound wrapper has a BoundingSphere.

I have not looked further if there are more places these crashes can occur but 
after a bit of thinking I must say that Farshid is right about the segfaults 
and just forcing people to rename their methods is a better solution. Basically 
if your test suite does not cover your whole code base you could accidentally 
skip one of these bugs and ship it to customers which would be bad.

Cheers,
Pjotr

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=59404#59404





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

Reply via email to