Hi Nick, Did you use the second of observer_ptr header that I posted? As I believe this addresses the issue you've got - my build failed here with my first cut, I fixed it and posted the new observer_ptr header. Since then my build has completed without problems.
Robert. On Fri, Feb 19, 2010 at 3:24 PM, Trajce (Nick) Nikolov <nikolov.tra...@gmail.com> wrote: > got this Error while building > >>SceneView.cpp > 4>D:\OpenSceneGraph\include\osg/observer_ptr(54) : error C2664: > 'OpenThreads::ScopedLock<M>::ScopedLock(const OpenThreads::ScopedLock<M> &)' > : cannot convert parameter 1 from 'OpenThreads::Mutex *' to 'const > OpenThreads::ScopedLock<M> &' > 4> with > 4> [ > 4> M=OpenThreads::Mutex > 4> ] > 4> Reason: cannot convert from 'OpenThreads::Mutex *' to 'const > OpenThreads::ScopedLock<M>' > 4> with > 4> [ > 4> M=OpenThreads::Mutex > 4> ] > 4> No constructor could take the source type, or constructor overload > resolution was ambiguous > 4> D:\OpenSceneGraph\include\osg/observer_ptr(51) : while compiling > class template member function 'osg::observer_ptr<T> > &osg::observer_ptr<T>::operator =(const osg::observer_ptr<T> &)' > 4> with > 4> [ > 4> T=osg::Camera > 4> ] > 4> D:\OpenSceneGraph\include\osgUtil/SceneView(523) : see reference > to class template instantiation 'osg::observer_ptr<T>' being compiled > 4> with > 4> [ > 4> T=osg::Camera > 4> ] > -Nick > > > On Fri, Feb 19, 2010 at 5:19 PM, Trajce (Nick) Nikolov > <nikolov.tra...@gmail.com> wrote: >> >> rebuilding ... >> -Nick >> >> >> On Fri, Feb 19, 2010 at 5:16 PM, Robert Osfield <robert.osfi...@gmail.com> >> wrote: >>> >>> 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 >>> <nikolov.tra...@gmail.com> 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 >>> > <robert.osfi...@gmail.com> >>> > 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 >>> >> 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 >>> > >>> > >>> >>> _______________________________________________ >>> osg-users mailing list >>> 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 > > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org