I'm having a problem with a program I am working on. I keep getting seemingly random "Unhandled Memory Exception Excpetion Error" crashes. Whenever they happen in a debug build, BLIde opens timer.bmx and highlights this line:
Here is the code I have that deals with timers:
The error does not happen during the execution of any of the above code; instead, it happens after the timer is created (presumably when it fires). I cannot find any common thread with the crashes. They happen at different times when the program is doing different things under a variety of different circumstances.
I noticed this line in the documentation for StopTimer:
Once stopped, a timer can no longer be used.
I did not think that applied to creating a new time using the same variable. Does it?
SpaceAce
Function _TimerFired( timer:TTimer ) --> timer.Fire End Function
Here is the code I have that deals with timers:
Field DrawTimer:TTimer, ProgressBarTimer:TTimer Method StartDrawTimer() DrawTimer = CreateTimer(120) End Method Method StopDrawTimer() If (DrawTimer) StopTimer(DrawTimer) End Method Method StartProgressBarTimer() ProgressBarTimer = CreateTimer(10) End Method Method StopProgressBarTimer() If (ProgressBarTimer) StopTimer(ProgressBarTimer) End Method
The error does not happen during the execution of any of the above code; instead, it happens after the timer is created (presumably when it fires). I cannot find any common thread with the crashes. They happen at different times when the program is doing different things under a variety of different circumstances.
I noticed this line in the documentation for StopTimer:
Once stopped, a timer can no longer be used.
I did not think that applied to creating a new time using the same variable. Does it?
SpaceAce