10 Replies Latest reply on Sep 29, 2012 8:07 AM by DamonCasey

    FMP11 crashes on Lion when running OnTimer script

    DamonCasey

      I'm getting a persistent crash with both FileMaker Pro 11.0v4 and FileMaker Pro 11 Advanced 11.0v4 running on two separate computers that were recently upgraded to Lion 10.7.4.

       

      The crash occurs with an OnTimer script attached to the database window by the opening script that saves a compressed copy of the file. The OnTimer script is set to run every 60 minutes and has been rock solid on Snow Leopard and the crashes only started after upgrading the computers to Lion.

       

      The crash occurs on my development machine in FileMaker Pro 11 Advanced and more sporadically on the client's computer in FileMaker Pro 11. My computer doesn't have the correct path to save the file so I get the standard error message that the file "could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk." As soon as I click OK, FileMaker Pro 11 Advanced crashes.

       

      I can sometimes run the script manually on my development machine without a problem and other times it crashes when performed manually too so the crashes happen more regularly as an OnTimer script.

       

      It crashes less regularly on the client's computer where they see a crash approximately once a day.

       

      Has anyone seen similar crashes since upgrading to Lion?

       

      Best regards,

       

      Damon Casey

      Automating Data Ltd.

      http://www.automatingdata.co.uk/

        • 1. Re: FMP11 crashes on Lion when running OnTimer script
          Stephen Huston

          I have a lot of questions, but  no instant answers:

          1. Have you tried setting Error Capture ON within the script?
          2. And maybe providing some If/Else branching if there is an error?
          3. I am curious about the purpose of your script; saving a copy of a database once a minute seems like a disk-intensive action to be running on a timer.
          4. Is there a chance your target disk is being filled?
          5. There have also been reports of FM writing files (PDF in reported cases) where the FM application is not turning loose of it's control of the writted file at the OS level, making other operations on that new file kick out an error. If your script is writing a file to the OS and then trying to overwrite that file, it may be causing a similar error. Are you overwriting the file, or changing the file name via a variable for each write?
          • 2. Re: FMP11 crashes on Lion when running OnTimer script
            DamonCasey

            Stephen,

             

            Thanks for your reply.

             

            1. Error capture is on. The crash occurs after attempting to save the file (at least on my dev computer).

             

            2. No If Else branching happens if an error occurs. The script saves the compressed copy and nothing else. I'm not performing any error trapping for the save step.

             

            3. The Install OnTimer step is set to 60 minutes, not 60 seconds. I had to recheck my original post to make sure I hadn't provided the wrong info.

             

            4. The target disk is not beng filled either at my client or on my dev computer. There's a minimum of 200GB of free space in both locations.

             

            5. The saved file's name contains a timestamp so it's not overwriting an existing file. A new file is being saved every hour.

             

            I could introduce some branching with error trapping to see if any errors are occurring leading to the crash. The script has been running every hour for over a year with no problem before upgrading to Lion so it's not something I have had to consider before. If the script fails to save the file, there's nothing else that happens afterwards.

             

            Best regards,

             

            Damon.

            • 3. Re: FMP11 crashes on Lion when running OnTimer script
              lhoong

              Damon,

               

              Is there a script step that utilizes a 3rd-party plugin? If so, have you ascertained that the plugin is compatible with OS X 10.7.4 and is not the source of the crashes?

               

              Lee.

              =================

              Binary Assist

              220 Gaines Oak Way

              Suwanee, GA 30024

              Voice: (678) 313-5604

              Internet: lhoong@binaryassist.com

              Website: www.binaryassist.com

               

              FileMaker Certified Developer

              • 4. Re: FMP11 crashes on Lion when running OnTimer script
                DamonCasey

                Lee,

                 

                Thanks for your reply.

                 

                The script isn't calling any plug-in. The only plug-in installed on the live computer is AutoUpdate. I have the latest versions of the 2empowerFM Clipboard Explorer v2.54, 2empowerFM Developer Assistant v2.67 and 2empowerFM v2.37 plugins on my development computer along with AutoUpdate.

                 

                Best regards,

                --

                Damon Casey

                Automating Data Ltd.

                http://www.automatingdata.co.uk/

                 

                 

                FileMaker Certified Developer for versions 8, 9, 10 and 11.

                FileMaker Business Alliance and FileMaker TechNet Member.

                 

                 

                Registered in England no. 4840986.

                Registered Address: 7 Waterstone Way, Greenhithe, Kent DA9 9TU.

                • 5. Re: FMP11 crashes on Lion when running OnTimer script
                  Stephen Huston

                  Hi Damon,

                   

                  Sorry for my mis-read on the time gap. One hour frequency is clearly not an issue.

                   

                  When you say you get a "persistent crash" do you mean every single time, or just most of the time. If its consistent, then there is always something going wrong, not just the current state of the FM file.

                   

                  One issue may be that running this as a backup method during development could often trigger the script at a point in development when it would be unwise to run it -- during the editing of scripts or schema -- when saving a copy during those editings might trigger errors or even be unavailable options for the client software.

                   

                  My own preference would be for the script to trigger a message reminding the developer to perform a backup ASAP rather than trying to run it inviisbly in the background no matter what else is happening at the time.

                   

                  Another question is whether you were running this script with 100% success prior to the latest OS updates, or was this  script put into use after the updates and is untested on older versions of the OS?

                  • 6. Re: FMP11 crashes on Lion when running OnTimer script
                    DamonCasey

                    Hello Stephen,

                     

                    Thanks for your reply.

                    When you say you get a "persistent crash" do you mean every single time, or just most of the time. If its consistent, then there is always something going wrong, not just the current state of the FM file.

                     

                    It was more persistent when I started the thread, now it happens about once a day in the live environment. I was able to get the development version to crash more regularly by performing the script manually but now that doesn't happen and I wasn't able to replicate the crash by performing the script manually ten times in a row.

                     

                     

                    One issue may be that running this as a backup method during development could often trigger the script at a point in development when it would be unwise to run it -- during the editing of scripts or schema -- when saving a copy during those editings might trigger errors or even be unavailable options for the client software.

                     

                    The script only performs the backup when logged in as one particular account. If Get ( AccountName ) doesn't match that account the script is exited before performing the backup. I have a separate development backup script that I run manually whenever I require a backup.

                     

                    Another question is whether you were running this script with 100% success prior to the latest OS updates, or was this  script put into use after the updates and is untested on older versions of the OS?

                     

                    The script was running with 100% success under Snow Leopard for more than a year. The crashes have only started since updating to Lion 10.7.4. FileMaker Pro was already on 11.0v4 before the Lion upgrade.

                     

                    Best regards,

                    --

                    Damon Casey

                    Automating Data Ltd.

                    http://www.automatingdata.co.uk/

                     

                     

                    FileMaker Certified Developer for versions 8, 9, 10 and 11.

                    FileMaker Business Alliance and FileMaker TechNet Member.

                    • 7. Re: FMP11 crashes on Lion when running OnTimer script
                      Stephen Huston

                      Definitely sounds like the OS upgrade affected something, but also sounds like it is an occasional problem rather than consistent, so it may depend on what else is going on at the time, either with the OS or the FM file system.

                       

                      Can you recognize anything in common about the times it crashes, such as what you are doing in FM when the script fails, or are there other OS operations which operate on timers, even timed "get mail" routines?

                       

                      Can you post the script step details here so we can see exactly what is being performed?

                       

                      Do you have other timer scripts in the FM system, or other Save As... steps either on timers or that may be inthe works when the timer triggers?

                       

                      Trying to pin down errors which are neither predictable nor consistently repeatable  is one of the worst cases for trouble shooting. 

                      • 8. Re: FMP11 crashes on Lion when running OnTimer script
                        DamonCasey

                        Stephen,

                         

                        Thanks for your reply. I've been on-site most of the week so haven't been checking the forums.

                         

                        The client moved the database to another computer and it's been working fine up to today when I received a call to say it's crashed again. The system is based on the separation model with a UI file and data file. When it crashed today, the UI file was saved but the data file wasn't so it seems the problem occurred with the data file, although this is the first evidence I have of that.

                         

                        There is one other OnTimer script attached to a hidden window that performs some updates to records if the time is between 3 and 6am (if I remember correctly - I'm not in front of the computer now). I don't know about any other timed routines. There aren't any other timed scripts and this is the only production script that saves the files (there's a development script that saves too but users don't have access to it).

                         

                        I'll post the script when I'm back at the computer.

                         

                        The issue is frustrating because it happens too often but not often enough to see a pattern.

                         

                        Regards,

                         

                        Damon.

                        • 9. Re: FMP11 crashes on Lion when running OnTimer script
                          pablokenfold

                          This takes a little time and effort to implement, but it gives you a lot of information on the state of the system when errors occur:

                           

                          http://www.phillyfilemaker.org/index.php/2010/09/building-robust-error-logs-in-filemaker-11/

                          • 10. Re: FMP11 crashes on Lion when running OnTimer script
                            DamonCasey

                            After much testing and investigation, there are two answers to this problem.

                             

                            1. Lion, external disk and FileMaker's Save A Copy As... command

                             

                            The client's crashing problem was due to FileMaker saving a copy to a Seagate GoFlex external disk that was connected to the host computer by WiFi. The disk was connected to an Apple Airport Extreme and broadcast to the network. The host computer was saving the backups to the disk for more than a year with no problems using Snow Leopard but there is an incompatibility between Lion, FileMaker and the disk that causes the crash.

                             

                            I've modified the backup script to backup only to a local folder on the host computer (which it was doing anyway) and removed the Save A Copy As script step for saving to the external disk. I'm now using an AppleScript and iCal to schedule copying the local backup files to the external disk twice a day.

                             

                             

                            2. FileMaker Pro 11 Advanced crashes when it can't find a file or folder

                             

                            The second part to the problem is that FileMaker Pro 11 Advanced on my development iMac crashes when it was attempting to run the backup script when the backup folder doesn't exist. It also crashes when a file no longer exists and I attempt to open it from the File menu's Recent Files menu. Interestingly, it doesn't crash if attempting to open a recent file from the FileMaker Quick Start window that no longer exists.

                             

                            I've tested FileMaker Pro 11 Advanced in a new account and it doesn't crash in this manner so there is an issue with my user account. I've tried deleting FileMaker Pro 11 Advanced's preference files but the problem persists so I'll move my data to a new user account.

                             

                            Thanks for everybody's participation in the thread, it's much appreciated.

                             

                            Best regards,

                            --

                            Damon Casey

                            Automating Data Ltd.

                            http://www.automatingdata.co.uk/

                             

                            FileMaker Certified Developer for versions 8, 9, 10 and 11.

                            FileMaker Business Alliance and FileMaker TechNet Member.

                             

                            Registered in England no. 4840986.

                            Registered Address: 7 Waterstone Way, Greenhithe, Kent DA9 9TU.