I am so frustrated.
My program keeps doing that.
Even when I turn off all the timers it does it.
I have put DoEvents in every subroutine.
I have put a:
Inside every 'Do Until' and 'Do While' statement
If I ever have an else that might end up empty if the Debug flag is turned-off I put a DoEvents:
In every timing event I have put DoEvents in every If / then / else section
I did it via copy/paste and then verified that all 350 subroutines had a DoEvents.
All of the Service module's Subroutines all have almost too many DoEvents scattered throughout (in every loop, in every if/then/else..., before exiting every Sub).
I have copious settings flags which turn-off almost everything (meaning disabling most every timer that might be running in the background) and even when I turn them off, it occurs.
I figure that, somewhere, maybe some infinite loop must be occurring?
What am I missing? Is there a way to see what subroutine or timer the operating system is thinking is locked-up?
How do I debug this problem and determine what is causing it? I've been plagued by it for about a week (been working on the program now since January, and it's proprietary code; so can't post it).
My program keeps doing that.
Even when I turn off all the timers it does it.
I have put DoEvents in every subroutine.
I have put a:
B4X:
EventCounter = 0
Do While Not(Done)
' (code that does stuff until stuff is done, then Done = True)
If EventCounter Mod 3 = 0 Then
If Debug Then Log("DoEvents")
DoEvents
EndIf
EventCounter = EventCounter + 1
Loop
Inside every 'Do Until' and 'Do While' statement
If I ever have an else that might end up empty if the Debug flag is turned-off I put a DoEvents:
B4X:
If something= something then
' Do a bunch of stuff
else
If Debug then Log("such-and-such")
DoEvents
end if
In every timing event I have put DoEvents in every If / then / else section
I did it via copy/paste and then verified that all 350 subroutines had a DoEvents.
All of the Service module's Subroutines all have almost too many DoEvents scattered throughout (in every loop, in every if/then/else..., before exiting every Sub).
I have copious settings flags which turn-off almost everything (meaning disabling most every timer that might be running in the background) and even when I turn them off, it occurs.
I figure that, somewhere, maybe some infinite loop must be occurring?
What am I missing? Is there a way to see what subroutine or timer the operating system is thinking is locked-up?
How do I debug this problem and determine what is causing it? I've been plagued by it for about a week (been working on the program now since January, and it's proprietary code; so can't post it).
Last edited: