exception Function: Node::getChild

rschlend

05-12-2006 13:17:48

Hey--

I'm having a little trouble here tracking down a bug. Everything starts fine but about 18 seconds in every time I get the following exception:

First-chance exception at 0x7c81eb33 in testogre.exe: Microsoft C++ exception: Ogre::Exception @ 0x0012e210.

Here is the relevent portion of the Ogre.log:


-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: Node::getChild
Description: Child node named page0-0-tile6-4 does not exist..
File: d:\ogredev\dagon\ogremain\src\ogrenode.cpp
Line: 716
Stack unwinding: <<beginning of stack>>



It is always the same page. The log shown above that leads me to believe it's a plsm2 related problem.

Here is the cfg file:



GroupName=PLSM2

LandScapeFileName=MountAiry
FileSystem=LandScapeFileName

Width=1
Height=1
PageSize=513
Data2DFormat=HeightField

ScaleX = 1024
ScaleY = 119
ScaleZ = 1024

TileSize = 65
NumTextureFormatSupported=15

TextureFormatSupported0=Base
TextureFormatSupported1=Base2
TextureFormatSupported2=InstantBase
TextureFormatSupported3=Splatting
TextureFormatSupported4=Splatting2
TextureFormatSupported5=Splatting4
TextureFormatSupported6=Splatting6
TextureFormatSupported7=Splatting7
TextureFormatSupported8=InstantBase
TextureFormatSupported9=Splatting3
TextureFormatSupported10=Splatting5
TextureFormatSupported11=SplattingShader
TextureFormatSupported12=ImagePaging

#ver1
TextureFormat=ImagePaging
ImageFilename=MountAiry_NoGuides
TextureExtension=png

TextureStretchFactor=1.0
VertexNormals=no

Deformable=no

NumMatHeightSplat=4
MaterialHeight0=0
MaterialHeight1=500
MaterialHeight2=1000
MaterialHeight3=2000

SplatFilename0=splatting_grass.png
SplatFilename1=splatting_grass.png
SplatFilename2=splatting_grass.png
SplatFilename3=splatting_grass.png

VisibleRenderables=256
MaxRenderLevel=5


And just in case, here is the gen.cfg:


GroupName=PLSM2

LandScapeFileName=MountAiry512v2
LandScapeExtension=raw
RawWidth=513
RawHeight=513
PageSize=513
Data2DFormat=HeightField

TextureStretchFactor=1.0

OutDirectory=LandScapeFileName

ScaleX = 1024
ScaleY = 119
ScaleZ = 1024

TileSize = 65
HeightMap=yes

BaseMap=yes
AlphaMaps=yes

LightMap=yes
Sunx=0.0f
Suny=0.88f
Sunz=0.47f
Ambient=0.5f
Diffuse=0.5f
Blur=0.0f

ColorMapName =MountAiry_NoGuides.png
ColorMapSplit=yes

Deformable=no
NumMatHeightSplat=4
MaterialHeight0=0
MaterialHeight1=500
MaterialHeight2=1000
MaterialHeight3=2000

SplatFilename0=splatting_grass.png
SplatFilename1=splatting_grass.png
SplatFilename2=splatting_grass.png
SplatFilename3=splatting_grass.png


A few other hints that may be related:

I'm using PLSM2 with Newton and have recently added in CEGUI.
The version of PLSM2 I have is from around the August time frame.

Any suggestions on what I can do to further track this down, or if someone knows what the problem is, I would greatly appreciate the help.

Also if there is anything else I can post that will help determine the problem, please let me know.

rschlend

tuan kuranes

06-12-2006 14:13:38

Can you try with CVS version ?

rschlend

06-12-2006 23:25:49

Hi--

Thanks for reading through my post and responding Tuan. I was able to track down the problem a little further and have an acceptable solution.

In case anyone else is up against something similar here is what I think was going on:

Psuedo code:


mSceneMgr = mRoot->createSceneManager("PagingLandScapeSceneManager", "PagingLandScapeDemo" );

//code//
while(!finished)
{
if(userPressedStart)
{
.....
physMgr = new PhysicsManager(mWorld);
terrainMgr = new PLSM2Manager(mSceneMgr);
loadMeshes();
}
//render the next frame
mRoot->renderOneFrame();
}


So normally the program would start up and then later the user would press a start button which would call the PLSM2Manager, which would then
set up the callback:

loadTileDelegate=new PagingLandscapeDelegate();
loadTileDelegate->bind(this,&PLSM2Manager::tileLoaded);
m_SceneManager->setOption("addLoadTileListener",loadTileDelegate);


I think doing this after the scene manager starts rendering causes problems. There might be some other silly mistake I'm making, but this acceptably resolves the problem for me.

I just changed it to:

physMgr = new PhysicsManager(mWorld);
terrainMgr = new PLSM2Manager(mSceneMgr);
//code//

while(1)
{
if(userPressedStart)
{
loadMeshes();
}
//render the next frame
mRoot->renderOneFrame();
}


Thanks for making plsm2 Tuan.

rschlend