HI Vincent,

You only need to set the DataVariance to DYNAMIC on StateSet and
Drawables that change, you don't need to do this for Nodes as they
don't make it through into the rendering backend.  Do a search for
DrawThreadPerContext to background reading on this topic.

Robert.

On Tue, Jan 13, 2009 at 12:54 PM, Vincent Bourdier
<vincent.bourd...@gmail.com> wrote:
> Ok,
>
> It looks better.
> 1st test : I set the DYNAMIC on all geode and text who are moved or changed.
> No crash for the moment.
>
> 2d test : removed the Dynamic state on the only Static (unmoved) geometry
> (don't know what that state made here...) : no crash too.
>
> Conclusion : A dynamic state on a non-dynamic node can cause crash.
>
> Personally I'll keep the 2d solution.
>
> Thanks for this help, I would never have got it from myself.
>
> Regards,
>    Vincent.
>
> 2009/1/13 J.P. Delport <jpdelp...@csir.co.za>
>>
>> Hi,
>>
>> Vincent Bourdier wrote:
>>>
>>> If DYNAMIC is a state , I can assume that it is an inherited property.
>>>
>>> Assuming that can be good solution, I would be sufficient to set it on a
>>> root node, isn't it ? (I will not do that of course)
>>
>> Yes, if you set the whole scene to dynamic, you might as well run
>> singlethreaded.
>>
>>> Is it different to set it on a Geometry ? or on its Gode / Group / PAT
>>> parent ?
>>
>> I'm not sure, you'll have to check, I do not know what data you change.
>>
>> jp
>>
>>>
>>> I'll check is the good nodes are set to DYNAMIC or not.
>>> Thanks,
>>>
>>>  Vincent.
>>>
>>> 2009/1/13 J.P. Delport <jpdelp...@csir.co.za
>>> <mailto:jpdelp...@csir.co.za>>
>>>
>>>    Hi,
>>>
>>>    sorry, I should have been a bit clearer. If using multithreaded
>>>    modes you must make sure that the DataVariance on the objects you
>>>    are changing dynamically is set to DYNAMIC, something like:
>>>
>>>    stateset->setDataVariance(osg::Object::DYNAMIC);
>>>
>>>    Also have a search on the mailing list for "setDataVariance".
>>>
>>>    regards
>>>    jp
>>>
>>>    Vincent Bourdier wrote:
>>>
>>>        Hi J.P,
>>>
>>>        I have no crash in singleThreaded mode. It is a random crash so
>>>        I can not be 100% sure, but it seems to be the problem.
>>>        So, what can cause a crash with Dynamic settings ? I have some,
>>>        I'll check them, but I'm not sure of what to search...
>>>
>>>        Thanks,
>>>
>>>        Vincent.
>>>
>>>        2009/1/13 J.P. Delport <jpdelp...@csir.co.za
>>>        <mailto:jpdelp...@csir.co.za> <mailto:jpdelp...@csir.co.za
>>>        <mailto:jpdelp...@csir.co.za>>>
>>>
>>>
>>>           Hi,
>>>
>>>           can you make it crash in singlethreaded mode? If not, check all
>>>           settings of "dynamic" on text nodes.
>>>
>>>           jp
>>>
>>>           Vincent Bourdier wrote:
>>>
>>>               Hi,
>>>
>>>               I allow myself to Up this topic...
>>>
>>>               Thanks,
>>>
>>>               Regards,
>>>                 Vincent.
>>>
>>>               2009/1/12 Vincent Bourdier <vincent.bourd...@gmail.com
>>>        <mailto:vincent.bourd...@gmail.com>
>>>               <mailto:vincent.bourd...@gmail.com
>>>        <mailto:vincent.bourd...@gmail.com>>
>>>               <mailto:vincent.bourd...@gmail.com
>>>        <mailto:vincent.bourd...@gmail.com>
>>>               <mailto:vincent.bourd...@gmail.com
>>>        <mailto:vincent.bourd...@gmail.com>>>>
>>>
>>>
>>>                  I think there is a real bug in the rendering of OsgText.
>>>               (2.6.1 release)
>>>
>>>                  The bug does appear randomly... I get it with simple
>>>        text in
>>>               a Hud,
>>>                  updated each frame.
>>>
>>>                  The bug is there :
>>>
>>>
>>>                  /void Text::drawForegroundText(osg::State& state, const
>>>               GlyphQuads&
>>>                  glyphquad, const osg::Vec4& colorMultiplier) const
>>>                  {
>>>                      unsigned int contextID = state.getContextID();
>>>
>>>                      const GlyphQuads::Coords3& transformedCoords =
>>>                  glyphquad._transformedCoords[contextID];
>>>                      if (!transformedCoords.empty())
>>>                      {
>>>                          state.setVertexPointer( 3, GL_FLOAT, 0,
>>>                  &(transformedCoords.front()));
>>>                          state.setTexCoordPointer( 0, 2, GL_FLOAT, 0,
>>>                  &(glyphquad._texcoords.front()));  *//HERE :
>>>               glyphquad._texcoords is
>>>                  void, but seems initiated *
>>>
>>>
>>>            *
>>>                  //VS degogeur said content is [0]()*
>>>
>>>                          if(_colorGradientMode == SOLID)
>>>                          {
>>>                              state.disableColorPointer();
>>>
>>>  
>>> glColor4f(colorMultiplier.r()*_color.r(),colorMultiplier.g()*_color.g(),colorMultiplier.b()*_color.b(),colorMultiplier.a()*_color.a());
>>>                          }
>>>                          else
>>>                          {
>>>                              state.setColorPointer( 4, GL_FLOAT, 0,
>>>                  &(glyphquad._colorCoords.front()));
>>>                          }
>>>
>>>
>>>  glDrawArrays(GL_QUADS,0,transformedCoords.size());
>>>
>>>                      }
>>>                  }/
>>>
>>>
>>>
>>>
>>>                  Stack trace :
>>>
>>>                       msvcp80d.dll!std::_Debug_message(const wchar_t *
>>>                  message=0x01919bd0, const wchar_t * file=0x01918570,
>>>        unsigned int
>>>                  line=99)  Ligne 24    C++
>>>
>>>  
>>> osg48-osgTextd.dll!std::_Vector_const_iterator<osg::Vec2f,std::allocator<osg::Vec2f>
>>>                   >::operator*()  Ligne 99 + 0x14 octets    C++
>>>
>>>  osg48-osgTextd.dll!std::vector<osg::Vec2f,std::allocator<osg::Vec2f>
>>>                   >::front()  Ligne 772 + 0x24 octets    C++
>>>                   >
>>>  osg48-osgTextd.dll!osgText::Text::drawForegroundText(osg::State &
>>>                  state={...}, const osgText::Text::GlyphQuads &
>>>        glyphquad={...},
>>>                  const osg::Vec4f & colorMultiplier={...})  Ligne 1726
>>>        + 0xb
>>>                  octets    C++
>>>
>>>  osg48-osgTextd.dll!osgText::Text::renderOnlyForegroundText(osg::State
>>>                  & state={...}, const osg::Vec4f & colorMultiplier={...})
>>>                Ligne 1754
>>>                  + 0x14 octets    C++
>>>
>>> osg48-osgTextd.dll!osgText::Text::drawImplementation(osg::State
>>>                  & state={...}, const osg::Vec4f &
>>>        colorMultiplier={...})  Ligne
>>>                  1369    C++
>>>
>>>  osg48-osgTextd.dll!osgText::Text::drawImplementation(osg::RenderInfo
>>>                  & renderInfo={...})  Ligne 1253    C++
>>>                       osg48-osgd.dll!osg::Drawable::draw(osg::RenderInfo
>>> &
>>>                  renderInfo={...})  Ligne 895 + 0x13 octets    C++
>>>
>>> osg48-osgUtild.dll!osgUtil::RenderLeaf::render(osg::RenderInfo
>>>                  & renderInfo={...}, osgUtil::RenderLeaf *
>>>               previous=0x06f48618)    Ligne 60 + 0x19 octets    C++
>>>
>>>  osg48-osgUtild.dll!osgUtil::RenderBin::drawImplementation(osg::RenderInfo
>>>                  & renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x06f48618)    Ligne 419 + 0x19 octets    C++
>>>
>>> osg48-osgUtild.dll!osgUtil::RenderBin::draw(osg::RenderInfo &
>>>                  renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x06f48618)    Ligne 384 + 0x17 octets    C++
>>>
>>>  osg48-osgUtild.dll!osgUtil::RenderBin::drawImplementation(osg::RenderInfo
>>>                  & renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x06f48618)    Ligne 469 + 0x35 octets    C++
>>>
>>>  osg48-osgUtild.dll!osgUtil::RenderStage::drawImplementation(osg::RenderInfo
>>>                  & renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x06f48618)    Ligne 1235    C++
>>>
>>> osg48-osgUtild.dll!osgUtil::RenderBin::draw(osg::RenderInfo &
>>>                  renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x06f48618)    Ligne 384 + 0x17 octets    C++
>>>
>>>  osg48-osgUtild.dll!osgUtil::RenderStage::drawInner(osg::RenderInfo
>>>               &
>>>                  renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x06f48618, bool
>>>                  & doCopyTexture=false)  Ligne 832    C++
>>>
>>> osg48-osgUtild.dll!osgUtil::RenderStage::draw(osg::RenderInfo &
>>>                  renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x06f48618)    Ligne 1090 + 0x1b octets    C++
>>>
>>>  
>>> osg48-osgUtild.dll!osgUtil::RenderStage::drawPostRenderStages(osg::RenderInfo
>>>                  & renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x06f48618)    Ligne 1248 + 0x2c octets    C++
>>>
>>> osg48-osgUtild.dll!osgUtil::RenderStage::draw(osg::RenderInfo &
>>>                  renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x06f48618)    Ligne 1155 + 0x17 octets    C++
>>>                       osg48-osgUtild.dll!osgUtil::SceneView::draw()
>>>         Ligne 1509 +
>>>                  0x37 octets    C++
>>>                       osg48-osgViewerd.dll!osgViewer::Renderer::draw()
>>>         Ligne
>>>               413 +
>>>                  0xf octets    C++
>>>
>>>  osg48-osgViewerd.dll!osgViewer::Renderer::operator()(osg::GraphicsContext
>>>                  * context=0x021077e0)  Ligne 640 + 0xf octets    C++
>>>
>>> osg48-osgd.dll!osg::GraphicsContext::runOperations()
>>>                Ligne 688
>>>                  + 0x33 octets    C++
>>>
>>>  osg48-osgd.dll!osg::RunOperations::operator()(osg::GraphicsContext
>>>               *
>>>                  context=0x021077e0)  Ligne 135    C++
>>>
>>> osg48-osgd.dll!osg::GraphicsOperation::operator()(osg::Object *
>>>                  object=0x021077e0)  Ligne 50 + 0x19 octets    C++
>>>                       osg48-osgd.dll!osg::OperationThread::run()  Ligne
>>>        413 + 0x26
>>>                  octets    C++
>>>                       osg48-osgd.dll!osg::GraphicsThread::run()  Ligne
>>>        40    C++
>>>
>>>  ot11-OpenThreadsd.dll!OpenThreads::ThreadPrivateActions::StartThread(void
>>>                  * data=0x084edb7c)  Ligne 113 + 0xf octets    C++
>>>                       msvcr80d.dll!_callthreadstartex()  Ligne 348 + 0xf
>>>               octets    C
>>>                       msvcr80d.dll!_threadstartex(void * ptd=0x07007650)
>>>                Ligne 331    C
>>>                       kernel32.dll!7c80b683()             [Les frames
>>>               ci-dessous sont peut-être incorrects et/ou
>>>                  manquants, aucun symbole chargé pour kernel32.dll]
>>>                   ntdll.dll!7c92b686()                      I just tried it
>>> with osg SVN : nearly the same error
>>>
>>>                  in :
>>>
>>>                  /void Text::renderOnlyForegroundText(osg::State&
>>>        state, const
>>>                  osg::Vec4& colorMultiplier) const
>>>                  {
>>>                      for(TextureGlyphQuadMap::iterator
>>>               titr=_textureGlyphQuadMap.begin();
>>>                          titr!=_textureGlyphQuadMap.end();
>>>                          ++titr)
>>>                      {
>>>                          // need to set the texture here...
>>>
>>>  state.applyTextureAttribute(0,titr->first.get());
>>>
>>>                          const GlyphQuads& glyphquad = titr->second;
>>>         *//HERE :
>>>                  titr->second seems to be invalid (VS said more than
>>>        800 000 000
>>>                  _glyphs ...)*
>>>
>>>                          drawForegroundText(state, glyphquad,
>>>        colorMultiplier);
>>>                      }
>>>
>>>                  }/
>>>
>>>                  Stack trace
>>>
>>>                       msvcp80d.dll!std::_Debug_message(const wchar_t *
>>>                  message=0x01947d68, const wchar_t * file=0x01946a90,
>>>        unsigned int
>>>                  line=245)  Ligne 24    C++
>>>
>>>  
>>> osg54-osgTextd.dll!std::_Tree<std::_Tmap_traits<osg::ref_ptr<osgText::Font::GlyphTexture>,osgText::Text::GlyphQuads,std::less<osg::ref_ptr<osgText::Font::GlyphTexture>
>>>
>>> >,std::allocator<std::pair<osg::ref_ptr<osgText::Font::GlyphTexture>
>>>                  const ,osgText::Text::GlyphQuads> >,0>
>>>                   >::const_iterator::operator*()  Ligne 245 + 0x17
>>>        octets    C++
>>>
>>>  
>>> osg54-osgTextd.dll!std::_Tree<std::_Tmap_traits<osg::ref_ptr<osgText::Font::GlyphTexture>,osgText::Text::GlyphQuads,std::less<osg::ref_ptr<osgText::Font::GlyphTexture>
>>>
>>> >,std::allocator<std::pair<osg::ref_ptr<osgText::Font::GlyphTexture>
>>>                  const ,osgText::Text::GlyphQuads> >,0>
>>>                >::iterator::operator*()    Ligne 452    C++
>>>
>>>  
>>> osg54-osgTextd.dll!std::_Tree<std::_Tmap_traits<osg::ref_ptr<osgText::Font::GlyphTexture>,osgText::Text::GlyphQuads,std::less<osg::ref_ptr<osgText::Font::GlyphTexture>
>>>
>>> >,std::allocator<std::pair<osg::ref_ptr<osgText::Font::GlyphTexture>
>>>                  const ,osgText::Text::GlyphQuads> >,0>
>>>                >::iterator::operator->()    Ligne 457    C++
>>>                   >
>>>  osg54-osgTextd.dll!osgText::Text::renderOnlyForegroundText(osg::State
>>>                  & state={...}, const osg::Vec4f & colorMultiplier={...})
>>>                Ligne 1751
>>>                  + 0x8 octets    C++
>>>
>>> osg54-osgTextd.dll!osgText::Text::drawImplementation(osg::State
>>>                  & state={...}, const osg::Vec4f &
>>>        colorMultiplier={...})  Ligne
>>>                  1368    C++
>>>
>>>  osg54-osgTextd.dll!osgText::Text::drawImplementation(osg::RenderInfo
>>>                  & renderInfo={...})  Ligne 1252    C++
>>>                       osg54-osgd.dll!osg::Drawable::draw(osg::RenderInfo
>>> &
>>>                  renderInfo={...})  Ligne 898 + 0x13 octets    C++
>>>
>>> osg54-osgUtild.dll!osgUtil::RenderLeaf::render(osg::RenderInfo
>>>                  & renderInfo={...}, osgUtil::RenderLeaf *
>>>               previous=0x08835dc0)    Ligne 60 + 0x19 octets    C++
>>>
>>>  osg54-osgUtild.dll!osgUtil::RenderBin::drawImplementation(osg::RenderInfo
>>>                  & renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x08835dc0)    Ligne 419 + 0x19 octets    C++
>>>
>>> osg54-osgUtild.dll!osgUtil::RenderBin::draw(osg::RenderInfo &
>>>                  renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x08835dc0)    Ligne 384 + 0x17 octets    C++
>>>
>>>  osg54-osgUtild.dll!osgUtil::RenderBin::drawImplementation(osg::RenderInfo
>>>                  & renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x08835dc0)    Ligne 469 + 0x35 octets    C++
>>>
>>>  osg54-osgUtild.dll!osgUtil::RenderStage::drawImplementation(osg::RenderInfo
>>>                  & renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x08835dc0)    Ligne 1253    C++
>>>
>>> osg54-osgUtild.dll!osgUtil::RenderBin::draw(osg::RenderInfo &
>>>                  renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x08835dc0)    Ligne 384 + 0x17 octets    C++
>>>
>>>  osg54-osgUtild.dll!osgUtil::RenderStage::drawInner(osg::RenderInfo
>>>               &
>>>                  renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x08835dc0, bool
>>>                  & doCopyTexture=false)  Ligne 848    C++
>>>
>>> osg54-osgUtild.dll!osgUtil::RenderStage::draw(osg::RenderInfo &
>>>                  renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x08835dc0)    Ligne 1108 + 0x1b octets    C++
>>>
>>>  
>>> osg54-osgUtild.dll!osgUtil::RenderStage::drawPostRenderStages(osg::RenderInfo
>>>                  & renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x08835dc0)    Ligne 1266 + 0x2c octets    C++
>>>
>>> osg54-osgUtild.dll!osgUtil::RenderStage::draw(osg::RenderInfo &
>>>                  renderInfo={...}, osgUtil::RenderLeaf * &
>>>               previous=0x08835dc0)    Ligne 1173 + 0x17 octets    C++
>>>                       osg54-osgUtild.dll!osgUtil::SceneView::draw()
>>>         Ligne 1504 +
>>>                  0x37 octets    C++
>>>                       osg54-osgViewerd.dll!osgViewer::Renderer::draw()
>>>         Ligne
>>>               423 +
>>>                  0xf octets    C++
>>>
>>>  osg54-osgViewerd.dll!osgViewer::Renderer::operator()(osg::GraphicsContext
>>>                  * context=0x021387f0)  Ligne 650 + 0xf octets    C++
>>>
>>> osg54-osgd.dll!osg::GraphicsContext::runOperations()
>>>                Ligne 688
>>>                  + 0x33 octets    C++
>>>
>>>  osg54-osgd.dll!osg::RunOperations::operator()(osg::GraphicsContext
>>>               *
>>>                  context=0x021387f0)  Ligne 135    C++
>>>
>>> osg54-osgd.dll!osg::GraphicsOperation::operator()(osg::Object *
>>>                  object=0x021387f0)  Ligne 50 + 0x19 octets    C++
>>>                       osg54-osgd.dll!osg::OperationThread::run()  Ligne
>>>        413 + 0x26
>>>                  octets    C++
>>>                       osg54-osgd.dll!osg::GraphicsThread::run()  Ligne
>>>        40    C++
>>>
>>>  ot11-OpenThreadsd.dll!OpenThreads::ThreadPrivateActions::StartThread(void
>>>                  * data=0x08681fc4)  Ligne 113 + 0xf octets    C++
>>>                       msvcr80d.dll!_callthreadstartex()  Ligne 348 + 0xf
>>>               octets    C
>>>                       msvcr80d.dll!_threadstartex(void * ptd=0x0704e670)
>>>                Ligne 331    C
>>>                       kernel32.dll!7c80b683()             [Les frames
>>>               ci-dessous sont peut-être incorrects et/ou
>>>                  manquants, aucun symbole chargé pour kernel32.dll]
>>>                   ntdll.dll!7c92b686()                      Do you have any
>>> suggestion ? what can cause this problem ?
>>>                  Thanks a lot.
>>>
>>>                  Regards,
>>>                     Vincent.
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>               _______________________________________________
>>>               osg-users mailing list
>>>               osg-users@lists.openscenegraph.org
>>>        <mailto:osg-users@lists.openscenegraph.org>
>>>               <mailto:osg-users@lists.openscenegraph.org
>>>        <mailto:osg-users@lists.openscenegraph.org>>
>>>
>>>
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>>
>>>           --    This message is subject to the CSIR's copyright terms and
>>>           conditions, e-mail legal notice, and implemented Open Document
>>>           Format (ODF) standard. The full disclaimer details can be
>>>        found at
>>>           http://www.csir.co.za/disclaimer.html.
>>>
>>>           This message has been scanned for viruses and dangerous
>>>        content by
>>>           MailScanner, and is believed to be clean.  MailScanner thanks
>>>           Transtec Computers for their support.
>>>
>>>           _______________________________________________
>>>           osg-users mailing list
>>>           osg-users@lists.openscenegraph.org
>>>        <mailto:osg-users@lists.openscenegraph.org>
>>>           <mailto:osg-users@lists.openscenegraph.org
>>>        <mailto:osg-users@lists.openscenegraph.org>>
>>>
>>>
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>>
>>>
>>>
>>>  ------------------------------------------------------------------------
>>>
>>>        _______________________________________________
>>>        osg-users mailing list
>>>        osg-users@lists.openscenegraph.org
>>>        <mailto:osg-users@lists.openscenegraph.org>
>>>
>>>  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>>
>>>    --    This message is subject to the CSIR's copyright terms and
>>>    conditions, e-mail legal notice, and implemented Open Document
>>>    Format (ODF) standard. The full disclaimer details can be found at
>>>    http://www.csir.co.za/disclaimer.html.
>>>
>>>    This message has been scanned for viruses and dangerous content by
>>>    MailScanner, and is believed to be clean.  MailScanner thanks
>>>    Transtec Computers for their support.
>>>
>>>    _______________________________________________
>>>    osg-users mailing list
>>>    osg-users@lists.openscenegraph.org
>>>    <mailto: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
>>
>> --
>> This message is subject to the CSIR's copyright terms and conditions,
>> e-mail legal notice, and implemented Open Document Format (ODF) standard.
>> The full disclaimer details can be found at
>> http://www.csir.co.za/disclaimer.html.
>>
>> This message has been scanned for viruses and dangerous content by
>> MailScanner, and is believed to be clean.  MailScanner thanks Transtec
>> Computers for their support.
>>
>> _______________________________________________
>> 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

Reply via email to