Hi Alberto, Thanks for the minimal crashing program. The crash wasn't straight forward to pinpoint the cause but eventually I traced it back to the the ObjectCache taking a ref_ptr<Options> when search for entries in the ObjectCache. To avoid this I wrote a ObjectCache::find(..) method that doesn't create a temporary ref_ptr<> to the Options being passed in. This fix is checked in the OpenSceneGaprh-3.6 branch and master.
https://github.com/openscenegraph/OpenSceneGraph/commit/fcde92ad89af44a9724a5ebf9fbfdf59b6e41d68 As a general comment use of C++11's auto is something you should be careful about using, easy to hide the face that you just have C pointers and associated memory leaks. Robert. On 10 May 2018 at 21:20, Alberto Luaces <[email protected]> wrote: > Hi, I think this issue was commented somewhere else, but I couldn't find > it again: there is something broken with the cloning of osgDB::Options. > This minimal working example works fine with 3.4.x, but SIGSEVs with > 3.6.1-rc3 and current master: > > #include <osgDB/ReadFile> > > int main(){ > auto globalopts = new osgDB::Options; > globalopts->setObjectCacheHint(osgDB::Options::CACHE_NODES); > > // any.obj is not needed to get the crash. > auto *node = osgDB::readNodeFile("any.obj", globalopts); > } > > -- > Alberto > > _______________________________________________ > 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

