Program hangs but not when I debug step-by-step

Guys,

having a weird phenomenon that is causing me to lose sleep. Since a couple of hours my program is running in an endless loop (it says “App not responding”) but if I debug it and go through it step by step it executes all well. Further more, my program IGNORES the debugging points which I set. I’m very puzzled on the behavior. all was fine yesterday but not sure which of the code changes did cause this weird behavior.

As soon as I press the “Resume” button it never stops and hangs in a loop. I’ve even tried to use a MsgBox each time my While … Wend loops but it doesn’t seem to stop at that point.

Very puzzled and happy for any clue

Andreas

Could you post code please so we may see? Thanks!

Also which OS and Xojo version? Thx

Mike, trying to isolate where it happens as the function itself is calling other functions and the code is a bit longer, parsing through a text file

Found out the reason for this strange behavior. My code actually runs fine and reads all records, then runs out of code. That’s all. It’s a strange behavior that when the application has nothing more to do and should rather wait for instructions or events to happen, it does nothing instead and shows “Application not responding” to the end-user.

How can I avoid this behavior? I mean, how can I end my program there with the last step, either having it running idle waiting for the next push button to be pressed or for an Alt + F4 to close it?

Andreas

Is this a desktop or a console app?

This is not my experience at all. You can actually test this by opening a new application with a default window and a button that maps to quit.

You’ll notice the application never becomes unresponsive and never says “application not responding”.

Could it be that you have very tight loops or timers taking over?