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
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to