What version of OpenSG are you running?

-Allen


On Thu, Apr 30, 2009 at 8:12 AM, Marcus Lindblom <[email protected]> wrote:
> Hi,
>
> After re-loading a scene, we get a std::bad_alloc (with 3 gigs) from the
> following place (line 601 in OSGShaderProgram.cpp):
>
>          if(iStatus == 0)
>             {
>                 Char8 *szDebug;
>                 GLint  iDebugLength;
>
>                 osgGlGetShaderiv( uiShader,
>                                   GL_INFO_LOG_LENGTH,
>                                  &iDebugLength);
>
>                 szDebug = new Char8[iDebugLength];
>                                      ^^^^^^^^
>
> Looking at the values in a debugger, iDebugLength is stupidly large
> (1768036544) so I think the glgetshaderiv fails and never writes to this
> value. (Is it guaranteed to do that always?)
>
> Anyway, the allocation fails, so we can't really figure out what goes
> wrong. (We just load the same scene again..)
>
> The call stack is included below.
>
> I suppose I could patch OpenSG to set both szDebug and iDebugLength to
> zero, and see if it helps. (It's probably a good idea anyway. ;)
>
> I'll look into that after the weekend. Ideas in the meantime are welcome. :)
>
> Cheers
> /Marcus
>
>
>
>        kernel32.dll!_raiseexcept...@16()  + 0x58 bytes
>
>        msvcr90.dll!__cxxthrowexcept...@8()  + 0x48 bytes
>
>        msvcr90.dll!operator new()  + 0x64 bytes
>
>        OSGSystem.dll!OSG::ShaderProgram::handleGL(OSG::DrawEnv *
> pEnv=0x696218c0, unsigned int id=199580312, OSG::Window::GLObjectStatusE
> mode=0, unsigned int uiOptions=0)  Line 601     C++
>
>        OSGSystem.dll!boost::_bi::bind_t<unsigned
> int,boost::_mfi::mf4<unsigned int,OSG::ShaderProgram,OSG::DrawEnv
> *,unsigned int,enum OSG::Window::GLObjectStatusE,unsigned
> int>,boost::_bi::list5<boost::_bi::value<OSG::MTPtr<OSG::ShaderProgram>
>  >,boost::arg<1>,boost::arg<2>,boost::arg<3>,boost::arg<4> >
>  >::operator()<OSG::DrawEnv *,unsigned int,enum
> OSG::Window::GLObjectStatusE,unsigned int>(OSG::DrawEnv * &
> a1=0x04d13de8, unsigned int & a2=250, OSG::Window::GLObjectStatusE &
> a3=16242956, unsigned int & a4=)  Line 145 + 0x5b bytes C++
>
> OSGSystem.dll!boost::detail::function::function_obj_invoker4<boost::_bi::bind_t<unsigned
> int,boost::_mfi::mf4<unsigned int,OSG::ShaderProgram,OSG::DrawEnv
> *,unsigned int,enum OSG::Window::GLObjectStatusE,unsigned
> int>,boost::_bi::list5<boost::_bi::value<OSG::MTPtr<OSG::ShaderProgram>
>  >,boost::arg<1>,boost::arg<2>,boost::arg<3>,boost::arg<4> > >,unsigned
> int,OSG::DrawEnv *,unsigned int,enum
> OSG::Window::GLObjectStatusE,unsigned
> int>::invoke(boost::detail::function::function_buffer &
> function_obj_ptr={...}, OSG::DrawEnv * a0=0x04d13de8, unsigned int
> a1=250, OSG::Window::GLObjectStatusE a2=initialize, unsigned int a3=0)
> Line 132        C++
>
>        OSGSystem.dll!boost::function4<unsigned int,OSG::DrawEnv *,unsigned
> int,enum OSG::Window::GLObjectStatusE,unsigned
> int>::operator()(OSG::DrawEnv * a0=0x04d13de8, unsigned int a1=250,
> OSG::Window::GLObjectStatusE a2=initialize, unsigned int a3=0)  Line 989
> + 0x1d bytes    C++
>
>        OSGSystem.dll!OSG::Window::validateGLObject(unsigned int
> osgId=189771712, OSG::DrawEnv * pEnv=0x04d13de8, unsigned int
> uiOptions=0)  Line 687 + 0x16 bytes     C++
>
>        OSGSystem.dll!OSG::SimpleSHLChunk::changeFrom(OSG::DrawEnv *
> pEnv=0x04d13de8, OSG::StateChunk * pOther=0x00000022, unsigned int
> uiIdx=0)  Line 618 + 0x27 bytes C++
>
>        OSGSystem.dll!OSG::DrawEnv::changeTo(OSG::State * pState=0x00000000,
> OSG::StateOverride * pOverride=0x04cc95c0, OSG::State * pOld=0x04f16ae8,
> OSG::StateOverride * pOldOverride=0x04cc95c0)  Line 457 C++
>
>        OSGSystem.dll!OSG::TreeBuilderBase::drawNode(OSG::RenderTreeNode *
> pNode=0x0bb4e130, OSG::DrawEnv & denv={...}, OSG::RenderPartitionBase *
> part=0x04d13db0)  Line 154 + 0x2b bytes C++
>
>        OSGSystem.dll!OSG::TreeBuilderBase::drawNode(OSG::RenderTreeNode *
> pNode=0x0bb4e420, OSG::DrawEnv & denv={...}, OSG::RenderPartitionBase *
> part=0x04d13db0)  Line 166      C++
>
>        OSGSystem.dll!OSG::TreeBuilderBase::drawNode(OSG::RenderTreeNode *
> pNode=0x0bb4e680, OSG::DrawEnv & denv={...}, OSG::RenderPartitionBase *
> part=0x04d13db0)  Line 166      C++
>
>        OSGSystem.dll!OSG::TreeBuilderBase::drawNode(OSG::RenderTreeNode *
> pNode=0x0bb4e320, OSG::DrawEnv & denv={...}, OSG::RenderPartitionBase *
> part=0x04d13db0)  Line 166      C++
>
>        OSGSystem.dll!OSG::TreeBuilderBase::drawNode(OSG::RenderTreeNode *
> pNode=0x0bb4e228, OSG::DrawEnv & denv={...}, OSG::RenderPartitionBase *
> part=0x04d13db0)  Line 166      C++
>
>        OSGSystem.dll!OSG::TreeBuilderBase::draw(OSG::DrawEnv & denv={...},
> OSG::RenderPartitionBase * part=0x04d13db0)  Line 102   C++
>
>        OSGSystem.dll!OSG::RenderPartition::doExecution()  Line 460     C++
>
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to