Re: [osg-users] Wait for Database pager to complete
I am using ref_ptrs on the rendering part. However, my backend is not. 2017-07-07 16:23 GMT+01:00 Robert Osfield: > HI Bruno, > > Make sure you are using ref_ptr<> in your ReadFileCallback for any > scene graph data structures so if you remove nodes from the main scene > graph they don't get deleted mid load. If you do this properly then > there should be no need to mess around with blocks that would > complicate the code. > > Robert. > > On 7 July 2017 at 14:46, Bruno Oliveira > wrote: > > Hello, > > > > i have a PagedLOD bases scene. > > > > At some point I remove a node, but OSG sometimes is reading a subnode and > > crashes at ReadFileCallback. > > > > I can solve this if there is some mechanism to wait for the current > callback > > to finish reading, like for instance a > > osgDB::DataBasePager::waitForCurrentThreadToFinish() function. > > > > Is there something like this? > > > > ___ > > osg-users mailing list > > osg-users@lists.openscenegraph.org > > http://lists.openscenegraph.org/listinfo.cgi/osg-users- > openscenegraph.org > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Wait for Database pager to complete
HI Bruno, Make sure you are using ref_ptr<> in your ReadFileCallback for any scene graph data structures so if you remove nodes from the main scene graph they don't get deleted mid load. If you do this properly then there should be no need to mess around with blocks that would complicate the code. Robert. On 7 July 2017 at 14:46, Bruno Oliveirawrote: > Hello, > > i have a PagedLOD bases scene. > > At some point I remove a node, but OSG sometimes is reading a subnode and > crashes at ReadFileCallback. > > I can solve this if there is some mechanism to wait for the current callback > to finish reading, like for instance a > osgDB::DataBasePager::waitForCurrentThreadToFinish() function. > > Is there something like this? > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Wait for Database pager to complete
Hello, i have a PagedLOD bases scene. At some point I remove a node, but OSG sometimes is reading a subnode and crashes at ReadFileCallback. I can solve this if there is some mechanism to wait for the current callback to finish reading, like for instance a osgDB::DataBasePager::waitForCurrentThreadToFinish() function. Is there something like this? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org