CRASH: Compiling Scripts
by James Jacoby · in Torque Game Builder · 06/28/2005 (10:20 am) · 1 replies
I have been working on a game for some time now with no problems. Recently however, I've been experiencing quirky crashes whenever I change sertain script files. Here is the scenario:
Game is working perfectly, no errors/warnings in console.
Make a change to a script file (doesn't matter how insignificant)
Start the game and it immediatley crashes after the window appears
Restart the game and it is fine and there are no errors/warning in the console
This leads me to believe that something wacky is going on when the script is compiled because I doesn't crash unless it detects that the script needs to be recompiled.
Has anyone else experienced this?
Game is working perfectly, no errors/warnings in console.
Make a change to a script file (doesn't matter how insignificant)
Start the game and it immediatley crashes after the window appears
Restart the game and it is fine and there are no errors/warning in the console
This leads me to believe that something wacky is going on when the script is compiled because I doesn't crash unless it detects that the script needs to be recompiled.
Has anyone else experienced this?
About the author
Torque Owner James Jacoby
For some reason, whenever I add code to various scripts in my game, other code that doesn't even touch the code I just changed will cause the game to crash for no reason when it runs. For example, I changed some code in my score scripts that are only accessed when the game is running. Those scripts compile fine and there are no errors. However, with these changes in place, my main menu code crashes whenever you select a menu item. If I delete my scoring code, the menu works fine. The same is true with numerous other examples and it is preventing me from completing my project. Any help would be much appreciated. If any GG employees want to see my code, I'd be happy to share it for the sake of tracking down this bug.
UPDATE: The crash seems to be happening only at safeDelete() commands like these:
echo( "Resetting Menu" );
if( isObject( $menuText0 ) )
$menuText0.safeDelete();
if( isObject( $menuText1 ) )
$menuText1.safeDelete();
if( isObject( $menuText2 ) )
$menuText2.safeDelete();
if( isObject( $menuText3 ) )
$menuText3.safeDelete();
Thanks!