Game Development Community

Bin problems with release build

by Neil Marshall · in Torque Game Engine · 04/21/2006 (8:23 am) · 3 replies

I'm having some problems with the release build of my project. It works fine in debug mode.

TGE keeps asserting on these 2 lines in interiorCollision.cc

AssertFatal(endX <= NumCoordBins, "Error, bad endX");
AssertFatal(endY <= NumCoordBins, "Error, bad endY");

In debug mode endX and endY are always less then 16 (The value of NumCoordBins). In the release build the console is telling me endY is 17 for some reason. Does anyone know what I've messed up in the initalization process that would cause endX and endY to be too large?

I'm pretty sure it's the initalization process because thats all that I've changed in the TGE Plugin and it runs fine in the standalone EXE code. It's probably in main.cc or winWindow.cc but I don't know enough about the interiorCollision to know.

#1
04/21/2006 (12:30 pm)
This is really weird. In the default Torque demo I added this line:

Con::printf("(%d - %d) / %d = %d", queryMaxY, mBoundingBox.min.y, yBinSize, endY);

The output is what is confusing me...

(0 - 1075970048) / 0 = -1074790400

Thats a divide by 0 there and as far as I can tell yBinSize is always 0. Does anyone else see a divide by 0 in their version of TGE?


It gets weirder too the code that crashes:
(0 - 1075970048) / 0 = -1074790400

They're both exactly the same. Grr.

Crash Version:
*** Initial Control Object
Activating DirectInput...
keyboard0 input device acquired.
Could not locate texture: starter.fps/data/shapes/player/crossbow
Could not locate texture: starter.fps/data/shapes/player/clip
Mapping string: Kork to index: 13
queryMaxX = 0   mBoundingBox.min.x = 1075199443   xBinSize = 0
queryMaxY = 0   mBoundingBox.min.y = 1075970048   yBinSize = 0
(0 - 1075970048) / 0 = -1074790400
endX = 15   NumCoordBins = 16
endY = 17   NumCoordBins = 16
Fatal: (\Projects\tge14\TGE14Plugin\engine\interior\interiorCollision.cc @ 1233) Error, bad endY
Kill Focus
keyboard0 input device unacquired.
Error, a DecalManager (30eaa00) isn't properly out of the bins!
Error, a TSStatic (1009f6f0) isn't properly out of the bins!
Error, a TSStatic (1009f980) isn't properly out of the bins!
Error, a TSStatic (1009f980) isn't properly out of the bins!
Error, a TSStatic (1009f980) isn't properly out of the bins!

Default TGE Demo:
*** Initial Control Object
Activating DirectInput...
keyboard0 input device acquired.
Could not locate texture: starter.fps/data/shapes/player/crossbow
Could not locate texture: starter.fps/data/shapes/player/clip
Mapping string: Kork to index: 13
queryMaxX = -2147483648   mBoundingBox.min.x = 1075432968   xBinSize = 0
queryMaxY = 0   mBoundingBox.min.y = 1075970048   yBinSize = 0
(0 - 1075970048) / 0 = -1074790400
endX = 16   NumCoordBins = 16
endY = 17   NumCoordBins = 16
queryMaxX = -2147483648   mBoundingBox.min.x = 1075477392   xBinSize = 0
queryMaxY = 0   mBoundingBox.min.y = 1075970048   yBinSize = 0
(0 - 1075970048) / 0 = -1074790400
endX = 16   NumCoordBins = 16
endY = 17   NumCoordBins = 16
queryMaxX = -2147483648   mBoundingBox.min.x = 1075490876   xBinSize = 0
queryMaxY = 0   mBoundingBox.min.y = 1075970048   yBinSize = 0
(0 - 1075970048) / 0 = -1074790400
endX = 16   NumCoordBins = 16
endY = 17   NumCoordBins = 16
queryMaxX = -2147483648   mBoundingBox.min.x = 1075500984   xBinSize = 0
queryMaxY = 0   mBoundingBox.min.y = 1075970048   yBinSize = 0
(0 - 1075970048) / 0 = -1074790400
endX = 16   NumCoordBins = 16
endY = 17   NumCoordBins = 16
#2
04/21/2006 (3:55 pm)
I've run into this in the past if the DIF exporter is adding lightmap borders and the engine code doesn't support them.
#3
04/22/2006 (7:43 pm)
What should I do in the code in this case then? I'm working with the default Torque Demo. should I just comment out those asserts and it won't affect anything or is there some sort of check I could put in place?