Game Development Community

Latest HEAD (05. Sep.2002) doesn't run in release build

by Stefan Beffy Moises · in Torque Game Engine · 09/05/2002 (2:29 pm) · 17 replies

Hey there,I've just downloaded the latest HEAD to check out Melv's editor improvments, but as soon as I try to start any mission, Torque crashes at the line
Loading compiled script fps/server/scripts/player.cs.
There is no specific error or anything, though...

The strange thing is, DEBUG build runs fine, so I'm kinda stuck to track down the problem.... :/
Can anyone check/confirm this plz?

#1
09/05/2002 (2:41 pm)
I'll check this right now for you Stefan.

Building ... Please Wait!

- Melv.
#2
09/05/2002 (2:42 pm)
I got an error where it crashed when i tried to load a map. it might be at the same spot. i didn't try the debug build though.
#3
09/05/2002 (2:44 pm)
Tyler: yes, I can't load any map in RELEASE build... crashes right after I hit "Start mission"...
Melv: thanks, man! :)
#4
09/05/2002 (2:47 pm)
I can't build this thing fast enough. :(

- Melv.
#5
09/05/2002 (2:48 pm)
Hehe, don't hurry, Melv... :)
#6
09/05/2002 (2:55 pm)
Guys,

I've not found the problem but you can get it working again by replacing two functions in "\Console\ConsoleObject.cc" with ...

// MM: Added group option.
void ConsoleObject::addGroup(const char* in_pGroupname)
{
	return;
   AbstractClassRep::Field f;
   f.pFieldname   = StringTable->insert(suppressSpaces(in_pGroupname));
   f.pGroupname   = StringTable->insert(in_pGroupname);
   f.type         = AbstractClassRep::StartGroupFieldType;
   f.groupExpand  = false;
   f.validator    = NULL;

   sg_tempFieldList.push_back(f);
}

// MM: Added group option.
void ConsoleObject::endGroup(const char*  in_pGroupname)
{
	return;
   AbstractClassRep::Field f;
   f.pFieldname   = StringTable->insert(suppressSpaces(in_pGroupname));
   f.pGroupname   = StringTable->insert(in_pGroupname);
   f.type         = AbstractClassRep::EndGroupFieldType;
   f.groupExpand  = false;
   f.validator    = NULL;

   sg_tempFieldList.push_back(f);
}


Note: I've added returns to remove the grouping completely. It's bound to be something minor. For the moment I'll disable it in the head.

- Melv.
#7
09/05/2002 (2:59 pm)
thanks
#8
09/05/2002 (3:01 pm)
Made this amendment to the [HEAD]. It's getting very late where I am so I won't be able to resolve this until tomorrow evening.

Sorry about this guys.

- Melv.
#9
09/05/2002 (3:04 pm)
Melv, thanks a lot! That got it running again...
And it's getting late over here, too... ;)
#10
09/05/2002 (3:12 pm)
This change hit such alot of files that I guess it was inevitable that a bug crept in.

It was tested to death in DEBUG which in theory should throw all the errors/asserts.

Hmmm.

- Melv.
#11
09/05/2002 (3:31 pm)
Alright,

I've actually found the bug and it was minor.

"Player.CC" (Line 520)

Change the addGroup/endGroup from "Splash" to "Water Splash".

Does that resolve your problems? If so, I'll reinstate it in the [HEAD].

- Melv.
#12
09/05/2002 (7:49 pm)
Melv, The files you sent me in my email (audioEmmiter.cc, missionArea.cc, and player.cc) worked and fixed my build. thanks
#13
09/05/2002 (9:33 pm)
Yeah Melv, those files fixed it! Thanks for your quick help!!
The editor improvements are lovely, btw.! Really helps for "complex" objects with lots of parameters... :)
#14
09/05/2002 (10:54 pm)
The problem was that a group was named the same as a field. I will put a check for that in my new addGroup/endGroup routines for that. I have still got no idea why it would work fine in DEBUG but not in RELEASE!

- Melv.
#15
09/06/2002 (4:24 am)
Melv,

Nice job! One small problem tho'. I initially ran this from the CVS and when it tried to merge waterblock.cc it messed up the merge and refused to compile. I checked and the problem was from the fluid changes code snippet module you created recently. In that module, you rearranged the order of the fields in the function initPersistFields(). It was impossible to sort them out into the appropriate groups after the merge so I deleted the file and downloaded from CVS again then made the changes adding in the extra fields in the miscellaneous column. The new version should merge without errors since the changes are in an order that the CVS can see and get along with.

