[2.0] assertion "!mCachedAabbOutOfDate" failed and not only

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
Corporal
Gnoblar
Posts: 22
Joined: Thu Aug 06, 2015 4:33 pm
Location: Russian Federation
x 1

[2.0] assertion "!mCachedAabbOutOfDate" failed and not only

Post by Corporal »

OgreMain\src\OgreMovableObject.cpp:309: Ogre::Aabb Ogre::MovableObject::getWorldAabb() const: assertion "!mCachedAabbOutOfDate" failed

I never call this method explicitly in code (Most likely it does CEGUI), but if I call Ogre::Light::getDerivedDirection() i got assertion too.
What's wrong?

I created viewport via compositor:

Code: Select all

Ogre::CompositorManager2* compos = mOgreRoot->getCompositorManager2();

LOG("Count viewports: %d", mRenderWnd->getNumViewports()); // Count viewports: 0 (Good..)

compos->createBasicWorkspaceDef("MainWorkspace", Ogre::ColourValue(.153f, .204f, .255f), Ogre::IdString());
compos->addWorkspace(mSceneMng, mRenderWnd, mMainCamera, "MainWorkspace", true);

LOG("Count viewports: %d", mRenderWnd->getNumViewports()); // Count viewports: 2 (lol what?)
If I don't create viewport CEGUI works!! and I get no errors (except Ogre::Light::getDerivedDirection())

code:

Code: Select all

Ogre::LogManager::getSingleton().logMessage("*** Create Direction Light ***");
Ogre::Light* sunLight = Application::getSingleton().getSceneMng().createLight();
sunLight->setType(Ogre::Light::LightTypes::LT_DIRECTIONAL);
sunLight->setDiffuseColour(0.35, 0.35, 0.38);
sunLight->setSpecularColour(0.9, 0.9, 1);

Ogre::SceneNode* sunLightNode = Application::getSingleton().getSceneMng().getRootSceneNode()->createChildSceneNode();
sunLightNode->attachObject(sunLight);
sunLightNode->setPosition(100.f, 700.f ,300.f);
Ogre::Vector3 dir = sunLightNode->getPosition();
dir.normalise();
sunLightNode->setDirection(dir);

Ogre::LogManager::getSingleton().logMessage("*** Direction Light Created ***");


mTerrainGlobals->setLightMapDirection(sunLight->getDerivedDirection()); // OgreMain\src\OgreNode.cpp:622: Ogre::Quaternion Ogre::Node::_getDerivedOrientation() const: assertion "!mCachedTransformOutOfDate" failed
mTerrainGlobals->setCompositeMapAmbient(Application::getSingleton().getSceneMng().getAmbientLight());
mTerrainGlobals->setCompositeMapDiffuse(sunLight->getDiffuseColour());
Of course in the release all assertions will be ignored, but errors should be fixed.
Any ideas?
User avatar
Corporal
Gnoblar
Posts: 22
Joined: Thu Aug 06, 2015 4:33 pm
Location: Russian Federation
x 1

Re: [2.0] assertion "!mCachedAabbOutOfDate" failed and not o

Post by Corporal »

Well, Ogre Porting Manual solved my problem!
Post Reply