Hi Ulrich,

Nothing special should be required when removing a PageLOD database
from the scene graph.  One should just need to take the usual care
about threading.   The fact that you are getting a crash in osgTerrain
does suggest that the DatabasePager thread is trying to do something
on a scene graph that it doesn't have a reference to, but what code
this might be I just can't say without at least a stack trace.

Robert.

On Tue, Jun 2, 2009 at 11:29 AM, Ulrich Hertlein <[email protected]> wrote:
> Hi all,
>
> are there any special steps involved to unload a PagedLOD database?
> What I want to do is release the main memory and OpenGL resources associated
> with a PagedLOD.
>
> My setup is roughtly the following:
> - osgViewer::Viewer in single-threaded mode
> - rendering is triggered on-demand by calling 'viewer->frame()'
> - osg::Group* sceneNode and osg::Node* modelNode (both as osg::ref_ptr)
> - to release the model I call sceneNode->removeChild(modelNode) and then set
>  modelNode = 0 to invalidate the ref_ptr
> - after that the frame draw is not triggered anymore.
>
> This works *most* of the times but I sporadicly get a crash in
> osgTerrain::traverse which appears like there is some thread still running
> on the database.
>
> Cheers,
> /ulrich
> _______________________________________________
> 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