Game Development Community

Random crash on animation export

by Michael LaRue · in Torque Game Engine · 05/23/2003 (9:38 am) · 1 replies

This is a memory corruption occuring in ShapeMimic.cc @ lines 506-509. The GetKey() function is overflowing the variable.

#1
05/23/2003 (10:35 am)
Below is copied from here.

Hi Michael. You've encountered some work around code. I remember not being able to determine the type of keyframe so I had to make an assumption. You'll notice the dummy buffer added in a vain attempt to cover for a different sized keyframe. I believe you can fix that problem by using the keyframe type that it's expecting in the code -- a linear float keyframe. That may also fix the crash you are seeing in the game, not really sure.

BTW, an ideal fix for the bug you point out would be to have some way to query the max sdk for keyframe type and then grab the appropriate type. That wasn't possible at the time; not sure about now. Since leaving Dynamix I no longer have a copy of max so I'm no longer working on the exporter. Some developer who does have max might look into this issue. Also notice that line 4260 makes a similar attempt to deal with the sdk limitation.