HI Arnaud, Unfortunately the original author of osgFX is no longer active in the OSG community so we are all in the same boat w.r.t reading the code and working out what it is/shouldn't be doing. osgFX itself is very old and not widely used so doesn't get the same sort of attention as other parts of the OSG that are more widely used, and as such for those users using it need to pitch in when they find problems. I consider osgFX deprecated as it's design longer suits many of the problems we need to address these days.
W.r.t stacktrace. Could you compile with debug so you can find out out which lines of code are being invoked in the chain and which one is crashing. As general scene graph optimization note, you have 10 nested Transform nodes in your scene graph. This is a hugely inefficient way to manage the scene graph as each transform requires the cull traversal to create new data on the heap and transform the view frustum into the new local coordinates. If you have just handful of objects that you want to manage this way then the performance hit could be tolerable, but for a big scene you'd end up CPU limited simply because of the over use of Transforms. The alternate is to create a custom Transform node that you do all the accumulation of the transforms you need into a single matrix. Robert. On 26 May 2014 14:38, Arnaud Cordier <arnaud.cord...@thecosmocompany.com> wrote: > Hello guys, > > I'll try to make things short. I am working with several viewers inside a > composite viewer (CullDrawThreadPerContext), which is embedded in a Qt > window. My frame() function in triggered by a QTimer event. > > My Scene Graph is mostly dynamic, thus I regularly add and remove nodes from > the scenegraph. I properly set the datavariance of the objects to be modified > and implemented a queue to add my new nodes to the scene graph before frame() > is called, same thing for the deleted nodes. > > My problem is quite annoying, because I get random crashes on node creation, > but they seem to always take place at the same point, which is the Scribe > rendering pass. It does not happen when the compositeviewer is set > singlethreaded. I already found a topic which basically tells people not to > use osgFX as nobody really knows if it's thread safe or not, but I would like > to know if I am missing something anywhere. > > Here is my stacktrace, if it can be useful in anyway : > > 0 osgFX::Technique::traverse_implementation(osg::NodeVisitor&, > osgFX::Effect*) /usr/lib/libosgFX.so.80 0x7fcf3820d9bf > 1 osgFX::Effect::traverse(osg::NodeVisitor&) > /usr/lib/libosgFX.so.80 0x7fcf38208392 > 2 osgUtil::CullVisitor::apply(osg::Group&) > /usr/lib/libosgUtil.so.80 0x7fcf38702c28 > 3 osgFX::Scribe::accept(osg::NodeVisitor&) > /usr/lib/libosgFX.so.80 0x7fcf3820be32 > 4 osg::Group::traverse(osg::NodeVisitor&) /usr/lib/libosg.so.80 > 0x7fcf394f1b23 > 5 osgUtil::CullVisitor::apply(osg::Transform&) > /usr/lib/libosgUtil.so.80 0x7fcf38702e0c > 6 osg::MatrixTransform::accept(osg::NodeVisitor&) /usr/lib/libosg.so.80 > 0x7fcf39544d35 > 7 osg::Group::traverse(osg::NodeVisitor&) /usr/lib/libosg.so.80 > 0x7fcf394f1b23 > 8 osgUtil::CullVisitor::apply(osg::Transform&) > /usr/lib/libosgUtil.so.80 0x7fcf38702e0c > 9 osg::PositionAttitudeTransform::accept(osg::NodeVisitor&) > /usr/lib/libosg.so.80 0x7fcf3955bfd5 > 10 osg::Group::traverse(osg::NodeVisitor&) /usr/lib/libosg.so.80 > 0x7fcf394f1b23 > 11 osgUtil::CullVisitor::apply(osg::Transform&) > /usr/lib/libosgUtil.so.80 0x7fcf38702e0c > 12 osg::PositionAttitudeTransform::accept(osg::NodeVisitor&) > /usr/lib/libosg.so.80 0x7fcf3955bfd5 > 13 osg::Group::traverse(osg::NodeVisitor&) /usr/lib/libosg.so.80 > 0x7fcf394f1b23 > 14 osgUtil::CullVisitor::apply(osg::Transform&) > /usr/lib/libosgUtil.so.80 0x7fcf38702e0c > 15 osg::PositionAttitudeTransform::accept(osg::NodeVisitor&) > /usr/lib/libosg.so.80 0x7fcf3955bfd5 > 16 osg::Group::traverse(osg::NodeVisitor&) /usr/lib/libosg.so.80 > 0x7fcf394f1b23 > 17 osgUtil::CullVisitor::apply(osg::Transform&) > /usr/lib/libosgUtil.so.80 0x7fcf38702e0c > 18 osg::PositionAttitudeTransform::accept(osg::NodeVisitor&) > /usr/lib/libosg.so.80 0x7fcf3955bfd5 > 19 osg::Group::traverse(osg::NodeVisitor&) /usr/lib/libosg.so.80 > 0x7fcf394f1b23 > 20 osgUtil::CullVisitor::apply(osg::Transform&) > /usr/lib/libosgUtil.so.80 0x7fcf38702e0c > 21 osg::PositionAttitudeTransform::accept(osg::NodeVisitor&) > /usr/lib/libosg.so.80 0x7fcf3955bfd5 > 22 osg::Group::traverse(osg::NodeVisitor&) /usr/lib/libosg.so.80 > 0x7fcf394f1b23 > 23 osgUtil::CullVisitor::apply(osg::Transform&) > /usr/lib/libosgUtil.so.80 0x7fcf38702e0c > 24 osg::PositionAttitudeTransform::accept(osg::NodeVisitor&) > /usr/lib/libosg.so.80 0x7fcf3955bfd5 > 25 osg::Group::traverse(osg::NodeVisitor&) /usr/lib/libosg.so.80 > 0x7fcf394f1b23 > 26 osgUtil::CullVisitor::apply(osg::Transform&) > /usr/lib/libosgUtil.so.80 0x7fcf38702e0c > 27 osg::PositionAttitudeTransform::accept(osg::NodeVisitor&) > /usr/lib/libosg.so.80 0x7fcf3955bfd5 > 28 osg::Group::traverse(osg::NodeVisitor&) /usr/lib/libosg.so.80 > 0x7fcf394f1b23 > 29 osgUtil::CullVisitor::apply(osg::Transform&) > /usr/lib/libosgUtil.so.80 0x7fcf38702e0c > 30 osg::PositionAttitudeTransform::accept(osg::NodeVisitor&) > /usr/lib/libosg.so.80 0x7fcf3955bfd5 > 31 osg::Group::traverse(osg::NodeVisitor&) /usr/lib/libosg.so.80 > 0x7fcf394f1b23 > 32 osgUtil::CullVisitor::apply(osg::Transform&) > /usr/lib/libosgUtil.so.80 0x7fcf38702e0c > 33 osg::PositionAttitudeTransform::accept(osg::NodeVisitor&) > /usr/lib/libosg.so.80 0x7fcf3955bfd5 > 34 osg::Group::traverse(osg::NodeVisitor&) /usr/lib/libosg.so.80 > 0x7fcf394f1b23 > 35 osgUtil::CullVisitor::apply(osg::Group&) > /usr/lib/libosgUtil.so.80 0x7fcf38702c28 > 36 osg::Group::accept(osg::NodeVisitor&) /usr/lib/libosg.so.80 > 0x7fcf394f3112 > 37 osg::Group::traverse(osg::NodeVisitor&) /usr/lib/libosg.so.80 > 0x7fcf394f1b23 > 38 osgUtil::SceneView::cullStage(osg::Matrixd const&, osg::Matrixd > const&, osgUtil::CullVisitor*, osgUtil::StateGraph*, osgUtil::RenderStage*, > osg::Viewport*) /usr/lib/libosgUtil.so.80 0x7fcf387a6a41 > 39 osgUtil::SceneView::cull() /usr/lib/libosgUtil.so.80 > 0x7fcf387a2ec8 > 40 osgViewer::Renderer::cull_draw() /usr/lib/libosgViewer.so.80 > 0x7fcf38e9f82f > 41 osg::GraphicsContext::runOperations() /usr/lib/libosg.so.80 > 0x7fcf394edc59 > 42 osg::OperationThread::run() /usr/lib/libosg.so.80 > 0x7fcf395549d0 > 43 osg::GraphicsThread::run() /usr/lib/libosg.so.80 > 0x7fcf394f09a8 > 44 OpenThreads::ThreadPrivateActions::StartThread(void*) > /usr/lib/libOpenThreads.so.14 0x7fcf38a305ab > 45 start_thread 311 0x7fcf35859f6e > 46 clone 113 0x7fcf35b699cd > > > Any thought is welcome ! > > Cheers, > > Arnaud > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=59564#59564 > > > > > > _______________________________________________ > 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