Hi Rui, I haven't looked at the relevant code yet, but a DatabaseRequest with a NULL _loadedModel sounds odd, I wouldn't have thought such a request would make it into the merge list. Just checking the _loadedModel.valid() will be sufficient as long as the DatabaseRequest isn't being concurrently accessed at the time.
Robert. On 23 March 2012 02:34, Wang Rui <[email protected]> wrote: > Hi Robert and all, > > I've encountered a crash problem while managing and rendering huge scene in > OSG. To make it work smoothly, I use both the IncrementalCompileOperation > and SharedStateSetManager to help improve the paging process. Both my > application soon crashes when the camera is moving over the scene quickly > (which means the scene data is also quickly and frequently loaded and > unloaded). I debug into it and surprisingly find that the > databaseRequest->_loadedModel is sometimes empty in > the DatabasePager::addLoadedDataToSceneGraph() and thus causes the issue. I > add a determination before using the SharedStateManager to optimize the > model and the problem seems disappeared: > > if (osgDB::Registry::instance()->getSharedStateManager() > && databaseRequest->_loadedModel.valid()) > > osgDB::Registry::instance()->getSharedStateManager()->share(databaseRequest->_loadedModel.get()); > > I suggest make such changes in the trunk, too, so we won't meet the same > crash problem again. But it in fact doesn't find the truth: when and how a > request in the _dataToMergeList list is changed and the loaded model pointer > is made invalid? I'm just curious about the reason why the _loadedModel is > reset unexpectedly. Is there any other possibilities? > > Regards, > > Wang Rui > > > _______________________________________________ > 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

