Closed Azothy closed 2 years ago
One solution might be to have an option to sleep the script for x ms if the infinite loop is detected instead of aborting the script.
Please use #config scripttimeout at a high value, this will extend the duration before it triggers the possible infinite loop alert
Would love to see if we can fix this longstanding issue w/ genie. Basically a false "Possible infinite loop" error that crashes the script. Can be falsely triggered by a couple different things.
Having a script loop through the same loop a bunch of times.. too fast. (A micro pause is usually enough to prevent it) For example a sub that has to loop itself ~40+ times in quick succession checking things before returning. I have seen where if you don't insert a micro pause, genie can throw up on itself and think it's an infinite loop.
Have even seen a false infinite loop error occur if a script runs through too many if/then checks in too short of a time without any pauses. Even without any "loops" at all. A micro pause can fix this also.
One common thread, it seems to be much more common on machines that are lagging / under heavy load But it can occur on any machine under the right conditions. Not sure on the code end but it seems the 'infinite loops' detection needs to be greatly extended or something.