5 Replies Latest reply on May 3, 2012 6:31 AM by philmodjunk

    Script problem in converted to FMP 12 file



      Script problem in converted to FMP 12 file


      I use a set of related files everyday. Recently I got started with FMP 12, and converted all these files. Everything works wonderfully, except for one set of scripts, in one of these files. These scripts do not depend on any other file to run. I start with the same button, which will run one of several different scrpts, depending on the conditions set prior to clidking that button. EVERY time I try any of them, Filemaker crashes. "Filemaker has stopped working ..."

      What do I do now? What errors should I be looking for?

      I have already tried dumping the file and repeating the conversion process.

        • 1. Re: Script problem in converted to FMP 12 file

          Try using FileMaker 12 to recover the file as it may be a damaged file--even before you converted it.

          It's not unheard of for damage to lie hidden in a file until it is upgraded.

          Things to keep in mind about Recover:

          While Recover almost always detects and fully corrects any problems with your file...

          1. Recover does not detect all problems
          2. Recover doesn't always fix all problems correctly
          3. Best Practice is to never put a recovered copy back into regular use or development. Instead, replace the damaged file with an undamaged back up copy if this is at all possible. You may have to save a clone of the back up copy and import all data from your recovered copy to get a working copy with the most up to date information possible.
          • 2. Re: Script problem in converted to FMP 12 file

            Filemaker Go 12 is continualy crashing (quiting quietly) when I swipe the screen in a certain way... I haven't had any probem with 12 Pro in that regard but then I am not using old complicated files...

            If you have Advanced you can step through each line of the script and locate the line that causes the crash. Let's assume that you don't or you might have already tried that.

            Here's how to step through a script if you only have Pro and not advanced:

            Insert a halts script step near the beginning of your script and run it. If it doesn't crash then move it a few more lines further down, save the script and run it. Keep doing this until the script crashes, if it does. Now you know that troubled line is in between the current halt line and the previous one and can consider those lines and what they do.

            If your script performs another script, do the same there.

            You can narrow down the problem, my bet is on a layout or a plugin that needs updating. Does your script use either a plugin or a custom function for set field, etc.

            Updating your plugins might make a difference.

            • 3. Re: Script problem in converted to FMP 12 file


              Have you reported this in Report an Issue? Such a behavior on new release needs to be reported as a bug so the techs can tack a look at the issue.

              Another useful way to analyze a script if you don't have access to the debugger in FileMaker advanced is to insert a series of show custom dialog steps into your scripts with unique messages in each dialog so you can easily determine which is the last one to execute before you get the crash. Then, you can repeatedly split the difference between the last show custom dialog step to appear before the crash and the one that did not appear to isolate the actual step that caused the crash.

              • 4. Re: Script problem in converted to FMP 12 file

                Thanks, Phil. That worked and I'm back in business. The script uses a loop to count down and/or keep time on a task while my subject works on it (I administer psychological tests). This works much better for me than a stopwatch because all of these tests use time in total number of seconds, rather than minutes and seconds. The loop included a <pause script> step, that FM12 didn't like when it was immediately after a <go to field> step. I moved it to the end of the loop, and was what 12 wanted.



                • 5. Re: Script problem in converted to FMP 12 file

                  Please feel free to post a report on this in Report an Issue (See tab at top of screen). You can post your script and to save typing, you can post a link to this thread in that report.

                  To post a script to the forum:

                  1. You can upload a screen shot of your script by using the Upload an Image controls located just below Post A Answer.
                  2. You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here.
                  3. If You have FileMaker advanced, you can generate a database design report and copy the script as text from there.
                  4. If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format. (Use the HTML option on the database tab panel and paste the text into the forum's HTML editor.)