Hey all,
I was just compiling a new build of a small test game and I got the following illegal exception:
---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x00442D88 ; program pointer is +72, ACI version 3.00.1000, gtags (2,37)
AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and notify CJ on the Tech forum.
Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.
An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK
---------------------------
This error only appeared to begin after I added a second timer in (the same error occurred in an earlier much simpler build after I added the second timer as well) so I feel this may be the issue.
I thought perhaps if I posted the bits of code that seem relevant it could help you spot this problem so:
function repeatedly_execute()
{
if(IsTimerExpired(1) == 1){
if (GetGlobalInt(1) == 0){
cShip.ChangeRoom(1, 0, 0);
cShip.Walk(160, 110, eNoBlock, eAnywhere);
SetTimer(2, 45);
SetGlobalInt(1, Random(3));
SetGlobalInt(3, 1);
}
else if (GetGlobalInt(1) == 1){
cShip.ChangeRoom(1, 0, 200);
cShip.Walk(160, 110, eNoBlock, eAnywhere);
SetTimer(2, 45);
SetGlobalInt(1, Random(3));
SetGlobalInt(3, 1);
}
else if (GetGlobalInt(1) == 2){
cShip.ChangeRoom(1, 320, 200);
cShip.Walk(160, 110, eNoBlock, eAnywhere);
SetTimer(2, 45);
SetGlobalInt(1, Random(3));
SetGlobalInt(3, 1);
}
else if (GetGlobalInt(1) == 3){
cShip.ChangeRoom(1, 320, 0);
cShip.Walk(160, 110, eNoBlock, eAnywhere);
SetTimer(2, 45);
SetGlobalInt(1, Random(3));
SetGlobalInt(3, 1);
}
}
else if(IsTimerExpired(2) ==1 && GetGlobalInt(3) == 1){
if(GetGlobalInt(2) == 0){
cShip.Animate(4, 1, eOnce, eNoBlock);
cHealth.LockViewFrame(3, 0, 1);
SetGlobalInt(2, 1);
SetTimer(2, 45);
}
else if(GetGlobalInt(2) == 1){
cShip.Animate(4, 1, eOnce, eNoBlock);
cHealth.LockViewFrame(3, 0, 2);
SetGlobalInt(2, 2);
SetTimer(2, 45);
}
else if(GetGlobalInt(2) == 2){
cShip.Animate(4, 1, eOnce, eNoBlock);
cHealth.LockViewFrame(3, 0, 3);
SetGlobalInt(2, 3);
SetTimer(2, 45);
}
else if(GetGlobalInt(2) == 3){
cShip.Animate(4, 1, eOnce, eNoBlock);
Wait(20);
QuitGame(0);
SetTimer(2, 45);
}
}
}
function cShip_Interact()
{
cShip.ChangeRoom(0);
SetTimer(1, 100);
SetGlobalInt(3, 0);
SetTimer(2, 0);
}
If I have done something silly here and not noticed it, please point it out for me. If necessary, I will be happy to post the relevant .DMP file and/or the game source code for further investigation.
Thanks for your time :)
Would you be able to try upgrading the game to 3.0.2 SP1, and see if the problem persists? A lot of bugs have been fixed since 3.0.
If you still get the error, please could you upload the DMP file for me to investigate. Thanks.
This has fixed the problem.
I honestly thought it was something I had done, rather than a bug in the engine. Thanks :D