Game Development Community

Cant start mission (connection error)

by Christian Weber · in Torque Game Engine · 12/11/2003 (4:02 am) · 16 replies

Hi all!

I just added melee weapons, hitboxes aso. from Josh Albrechts tutorial. Everything worked just fine and it compiled without any errors. But now I cant start any missions anymore, I get the following error:

ShapeBaseData::preload: Invalid packet, bad datablockId(underwaterExplosion): 0x3
Connection error: ShapeBaseData::load: Couldn't load shape "äüÁ"Ê".

I already looked everywhere in the new files for missing shapes, but there are all that are needed.

Any help would be great, thanks.

greez
Chris

#1
12/11/2003 (4:40 am)
It looks like you have an invalid pointer; make sure that everything is getting initialized to zero in your ShapeBaseData constructor!
#2
12/11/2003 (4:47 am)
First, thanks for ur help. I think everythink is initialized with 0.

Here is my ShapeBase datablock (Thinks i added are marked "--New--"):

ShapeBaseData::ShapeBaseData()
{
shapeName = "";
mass = 1;
drag = 0;
density = 1;
maxEnergy = 0;
maxDamage = 1.0;
disabledLevel = 1.0;
destroyedLevel = 1.0;
repairRate = 0.0033;
eyeNode = -1;
shadowNode = -1;
cameraNode = -1;
damageSequence = -1;
hulkSequence = -1;
cameraMaxDist = 0;
cameraMinDist = 0.2;
cameraDefaultFov = 90.f;
cameraMinFov = 5.f;
cameraMaxFov = 120.f;
emap = false;
aiAvoidThis = false;
isInvincible = false;
renderWhenDestroyed = true;
debris = NULL;
debrisID = 0;
debrisShapeName = NULL;
explosion = NULL;
explosionID = 0;
underwaterExplosion = NULL;
underwaterExplosionID = 0;
firstPersonOnly = false;
useEyePoint = false;

observeThroughObject = false;
computeCRC = false;
--New--
numBoxes = 0;
--New--

for (U32 i = 0; i < MaxCollisionShapes; i++) {
collisionDetails[i] = -1;
LOSDetails[i] = -1;
}

// no shadows by default
genericShadowLevel = 2.0f;
noShadowLevel = 2.0f;

inheritEnergyFromMount = false;

for(U32 j = 0; j < NumHudRenderImages; j++)
{
hudImageNameFriendly[j] = 0;
hudImageNameEnemy[j] = 0;
hudRenderCenter[j] = false;
hudRenderModulated[j] = false;
hudRenderAlways[j] = false;
hudRenderDistance[j] = false;
hudRenderName[j] = false;
}

--New--
for(int i=0; i< Max_Hitboxes; i++)
{
HitMin[i].set(0,0,0);
HitMax[i].set(0,0,0);
NodeName[i] = NULL;
}

--New--
}
#3
12/11/2003 (6:52 am)
Maybe Im dumb or blind, I dont know but I dont find the mistake.
#4
12/11/2003 (9:15 am)
Yup, it is.

It would be the shapeName field that's getting borked, so you'll need to find what's modifying that field.
#5
12/11/2003 (9:53 am)
This is everything I have what has to do with "underwaterExplosion":

shapeBase.cc(87):   underwaterExplosion = NULL;

shapeBase.cc(88):   underwaterExplosionID = 0;

shapeBase.cc(153):      if( !underwaterExplosion && underwaterExplosionID != 0 )

shapeBase.cc(155):         if( Sim::findObject( underwaterExplosionID, underwaterExplosion ) == false)

shapeBase.cc(157):            Con::errorf( ConsoleLogEntry::General, "ShapeBaseData::preload: Invalid packet, bad datablockId(underwaterExplosion): 0x%x", underwaterExplosionID );

shapeBase.cc(159):         AssertFatal(!(underwaterExplosion && ((underwaterExplosionID < DataBlockObjectIdFirst) || (underwaterExplosionID > DataBlockObjectIdLast))),

shapeBase.cc(160):            "ShapeBaseData::preload: invalid underwaterExplosion data");

shapeBase.cc(288):   addField("underwaterExplosion", TypeExplosionDataPtr, Offset(underwaterExplosion, ShapeBaseData));

shapeBase.cc(488):   if( stream->writeFlag( underwaterExplosion != NULL ) )

shapeBase.cc(490):      stream->writeRangedU32( underwaterExplosion->getId(), DataBlockObjectIdFirst,  DataBlockObjectIdLast );

shapeBase.cc(593):      underwaterExplosionID = stream->readRangedU32( DataBlockObjectIdFirst, DataBlockObjectIdLast );

shapeBase.cc(1915):   if( pointInWater( (Point3F &)center ) && mDataBlock->underwaterExplosion )

shapeBase.cc(1918):      pExplosion->onNewDataBlock(mDataBlock->underwaterExplosion);

shapeBase.h(343):   ExplosionData*    underwaterExplosion;

shapeBase.h(344):   S32               underwaterExplosionID;

None of them changes the "underwaterExplosion" value. I have no idea.

Thanks for ur help,
Chris
#6
12/11/2003 (10:49 am)
I also looked for the problem with the shape object and its the exactly the same as it is with the "underwaterExplosion".
#7
12/11/2003 (1:53 pm)
Did you do a clean build?

Also, the error was... Connection error: ShapeBaseData::load: Couldn't load shape "äüÁ"Ê".

So it's probably a bug in your packet code.

Have you been working with net code at all? An error somewhere else in the code could cause this error message.
#8
12/12/2003 (2:50 am)
Yes i did a clean build and there were no errors or warnings. Didnt work with the net code yet, everything worked just fine before i added everything from the tutorial. Maybe i should look over the tutorial again. I hope I'll find something. I didnt work really much with the engine yet.

thanks for ur help

Chris
#9
12/12/2003 (9:51 am)
Ok i found the problem for the error messages, i had "mActionAnimation.animateOnServer = true" two times in the datablock. ;) But now the engine crashes when I want to add a weapon or to load a mission with a weapon in it. There is no error in the log. Any ideas would great.

Thanks!
Chris
#10
12/12/2003 (10:26 am)
Your debugger will help you most here. Where in the engine is it crashing? Check the call stack.
#11
12/12/2003 (10:32 am)
It seems like every item doesnt work anymore (health packs, backpacks, weapons, aso.) turrets, vehicles aso. are still working. I will try it with the debugger.
#12
12/16/2003 (5:12 am)
Still the same problem. have no idea.
#13
12/16/2003 (5:30 am)
If all else fails, try reverting to a previous copy that worked (if you have such a thing), and apply the changes which led up to the bug until it occurs again. This may indicate what you did wrong.

It could be something simple like corrupted memory (e.g you may be overwriting memory where you shouldn't), or you could have missed a packet read / write (e.g your sending 1 packet, but expecting to read 2)
#14
12/16/2003 (5:42 am)
Just something to check: it looks like you modified Josh's code to not hard-code in 10 hitboxes, so make sure you changed the definition in player.h too: mHitboxes[Max_Hitboxes];

Just something which tripped me up.
#15
12/16/2003 (6:06 am)
Mhm I have no defination in player.h... I also didnt find anything in the tutorial about it. Maybe I should check if there is a newer version.
#16
01/31/2006 (7:30 pm)
Not to revive an ancient thread but I'm getting EXACTLY the same error, after following my own instructions which DID work in 1.3 but no longer seem to work in 1.4

I'm going to do a diff on the 2 and see what I can figure out.