[Bug] Nasty Traversal::traverseChildren crash

Falagard

29-06-2006 20:01:08

I'm getting a nasty crash in

void Traversal::traverseChildren(PagingLandScapeOctree& node)

Line 106 at
(*it)->traversal (*this);

This is called from ViewFrustumCullingDirect::onTree

I've been getting this for a long time now and was hoping someone would catch it but since no one has even mentioned I figured it was time.

I'm using normal view frustum occlusion (whatever is default in PLM) and using GOOF. I'm adding and removing scene nodes from the scene dynamically as the user moves around, based on distance. I originally thought perhaps the problem was because I was doing this in frameStarted so moved it out to frameEnded to check if that fixed it but it didn't. I'm also attaching and detaching entities all the time.

I'm trying to track down the problem to give you a better idea of what it actually is.

Clay

tuan kuranes

02-07-2006 10:50:53

Sorry cannot reproduce the bug, here on demo when moving, adding, removing scene nodes.

Btw, I do not see any of you commits on cvs, due to sourceforge filtering your mail adress... can you give another mail adress on sourceforge account (gmail is ok.)

Falagard

02-07-2006 16:59:09

I'm still trying to find a way to reproduce.

I had convinced myself it happens when I:

Load a terrain map then add some scene nodes and entities, change the terrain map but leave the scene nodes and entities, and move around and add and remove entities as you move around

But I'm still trying to find a particular way to reproduce that I can show you.

Seraph

03-07-2006 03:51:51

I also encounter this problem in my test app using both PLSM2 and Impostor code, this crash happens when I reload new map and object. it seems has some relationship with the order you destroy impostor system and plsm2 camera, after I placed the destroy of impostor system before the plsm2 camera, this problems seems solved. but I 'm not quite sure, may It also related to multithreading?

asmo

07-03-2007 21:04:57

Sorry to bump an old thread again, but I have this problem as well. It happens if I load a new terrain and start doing things rather fast (like painting for example). This may be due to remove/readd the decal, however.

kungfoomasta

07-03-2007 21:30:19

The behavior described by Falagard is exactly what I experienced when tieing in OgreOpcode with PLSM2!!

I tried debugging and couldn't find anything helpful, other than it looks like an Octree Node got deleted but a pointer to it remained somewhere. I can only repro this when using OgreOpcode, as the EntityShape objects tie into the entities and SceneNodes. The problem occurs when cleaning up my scene and loading terrain, however I couldn't find any obvious problems..

I noticed that TSM and PLSM2 both use the Octree Scene Manager as a base, but PLSM2 doesn't link to the same Octree code as TSM. What are the differences in the Octree portions of PLSM2? I ask because OgreOpcode works fine with TSM.. I can't afford to not use OgreOpcode in my game. :(

KungFooMasta

asmo

08-03-2007 00:03:06

I traced it down to the decal. If I do not delete the decal before I reload the terrain, the entity get's deleted but the pointer still exists in the node list.

edit: I'm quite sure that was the problem, delete decals before reloading the terrain.