Hi,

I allow myself to Up this topic...

Thanks,

Regards,
   Vincent.

2009/1/12 Vincent Bourdier <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
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to