Here's what I've been able to figure out so far:
BlitzMax seems to be trying to fire a trigger that has already been stopped. Apparently, sometimes when I call the StopTimer() function, the timer fires again, anyway. Since it seems so random, I am guessing the error occurs when the timer is Stop()ped but the timer.fire is already in progress or queued up to go. Maybe the timer is being Stop()ped between the instruction to fire the timer and the actual event emission...? Just speculation.
My workaround:
I created a StopTimer() function that waits for the timer to fire THEN immediately calls StopTimer(). This seems to have completely eliminated the memory error, but it also causes a delay while the StopTimer() loop waits for the timer or timers to fire.
SpaceAce
BlitzMax seems to be trying to fire a trigger that has already been stopped. Apparently, sometimes when I call the StopTimer() function, the timer fires again, anyway. Since it seems so random, I am guessing the error occurs when the timer is Stop()ped but the timer.fire is already in progress or queued up to go. Maybe the timer is being Stop()ped between the instruction to fire the timer and the actual event emission...? Just speculation.
My workaround:
I created a StopTimer() function that waits for the timer to fire THEN immediately calls StopTimer(). This seems to have completely eliminated the memory error, but it also causes a delay while the StopTimer() loop waits for the timer or timers to fire.
SpaceAce