7 Replies Latest reply on Apr 12, 2011 9:29 AM by philmodjunk

    Random crashes when using a script



      Random crashes when using a script


      I am experiencing random FM11 crashes when using a script that sends a mail merge message to an email provider and then prints a form with client data to an HP Laser Jet M2727nf printer.  It usually does the email but sometimes does not do the print job and crashes. Sometimes when it crashes the "printed" field sets and sometimes not. If I open filemaker again, it is usually OK.  Attached are the pertinent scripts.  Using PC with Vista.


        • 1. Re: Random crashes when using a script

          Basic diagnostic tests to perform when you get consistent crashes:

          Does the crash only occur with a specific file?

          Test by creating a small sample file and see if opening it and working with it also generates a crash. If it crashes too, the problem likely lies with the computer or it's installation of FileMaker. If it does not crash, it becomes more likely that there is a problem with the file.

          What is reported when you recover the file?

          The file could be damaged.

          Things to keep in mind about Recover:

          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.


          Does it always crash when you are doing the same thing with your file?

          That may point to a specific layout, script, operation that interacts with your Operating system or other applications...

          • 2. Re: Random crashes when using a script

            Crashes are random and do not always reoccur when same script and data is used.

            • 3. Re: Random crashes when using a script

              But have you run the other tests listed in my last post? They may reveal the issue for you, such as a corrupted file.

              • 4. Re: Random crashes when using a script

                This is not a CONSISTANT crash; it is RANDOM.  When it crashs it says Filemaker has stopped working. do you want to close it?  So I close it . If I then open Filemaker again and run the same script with the same exact data, it usually works.  I don't know how to run this on a small sample file.

                i don't see that Recovery is pertinent here.

                • 5. Re: Random crashes when using a script

                  A poor choice of words on my part. "Frequent" would have been more accurate than "consistent".

                  To check things with a sample file, just use the New database option to create a small file with just a few fields defined. Try using it to do basic operations and see if you get any crashes. If crashes only occur with a single file, the most likely cause is a corrupted file and this is a simple check that does not modify your original file in any way so you have nothing to lose by trying this.

                  • 6. Re: Random crashes when using a script

                    The file (Camp) that I am using collects registration information for a boys camp.  The parent data is kept in a separate Master file which is linked to by the parent name.  The data for the camp schedule including costs, dates etc. is kept in a Sked file which links to the Camp file by session name.  The boys data including birthdate and previous attewndance is kept in a History file which is linked by boys name.  These files have been used for at least 10 years in various versions of Filemaker Pro.  Camp registrations are made on line. We switched to FM11 this past year. Everything else including maybe 50 other scripts, work fine.  The only scripts that we are having trouble with are the ones shown in my attachment.  These are used to send a mail merge letter with links to forms that need to be printed out and to print the registration data on a form for office use. True, this script have been modidied this year to allow our registration packet to be sent by email instead of just sending a simple confirmation email.  However the script to print the form for office use is the same.

                    To make a new file with a few fields and run some basic things does not seem practical or useful here.

                    • 7. Re: Random crashes when using a script

                      Suit yourself, but the small test file confirms that you do not have issues with a preference file (mac), the basic Filemaker Install or a specific computer and/or user account on that computer. (Hard drive problems can also cause crashes, for example, but this will likely affect all your files.)

                      Once you are confident that the issues are with a common file or small group of files, then you should use recover or a third party application such as FMDiff to check for possible file corruption.