Here's a copy of the revised function for those who have the problem. Actually, I liked your order better but this one won't have problems... and the water works fine and the new Lightwave-like buttons work great!

void WaterBlock::initPersistFields()
{
Parent::initPersistFields();

addGroup("Media"); // MM: Added Group Header.
addField( "surfaceTexture", TypeFilename, Offset( mSurfaceName, WaterBlock ) );
// addField( "envMapTexture", TypeFilename, Offset( mEnvMapName, WaterBlock ) );
addField( "ShoreTexture", TypeFilename, Offset( mShoreName, WaterBlock ) );
addField( "envMapOverTexture", TypeFilename, Offset( mEnvMapOverName, WaterBlock ) );
addField( "envMapUnderTexture", TypeFilename, Offset( mEnvMapUnderName, WaterBlock ) );
addField( "submergeTexture", TypeFilename, Offset( mSubmergeName, WaterBlock ), WC_NUM_SUBMERGE_TEX );
endGroup("Media"); // MM: Added Group Footer.

addGroup("Surface"); // MM: Added Group Header.
addField( "waveMagnitude", TypeF32, Offset( mWaveMagnitude, WaterBlock ) );
addField( "surfaceOpacity", TypeF32, Offset( mSurfaceOpacity, WaterBlock ) );
addField( "envMapIntensity", TypeF32, Offset( mEnvMapIntensity, WaterBlock ) );
endGroup("Surface"); // MM: Added Group Footer.

addGroup("Fluid"); // MM: Added Group Header.
addField( "liquidType", TypeEnum, Offset( mLiquidType, WaterBlock ), 1, &gLiquidTypeTable );
addField( "density", TypeF32, Offset( mDensity, WaterBlock ) );
addField( "viscosity", TypeF32, Offset( mViscosity, WaterBlock ) );
endGroup("Fluid"); // MM: Added Group Footer.

addGroup("Misc"); // MM: Added Group Header.
addField( "audioEnvironment", TypeAudioEnvironmentPtr, Offset( mAudioEnvironment, WaterBlock ) );
addField( "removeWetEdges", TypeBool, Offset( mRemoveWetEdges, WaterBlock ) );
//added these fields
addField( "UseDepthMask", TypeBool, Offset( mUseDepthMap, WaterBlock ) );
addField( "ShoreDepth", TypeF32, Offset( mShoreDepth, WaterBlock ) );
addField( "DepthGradient", TypeF32, Offset( mDepthGradient, WaterBlock ) );
addField( "MinAlpha", TypeF32, Offset( mMinAlpha, WaterBlock ) );
addField( "MaxAlpha", TypeF32, Offset( mMaxAlpha, WaterBlock ) );
addField( "TessSurface", TypeF32, Offset( mTessellationSurface, WaterBlock ) );
addField( "TessShore", TypeF32, Offset( mTessellationShore, WaterBlock ) );
addField( "SurfaceParallax", TypeF32, Offset( mSurfaceParallax, WaterBlock ) );
addField( "FlowAngle", TypeF32, Offset( mFlowAngle, WaterBlock ) );
addField( "FlowRate", TypeF32, Offset( mFlowRate, WaterBlock ) );
addField( "DistortGridScale", TypeF32, Offset( mDistortGridScale, WaterBlock ) );
addField( "DistortMag", TypeF32, Offset( mDistortMagnitude, WaterBlock ) );
addField( "DistortTime", TypeF32, Offset( mDistortTime, WaterBlock ) );
endGroup("Misc"); // MM: Added Group Footer.

}




Oh yes, I compiled with the change you suggested changing, "Splash" to "Water Splash" and I have no problem in Debug or Release. Congrats on your first entry to the CVS. Looking forward to many more!
#16
09/06/2002 (4:34 am)
Dave,

Yes, I've already modified all my fx resources to include groups. Unfortunately, until more people have got the updates then I can't really release them, short of having both versions but that's ugly!

Glad you like them mate. ;)

- Melv.
#17
09/06/2002 (11:10 am)
@Dave: If you require the new fxObjects with group fields added then I can send them to you later.

@Everyone: I have restored field grouping after sorting out a number of issues with mission load/saves.

Hopefully this is now stable but if you do encounter a problem then I would suggest that you send an email asap to melv.may@btinternet.com so that I can sort it out straight away.

- Melv.