5 Replies Latest reply on Jun 12, 2017 5:58 PM by agisllc

    Error with Recursive Operations

    agisllc

      Hello,

       

      There's been a longstanding issue with recursive scripts. I apologize for not reporting it earlier, but I believe the problem exists in all of the recent versions (13 or 14+). It is certainly a problem with FileMaker 15.

       

      We've only witnessed the problem on Mac clients where the files are either local or hosted on a Mac server. We have not witness the problem with a PC client or when the files are hosted on a Windows server (even with the Mac client).

       

      The problem is that, with recursive operations, the script continues before "Get (ScriptResult)" is given a value. In other words, it's not waiting for the previous script to finish before continuing. It will happen for both regular and PSoS script calls. The same problem will sometimes happen with parameters that reference local variables.

       

      The problem is not consistent and anything that slows the process down will prevent the problem. It is not possible to replicate it using the debugger, for example. I doubt it's possible to replicate over the WAN either. The problem only occurs when the circumstances yield optimal performance.

       

      The workaround is to insert a 0 second pause (yes, really). The main downside to this solution is that the pause/resume script step brings the window forward (another issue that could be fixed?), so in production environments we have a script that opens a new window off screen, pauses for 0 seconds, and closes the window.

       

      Attached are screenshots of a few examples of recursive scripts where the problem occurred (including 0 second pause steps that solve the problem). I can demonstrate this problem pretty reliably in one of our local development environments (Mac Mini Server with FMS 15.0.3) and it was first brought to our attention by a client of ours running a Mac Server. I doubt it would be easy to create a "sample file" that would yield the problem, however. I'm sure the complexity of the code is a factor.  We've also thoroughly tested the workaround (disable the pause, problem returns; enable the pause, works fine; etc.) and alternative options. Only the pause step seems to fix the problem. 

       

      Thanks,

       

      Michael Bethuy

        • 1. Re: Error with Recursive Operations
          TSGal

          agisllc:

           

          Thank you for your post.

           

          Do you recall if this issue existed with all versions of Mac OS X?  Or, did this issue become more noticeable under macOS Sierra 10.12.x?

           

          Other than the Pause step, have you tried inserting additional comment lines?

           

          Is it possible to send in a clone of your solution so our Development and Testing departments can determine the cause of the timing?  If so, I have sent you a private message with instructions where to send the file.

           

          TSGal

          FileMaker, Inc.

          • 2. Re: Error with Recursive Operations
            agisllc

            Our client brought it to our attention (indirectly) early this year (March/April perhaps). We successfully replicated it on one of our Mac environments here shortly thereafter. We were hoping FM/FMS 15 would solve the problem but it didn't.

             

            We've tried all sorts of things besides the pause step. Comments, set variables, scripts with 1,000 iteration loops, etc. Only the pause step seems to solve the problem. It also brings the window to the foreground so perhaps it's the "refresh" aspect of that step that's the trick.

             

            I'll see if I can create a sample set of files for you to test outside of our solution.

            • 3. Re: Error with Recursive Operations
              agisllc

              Hi TS Gal,

               

              Just to follow up, I haven't forgotten about you! We're in our year-end crunch but I'll be preparing a file set and a "how to" video for you as soon as possible.

               

              Thanks,

               

              Michael

              • 4. Re: Error with Recursive Operations
                TSGal

                agisllc:

                 

                I totally understand "year-end crunch".  No need rushing to get the files to me.  Take you time.

                 

                TSGal

                FileMaker, Inc.

                • 5. Re: Error with Recursive Operations
                  agisllc

                  Hi TSGal,

                   

                  I'm finally looping back to this (late as usual). Fortunately I am not able to replicate the problem with FileMaker 16, so let's mark this issue as resolved for now. If I see the problem again and can figure out how to consistently replicate it, I'll update this ticket.

                   

                  Cheers,

                   

                  Michael