Assertion failed while updating RenderTexture

MrCarbohydrate

29-01-2006 00:53:23

I'm currently trying to implement an inventory window in my RPG using PLSM2, with a render texture displaying only the character. So I have a RenderTargetListener that moves the character entity to a special render queue, and renders only that queue. It works but sometimes the update of the render texture crash in PLSM2 while I'm moving the main camera (not the render target one). It crashes with an assertion failed here (latest CVS for Ogre & PLSM2) :

VisibilityData *OcclusionElement::getNodeData(PagingLandScapeOctreeCamera *cam)
{
assert (nodeDataPerCam.find(cam->getId()) != nodeDataPerCam.end());
return nodeDataPerCam[cam->getId()];
}


Stack trace :
> Plugin_PagingLandScapeSceneManager2.dll!Ogre::OcclusionElement::getNodeData(Ogre::PagingLandScapeOctreeCamera * cam=0x1e46cb50) Line 41 + 0x50 C++
Plugin_PagingLandScapeSceneManager2.dll!Ogre::ViewFrustumCullingTraversalDirect::onTree(Ogre::PagingLandScapeOctree & node={...}) Line 127 + 0x12 C++
Plugin_PagingLandScapeSceneManager2.dll!Ogre::PagingLandScapeOctree::traversal(Ogre::Traversal & tr={...}) Line 152 + 0x10 C++
Plugin_PagingLandScapeSceneManager2.dll!Ogre::Traversal::traverseChildren(Ogre::PagingLandScapeOctree & node={...}) Line 115 + 0x11 C++
Plugin_PagingLandScapeSceneManager2.dll!Ogre::ViewFrustumCullingTraversalDirect::onTree(Ogre::PagingLandScapeOctree & node={...}) Line 132 + 0x11 C++
Plugin_PagingLandScapeSceneManager2.dll!Ogre::PagingLandScapeOctree::traversal(Ogre::Traversal & tr={...}) Line 152 + 0x10 C++
Plugin_PagingLandScapeSceneManager2.dll!Ogre::Traversal::traverseChildren(Ogre::PagingLandScapeOctree & node={...}) Line 121 + 0x11 C++
Plugin_PagingLandScapeSceneManager2.dll!Ogre::ViewFrustumCullingTraversalDirect::onTree(Ogre::PagingLandScapeOctree & node={...}) Line 132 + 0x11 C++
Plugin_PagingLandScapeSceneManager2.dll!Ogre::PagingLandScapeOctree::traversal(Ogre::Traversal & tr={...}) Line 152 + 0x10 C++
Plugin_PagingLandScapeSceneManager2.dll!Ogre::Traversal::traverseChildren(Ogre::PagingLandScapeOctree & node={...}) Line 106 + 0x11 C++
Plugin_PagingLandScapeSceneManager2.dll!Ogre::ViewFrustumCullingTraversalDirect::onTree(Ogre::PagingLandScapeOctree & node={...}) Line 132 + 0x11 C++
Plugin_PagingLandScapeSceneManager2.dll!Ogre::PagingLandScapeOctree::traversal(Ogre::Traversal & tr={...}) Line 152 + 0x10 C++
Plugin_PagingLandScapeSceneManager2.dll!Ogre::PagingLandScapeOctreeSceneManager::_findVisibleObjects(Ogre::Camera * cam=0x1e46cb50, bool onlyShadowCasters=false) Line 890 + 0x1d C++
OgreMain_d.dll!Ogre::SceneManager::_renderScene(Ogre::Camera * camera=0x1e46cb50, Ogre::Viewport * vp=0x1e69bc38, bool includeOverlays=false) Line 933 + 0x22 C++
OgreMain_d.dll!Ogre::Camera::_renderScene(Ogre::Viewport * vp=0x1e69bc38, bool includeOverlays=false) Line 366 + 0x2a C++
OgreMain_d.dll!Ogre::Viewport::update() Line 189 C++
OgreMain_d.dll!Ogre::RenderTarget::update() Line 107 C++
OgreMain_d.dll!Ogre::RenderSystem::_updateAllRenderTargets() Line 98 + 0x24 C++
OgreMain_d.dll!Ogre::Root::_updateAllRenderTargets() Line 918 + 0x18 C++
OgreMain_d.dll!Ogre::Root::renderOneFrame() Line 692 C++
FaithBase_d.dll!Faith::GraphicsEngine::updateImpl(unsigned long lastFrameTime=47) Line 157 + 0xe C++
FaithBase_d.dll!Faith::Engine::update(unsigned long lastFrameTime=47) Line 22 + 0x10 C++
FaithGame.exe!Faith::GameApplication::run() Line 57 + 0x1d C++
FaithGame.exe!WinMain(HINSTANCE__ * hInst=0x00400000, HINSTANCE__ * __formal=0x00000000, char * strCmdLine=0x00141f0b, HINSTANCE__ * __formal=0x00000000) Line 143 + 0x16 C++
FaithGame.exe!WinMainCRTStartup() Line 251 + 0x30 C
kernel32.dll!7c816d4f()
ntdll.dll!7c925b4f()
kernel32.dll!7c8399f3()


I've debugged enough to know that it crashes while rendering my inventory render texture, but after that I'm lost... Thanks in advance for any help!

tuan kuranes

29-01-2006 12:53:11

did you enable occlusion culling on that camera ?
(CHC)

MrCarbohydrate

29-01-2006 13:49:07

I've never set any PLSM2 specific option on the cameras. For culling, I just have HorizonVisibilityComputing=yes in the config file (but it still crash if I disable it).

tuan kuranes

29-01-2006 14:24:31

is _VISIBILITYDEBUG defined ?
If yes try to undefine it.
Should be in project option preprocessor if on win32.

MrCarbohydrate

29-01-2006 14:45:18

Thanks, I've recompiled PLSM2 with _VISIBILITYDEBUG off and now it works. :D