FM should not crash just because their is a looping structure in a script. I would suggest a thorough debug of the script routine to see if their is an infinite loop or if their are processing errors that would cause problems. If nothing else then post the file.
We have many controllers (robots) running in loops to perform multiple subscripts at either scheduled times or intervals in multiple separate files across multiple FMS hosts. So NO this is not a problem for FMP.
I recommend using FMA (FileMaker Advanced) script debugger to single step through the scripts and find out what is going on.
Controllers are, IMHO, the hardest working systems. Possibly more than the FMS computers. So set the FMP cache to a minimum of 256MB, 512MB is even better, on the controllers. You are caching a lot if information locally so also make sure there is plenty of hard drive space.
I concur with ch0c0halic. It sounds like you're running out of memory during the execution. Make sure the RAM and hard disk are adequate for the task.
If a time delay helps, then it is probably not a memory problem
Over the years, people have posted quirks, where FileMaker has timing problems, and needs a pause to catch up
It would help to know where it fails
Perhaps you could add a step to each script, that writes to a Log field, giving the script name, and the current record ID
> Any time we run this, or a similar script with a loop, FM crashes. The only solution so far that we've found is to put a pause at the end of the loop (something between .1 to 1 full second
So... this is interesting: we've been running the script in debugger this whole time, and its been crashing after exactly 400 records. When running normally, however, outside of debugger, the script succeeds. Can we just... never debug this script?