1.5.1 Move struct crash
by Ian Omroth Hardingham · in Torque Game Engine · 05/30/2007 (3:41 am) · 1 replies
Hey guys.
I've taken stock TGE 1.5 and added a VectorF to the Move struct, like this:
When running in Debug mode I now get a memory error (stack at the end of the post).
I presume there's some constant somewhere I need to change - can anyone enlighten me on how to add to the move struct without causing this problem?
Thanks,
Ian
I've taken stock TGE 1.5 and added a VectorF to the Move struct, like this:
struct Move
{
// packed storage rep, set in clamp
S32 px, py, pz;
U32 pyaw, ppitch, proll;
F32 x, y, z; // float -1 to 1
F32 yaw, pitch, roll; // 0-2PI
U32 id; // sync'd between server & client - debugging tool.
U32 sendCount;
bool freeLook;
bool trigger[MaxTriggerKeys];
//// only new line *********
VectorF thrust;
/////// *******
void pack(BitStream *stream);
void unpack(BitStream *stream);
void clamp();
void unclamp();
};When running in Debug mode I now get a memory error (stack at the end of the post).
I presume there's some constant somewhere I need to change - can anyone enlighten me on how to add to the move struct without causing this problem?
Thanks,
Ian
torqueDemo_DEBUG.exe!Memory::treeRemove(Memory::FreeHeader * hdr=0x03f6f200) Line 487 + 0x9 bytes C++ torqueDemo_DEBUG.exe!Memory::alloc(unsigned int size=2048, bool array=false, const char * fileName=0x00d73250, const unsigned int line=56) Line 974 + 0x9 bytes C++ torqueDemo_DEBUG.exe!dMalloc_r(unsigned int in_size=2048, const char * fileName=0x00d73250, const unsigned int line=56) Line 1272 + 0x13 bytes C++ torqueDemo_DEBUG.exe!VectorResize(unsigned int * aSize=0x03ebefac, unsigned int * aCount=0x03ebefa8, void * * arrayPtr=0x03ebefb0, unsigned int newCount=30, unsigned int elemSize=64) Line 56 + 0x3a bytes C++ torqueDemo_DEBUG.exe!Vector<Move>::resize(unsigned int ecount=30) Line 468 + 0x1d bytes C++ torqueDemo_DEBUG.exe!Vector<Move>::increment(unsigned int delta=30) Line 256 C++ torqueDemo_DEBUG.exe!GameConnection::moveReadPacket(BitStream * bstream=0x00e62c84) Line 380 C++ torqueDemo_DEBUG.exe!GameConnection::readPacket(BitStream * bstream=0x00e62c84) Line 846 C++ torqueDemo_DEBUG.exe!NetConnection::handlePacket(BitStream * bstream=0x00e62c84) Line 525 + 0x13 bytes C++
About the author
Designer and lead programmer on Frozen Synapse, Frozen Endzone, and Determinance. Co-owner of Mode 7 Games.
Associate Ian Omroth Hardingham
Mode 7 Games