[osg-users] Perform actions when a child node is added
Bruno Oliveira
bruno.manata.oliveira at gmail.com
Mon Jun 26 05:18:33 PDT 2017
Robert,
a dangling pointer is a probable cause of my problems. Thanks for the hint,
I'll look into it.
I thought it could be related to me rewriting the node's InitialBound.
Thanks,
Bruno
2017-06-26 10:15 GMT+01:00 Robert Osfield <robert.osfield at gmail.com>:
> Hi Bruno,
>
> On 23 June 2017 at 23:45, Bruno Oliveira
> <bruno.manata.oliveira at gmail.com> wrote:
> > I actually tried it already, in my nodes derived doth from osg::Group*
> and
> > osg::PagedLOD*.
> > However, overloading the PagedLOD's functions made my scene crash the app
> > during the cull traversal (my overload was rewriting the node's center,
> > radius and InitialBound...)
>
> If you've got a crash it'll likely be because what you are doing
> somewhere is buggy, perhaps an assumption somewhere. Overriding
> addChild/insertChild() won't cause a crash if done properly.
>
> In the case of paged databases nodes are added and removed, the later
> can cause problems such as if your code just uses C pointers to these
> nodes assuming that they'll always be around.
>
> I can't say what might have caused the crash for you as I know nothing
> about the code you've written or what the crash is, or exactly what
> circumstances it happens in.
>
> You'll have a debugger, your have your code, your data, you're the
> person best placed to debug it.
>
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170626/23b47eca/attachment-0003.htm>
More information about the osg-users
mailing list