PLSM2 and OgreOpcode issue

kungfoomasta

26-02-2007 06:14:41

When deleted my Entity Collision Shape objects (from OgreOpcode library), PLSM2 crashes loading terrain. I have been debugging this for hours on end, pretty much all of today, and I cannot figure this out.

The crash occurs on the following line:

void PagingLandScapeOctreeSceneManager::_updatePagingLandScapeOctreeNode(PagingLandScapeOctreeNode * onode)
{
const AxisAlignedBox box = onode->_getWorldAABB(); <---CRASH

if (box.isNull())
return ;

// Skip if octree has been destroyed (shutdown conditions)
if (!mPagingLandScapeOctree)
return;


onode is not NULL, however it appears to be some garbage value.

At first, I thought that OgreOpcode might be doing something with the nodes, as this seems to be some octree node problem. After a few hours, I can't find any error on OgreOpcodes side. Also note that everything worked with OgreOpcode and TSM.

:?: Does anybody know what this function is trying to do?

:?: How can these nodes become corrupted? Maybe the node was deleted, but the pointer still refers to it?

:?: Has anybody successfully integrated OgreOpcode with Eihort and PLSM2, and been able to create and delete entity shape collision objects, and reload terrain?

Thinking on this some more, it looks like some node got deleted, but a pointer to it remains. Hope somebody can shed some light on this..

Thanks,

KungFooMasta

tuan kuranes

28-02-2007 14:56:39

if it only crash when you delete an Entity Collision Shape objects, then there something wrong in that (double delete process or using the deleted Entity Collision Shape objects).

You need to debug your code (assert, setting deleted pointer to Null, etc...) or use a memory manager debugger.