Not sure what is happening here
by Michael Cozzolino · in Torque Game Engine · 02/04/2005 (8:46 am) · 2 replies
I'm working on getting the mission to cycle when the timer goes down to zero. That works and everything is fine. I'm using the Lighting pack that is integrated with TGE 1.3
<> I have narrowed this down to the "SG - Test (Endian)" Mission that comes with the TGELP. Still don't know why. I'm guessing something isn't getting removed with mission cleanup.
<>
Commenting this out in the mission file stops the crash.
new SimGroup(LightGroup) {
// new sgUniversalStaticLight(RedLight) {
// position = "-69.0678 130.423 232.213";
// rotation = "1 0 0 0";
// scale = "1 1 1";
// dataBlock = "sgRedLightDataBlock";
// Enable = "1";
// IconSize = "1";
// ParticleColorAttenuation = "1";
// };
// new sgUniversalStaticLight(BlueLight) {
// position = "-40.0469 130.57 232.174";
// rotation = "1 0 0 0";
// scale = "1 1 1";
// dataBlock = "sgBlueLightDataBlock";
// Enable = "1";
// IconSize = "1";
// ParticleColorAttenuation = "1";
// };
};
SimObject::Notify* SimObject::removeNotify(void *ptr, SimObject::Notify::Type type)
{
Notify **list = &mNotifyList;
while(*list)
{
if((*list)->ptr == ptr && (*list)->type == type) // Dies here.
{
SimObject::Notify *ret = *list;
*list = ret->next;
return ret;
}
list = &((*list)->next);
}
return NULL;
}
<
<
Commenting this out in the mission file stops the crash.
new SimGroup(LightGroup) {
// new sgUniversalStaticLight(RedLight) {
// position = "-69.0678 130.423 232.213";
// rotation = "1 0 0 0";
// scale = "1 1 1";
// dataBlock = "sgRedLightDataBlock";
// Enable = "1";
// IconSize = "1";
// ParticleColorAttenuation = "1";
// };
// new sgUniversalStaticLight(BlueLight) {
// position = "-40.0469 130.57 232.174";
// rotation = "1 0 0 0";
// scale = "1 1 1";
// dataBlock = "sgBlueLightDataBlock";
// Enable = "1";
// IconSize = "1";
// ParticleColorAttenuation = "1";
// };
};
SimObject::Notify* SimObject::removeNotify(void *ptr, SimObject::Notify::Type type)
{
Notify **list = &mNotifyList;
while(*list)
{
if((*list)->ptr == ptr && (*list)->type == type) // Dies here.
{
SimObject::Notify *ret = *list;
*list = ret->next;
return ret;
}
list = &((*list)->next);
}
return NULL;
}
About the author
Indie Developer in the Albany NY area. iOS, PC, Mac OSX development. http://itunes.apple.com/us/artist/michael-cozzolino/id367780489
#2
I found and fixed the problem I'm continuing this in your Lighting Pack thread.
-John
02/05/2005 (5:39 pm)
Hi Michael,I found and fixed the problem I'm continuing this in your Lighting Pack thread.
-John
Torque Owner John Kabus (BobTheCBuilder)
Hmmm... that's not good. :) I'll take a look at it, sounds like it'll be fairly easy to track down. Thanks for providing a test case that definitely makes things easier to find.
-John