[osg-users] Deleting still referenced object

Richard Harrison rjh at zaretto.com
Wed Jan 16 23:13:21 PST 2019


On 15/01/2019 09:03, Robert Osfield wrote:

>> illustrated it well) and I'm currently flying one of my long test routes.
> Fingers and toes crossed.

..and alas after 30h I've got a similar looking problem; the pattern is 
the same i.e. DatabasePager loading something whilst ObjectCache is 
expiring.

This time it's a segfault in the DatabasePager during a copy of a model 
that has just been loaded (simgear, SGReaderWriterXML.cxx:342)

         options->setDatabasePath(texturepath.local8BitStr());
         osgDB::ReaderWriter::ReadResult modelResult;
         modelResult = osgDB::readRefNodeFile(modelpath.local8BitStr(), 
options.get());
         if (!modelResult.validNode())
             throw sg_io_exception("Failed to load 3D model:" + 
modelResult.message(),
                                   modelpath);
 >       model = copyModel(modelResult.getNode());

The object currently being expired in the ObjectCache doesn't seem to 
bear any relation to the model being loaded; one is a windsock and the 
other a radio tower.

This is after I changed all of the osg::getSomething into 
osg::getRefSomething.

I'm now a little confused as I was sure that the fix would work; I've 
kept the debug session open in case there is anything that I need to 
inspect.




More information about the osg-users mailing list