Terra assert at update

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Nickak2003
Goblin
Posts: 272
Joined: Thu Jun 10, 2004 4:19 am
x 26

Terra assert at update

Post by Nickak2003 »

When I call terra update with 0 epsilon, I get the following assert and am unsure why:

Code: Select all

HlmsDatablock::~HlmsDatablock()
    {
        assert( mLinkedRenderables.empty() &&
                "This Datablock is still being used by some Renderables."
                " Change their Datablocks before destroying this." );
I have a single directional light and if i change epsilon to >=1 i get no error, but cannot change the light direction either.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5505
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1372

Re: Terra assert at update

Post by dark_sylinc »

Can you post the callstack when this happens?
Nickak2003
Goblin
Posts: 272
Joined: Thu Jun 10, 2004 4:19 am
x 26

Re: Terra assert at update

Post by Nickak2003 »

OK, on closer examination, there is an Ogre::Exception being thrown and the earlier error was that I didn't shutdown terra or something correctly. However, I don't know what is causing this exception either:

Code: Select all

  
#if OGRE_DEBUG_MODE
        {
            uint32 currentFrame = mVaoManager->getFrameCount();
            if( mLastFrameMappedAndAdvanced == currentFrame )
            {
                OGRE_EXCEPT( Exception::ERR_INVALID_STATE,
                             "Mapping the buffer twice within the same frame detected! "
                             "This is not allowed.", "BufferPacked::map" );
            }
Here is the callstack:
https://pasteboard.co/J4i8wcw.jpg
Image
Nickak2003
Goblin
Posts: 272
Joined: Thu Jun 10, 2004 4:19 am
x 26

Re: Terra assert at update

Post by Nickak2003 »

OK, so the problem was that update can only be called in an "onBeforeRender" function, you cant call it x times without actually calling render.