Hello everyone.

In my application I create several views and several cameras. Upon user 
interaction each camera can be added or removed from a view using 
View::addSlave() and View::removeSlave().
My code ensures that each camera is only assigned to only one view at a time. A 
camera can't be assigned to another view before being removed from the view it 
currently is.
When I do that I often get a crash in the Camera::setRenderer() method that is 
called by addSlave().

The crash happen into GraphicsOperation destructor. When a camera is added to a 
view with addSlave() a new renderer is created for it. If the camera already 
has a renderer that renderer is automatically deleted by the reference counting 
pointer. That's when the crash happen. It looks like the renderer (or maybe one 
of its members) is deleted twice.

I'm not using multithreading. I don't change camera assignation during 
rendering with callbacks. Camera assignation is all done outside of the 
CompositeViewer::frame() method.

Do you have any idea what might be causing this crash ?

Regards,
Nicolas

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64003#64003





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to