5 Replies Latest reply on Oct 1, 2014 8:53 AM by connollymp

    Loops crashing Filemaker (12/13)

    connollymp

      Greetings, TechNet!

       

      We have a long script that calls out multiple other scripts, accessing multiple tables across multiple FM databases. It loops through and performs actions in those tables, thousands and thousands of records... 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); this, however, means that some of our scripts now run for HOURS instead of MINUTES!

       

      I have absolutely no idea why, has anybody else encountered this issue?

        • 1. Re: Loops crashing Filemaker (12/13)
          coherentkris

          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.

          • 2. Re: Loops crashing Filemaker (12/13)
            ch0c0halic

            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.

            • 3. Re: Loops crashing Filemaker (12/13)
              Mike_Mitchell

              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.

              • 4. Re: Loops crashing Filemaker (12/13)
                gdurniak

                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

                 

                greg

                 

                > 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

                • 5. Re: Loops crashing Filemaker (12/13)
                  connollymp

                  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?