Hi Robert,
Unfortunately the fix didn't address the crash I am encountering. The issue of the dynamic cast in objectDeleted() (\openscenegraph\src\osgUtil\CullVisitor.cpp) failing remains... virtual void objectDeleted(void* object) { osg::Referenced* ref = reinterpret_cast<osg::Referenced*>(object); osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(ref); OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex); RenderStageMap::iterator itr = _renderStageMap.find(cv); if (itr!=_renderStageMap.end()) { _renderStageMap.erase(itr); } } I was going to define our object that inherits from the CullVisitor as an osg::ref_ptr. Perhaps doing so will delay the freeing of the CullVisitor object long enough within the CullVisitor destructor so that the problematic dynamic cast will succeed. I am open to any other suggestions as well. I may have to resort to just creating a small example program that reproduces the issue. Thanks, Rick -----Original Message----- From: Rick Irons Sent: Wednesday, May 25, 2016 5:56 AM To: OpenSceneGraph Users <osg-users@lists.openscenegraph.org> Subject: Re: [osg-users] CullVisitor object not getting properly deleted Hi Robert, Thanks for the update. I will try out the fix. Rick > On May 24, 2016, at 3:53 PM, Robert Osfield > <robert.osfi...@gmail.com<mailto:robert.osfi...@gmail.com>> wrote: > > Hi Rick, > > After a preplexing day looking at how the osgUtiil::CullVisitor, > osg::Camera and RenderStageCache were all interacting via the > osg::Observer system I finally fixed the problem with the crash that > I've see with the osgoit and osgprerender examples. As the crash > looks similar to what you saw there is reasonable chance that the > changes should work for you too. > > I have checked my fix into master and OpenSceneGraph-3.4. > > Robert. > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org<mailto:osg-users@lists.openscenegraph.org> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph. > org
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org