Hi Pjotr,

Thanks for the testing.  I think the problems you've seen are down to
me not completing the getBound() implementation in Drawable - the
Drawable::getBound() should return a Bound with both the
BoundingSphere and BoundingBox set.  I have now done this
implementation and am about to check it in once I've done a clean
build and some more testing.

Robert.

On 14 May 2014 14:52, Pjotr Svetachov <[email protected]> wrote:
> 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
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to