[osg-users] crash in frame(); in the multithreading

Wu Xiaodong wuxiaodong82 at gmail.com
Fri Jul 18 03:10:09 PDT 2008


In my case, I added some new child-node to a group-node, then it crashed
some times;

Could the bug be fixed if i call
osg::Group::setDataVariance<file:///E:/Oil/OpenSceneGraphReferenceDocs/a01315.html#a11>(
)?


                       thanks.


2008/7/18 Robert Osfield <robert.osfield at gmail.com>:

> Hi Xiadong,
>
> If you are updating StateSet/StateAttribute or Drawables/Geometry in
> your update then you should mark their DataVariance to DYNAMIC so that
> the draw traversal knows not to release the current frame till they
> are all done.
>
> Robert.
>
> 2008/7/18 Wu Xiaodong <wuxiaodong82 at gmail.com>:
> >
> > Hi.
> >
> >           I begin a new thread for osg::Viewer()::frame();
> >
> >           I create a simple scene , then call osg::Viewer::frame() ; it
> all
> > works well;
> >
> >           while I add some chilld-nodes to a group node, then it crashed
> in
> > frame();
> >
> >          Is the error generated because of the multi-thread or something;
> > what should I do when insert some new children to scene to avoid this
> kind
> > of crash?
> >
> >                Thanks;
> >
> >  xiaodong.
> >
> >
> >
> > //the calling stack is as following
> >>
> >>
> osg33-osgd.dll!std::_Vector_const_iterator<osg::ref_ptr<osg::Node>,std::allocator<osg::ref_ptr<osg::Node>
> >> > >::operator++()  Line 117 + 0x33 bytes    C++
> >
> >
> osg33-osgd.dll!std::_Vector_iterator<osg::ref_ptr<osg::Node>,std::allocator<osg::ref_ptr<osg::Node>
> >> >::operator++()  Line 337    C++
> >      osg33-osgd.dll!osg::Group::traverse(osg::NodeVisitor & nv={...})
>  Line
> > 60 + 0x8 bytes    C++
> >      osg33-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node={...})
>  Line
> > 181 + 0x1c bytes    C++
> >
> >
> osg33-osgUtild.dll!osgUtil::UpdateVisitor::handle_callbacks_and_traverse(osg::Node
> > & node={...})  Line 84 + 0x25 bytes    C++
> >      osg33-osgUtild.dll!osgUtil::UpdateVisitor::apply(osg::Group &
> > node={...})  Line 54 + 0x1a bytes    C++
> >      osg33-osgd.dll!osg::Group::accept(osg::NodeVisitor & nv={...})  Line
> 38
> > + 0x41 bytes    C++
> >      osg33-osgd.dll!osg::Group::traverse(osg::NodeVisitor & nv={...})
>  Line
> > 62 + 0x25 bytes    C++
> >      osg33-osgd.dll!osg::NodeVisitor::traverse(osg::Node & node={...})
>  Line
> > 181 + 0x1c bytes    C++
> >
> >
> osg33-osgUtild.dll!osgUtil::UpdateVisitor::handle_callbacks_and_traverse(osg::Node
> > & node={...})  Line 84 + 0x25 bytes    C++
> >      osg33-osgUtild.dll!osgUtil::UpdateVisitor::apply(osg::Group &
> > node={...})  Line 54 + 0x1a bytes    C++
> >      osg33-osgd.dll!osg::Group::accept(osg::NodeVisitor & nv={...})  Line
> 38
> > + 0x41 bytes    C++
> >      osg33-osgViewerd.dll!osgViewer::Viewer::updateTraversal()  Line 837
> +
> > 0x32 bytes    C++
> >      osg33-osgViewerd.dll!osgViewer::ViewerBase::frame(double
> > simulationTime=1.7976931348623157e+308)  Line 582 + 0xf bytes    C++
> >
> > --
> > Xiaodong Wu
> > 吴晓东
> > "'Xiao' means the time and the view when the sun rises and 'dong' means
> the
> > east in Chinese"
> >
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Xiaodong Wu
吴晓东
"'Xiao' means the time and the view when the sun rises and 'dong' means the
east in Chinese"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080718/ac00bbf6/attachment-0003.htm>


More information about the osg-users mailing list