Hi Robert, I had a crash in my application because i use osgDB::readFilexxxx from another thread than Viewer. In fact there is a short window if the cache is cleared while another thread reference the data. osgDB::Registry::instance()->updateTimeStampOfObjectsInCacheWithExternalReferences(*getFrameStamp()); osgDB::Registry::instance()->removeExpiredObjectsInCache(*getFrameStamp());
Here the revision and the diff code on the link. [svn r10520] Moved the updating and expiry of the Registry object cache from DatabasePager into osgViewer::Viewer/CompositeViewer http://hg.plopbyte.net/osg-trunk/diff/85a3231b7b00/src/osgViewer/Viewer.cpp It's possible i had the problem before this commit, but i would just want to put it on the mailing list if other people have similar problem. For explanation this how i use it: for each player (10) I fetch the url http://a.com/node.osg -> the first time it will be downloaded then for other i will use the value in the cache registry (throw the readNodeFile). I clone the data in cache because i have to setup specific stuff by player so i can't modify the original data fetched in cache, i want to keep the data in cache clean. The reference count is 1 except when i get the pointer and clone it, so the osgDB::Registry::instance()->updateTimeStampOfObjectsInCacheWithExternalReferences(*getFrameStamp()); does not update the timestamp and finally will delete the value in cache. I changed the expiry time to a very big value, but i would prefer to have a consistent fix. I guess i should keep the pointer on a kind of registry in my application. Cheers, Cedric - +33 659 598 614 Cedric Pinson mailto:[email protected] http://www.plopbyte.net
signature.asc
Description: This is a digitally signed message part
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

