Hi Nick, I was just reviewing your the code you copied in your earlier message (below) and spotted that the observer_ptr<> was access a local mutex not the GlobalObserverMutex() as it should have been. I've just fixed observer_ptr<> and am currently rebuilding. Could you try the attached include/osg/observer_ptr<>.
I do testing at my end if everything goes smoothly will check the change in. I really don't know if it would fix the problem you are seeing, fingers crossed. Robert. On Fri, Feb 19, 2010 at 10:11 AM, Trajce (Nick) Nikolov <[email protected]> wrote: > Hi Robert, > I am getting a crash when cleaning up dynamic viewer > osg::ref_ptr<osgViewer::CompositeViewer> viewer; > ...... > viewer = 0; > > osg63-osgViewerd.dll!osg::observer_ptr<osgViewer::ViewerBase>::objectDeleted(void > * obj=0x019c0ce4) Line 115 + 0x6 bytes C++ > osg63-osgd.dll!osg::ObserverSet::signalObjectDeleted(void * > ptr=0x019c0ce4) Line 68 + 0x20 bytes C++ > osg63-osgd.dll!osg::Referenced::signalObserversAndDelete(bool > signalUnreferened=true, bool signalDelete=true, bool doDelete=true) Line > 311 C++ > osg63-osgd.dll!osg::Referenced::unref() Line 196 C++ > > KtIGLibOSGD.dll!osg::ref_ptr<osgViewer::CompositeViewer>::operator=(osgViewer::CompositeViewer > * ptr=0x00000000) Line 57 C++ >> KtIGLibOSGD.dll!KtIGLibOSG::destroy() Line 72 C++ > > down to > virtual void objectDeleted(void* obj) > { > T* ref_obj = static_cast<T*>(obj); > OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex); > HERE->>> if (ref_obj->referenceCount() == 0) _ptr = 0; > } > -Nick > > > On Fri, Feb 19, 2010 at 11:36 AM, Robert Osfield <[email protected]> > wrote: >> >> Hi All, >> >> To give you all a chance to thrash the OSG svn/trunk to an inch of >> it's life I'm headline for a few hours (to do my weekly long run). >> I'll be back at lunchtime, and if all looks well I'll go for making >> 2.7.9 this afternoon (UK time). >> >> Thanks for all the testing, >> Robert. >> _______________________________________________ >> 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 > >
observer_ptr
Description: Binary data
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

