Hi Robert, one more question. since in a particular case of my application a ref_ptr<> keeps alive the view removed with compositeviewer->removeView(view), I get a crash in that case.
I'm building against osg-3.1.4 but I also tries with 3.2.0. And the crash happens in both cases even if in different parts of code. With 3.2.0 here is the call stack: osg100-osgd.dll!osg::GraphicsContext::runOperations() Line 780 + 0x26 bytes C++ osg100-osgQtd.dll!osgQt::GraphicsWindowQt::runOperations() Line 698 + 0xb bytes C++ osg100-osgd.dll!osg::RunOperations::operator()(osg::GraphicsContext * context) Line 137 + 0xf bytes C++ osg100-osgd.dll!osg::GraphicsOperation::operator()(osg::Object * object) Line 53 + 0x19 bytes C++ osg100-osgd.dll!osg::OperationThread::run() Line 426 + 0x26 bytes C++ osg100-osgd.dll!osg::GraphicsThread::run() Line 41 C++ ot13-OpenThreadsd.dll!OpenThreads::ThreadPrivateActions::StartThread(void * data) Line 113 + 0xf bytes C++ and the code is the following: Code: void GraphicsContext::runOperations() { // sort the cameras into order typedef std::vector<Camera*> CameraVector; CameraVector camerasCopy; std::copy(_cameras.begin(), _cameras.end(), std::back_inserter(camerasCopy)); std::sort(camerasCopy.begin(), camerasCopy.end(), CameraRenderOrderSortOp()); for(CameraVector::iterator itr = camerasCopy.begin(); itr != camerasCopy.end(); ++itr) { osg::Camera* camera = *itr; if (camera->getRenderer()) (*(camera->getRenderer()))(this); With osg-3.1.4 the crash happens in CompositeViewer::eventTraversal() method instead, where it seems after the call: osgViewer::View* masterView = getViewWithFocus() ? getViewWithFocus() : _views[0].get(); masterView is NULL. For my understanding there is something related to threads of graphic context but I didn't understand what should I do to prevent the crash. Thanks in advance for your help Gianni ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=57558#57558 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org