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.
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.
#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?
Torque Owner Neil Marshall
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:
Default TGE Demo: