5 Replies Latest reply on Nov 26, 2012 1:04 PM by gmurrayhays@yahoo.com

    "Save Records as PDF" crashes FileMaker

      Summary

      "Save Records as PDF" crashes FileMaker

      Product

      FileMaker Pro

      Version

      12.0 v3

      Operating system version

      Windows NT

      Description of the issue

      When I try to run "Save Records as PDF", FileMaker crashes every time.

      I have culled the problem down to a database that contains 500 identical records in a table with 13 fields, and 3 global values stored in another table. The database was originally created years ago (the version that I inherited was v7.0). The 2.4 GB .fmp12 database file can easily be provided to you to reproduce the problem.

      I attach a picture of the layout that I am trying to save to pdf, along with the MS crash dialog.

      Steps to reproduce the problem

      Run the following script in my database.

      CreateInvoicesFile_AllAtOnce

      #
      Set Variable [ $currentDate ; Value:GetCurrentDateAsSortableText() ]
      Set Variable [ $currentTime; Value:GetCurrentTimeAsSortableText() ]
      Set Variable [ $dateAndTime; Value:$currentDate & "_" & $currentTime ]
      #
      Enter Browse Mode
      Show All Records
      Set Variable [ $numRecords ; Value:Get(FoundCount) ]
      Set Variable [ $fileName ; Value:"Defect_ "
      & $dateAndTime
      & "_Invoices"
      & "_n" & $numRecords
      & ".pdf" ]
      # Generate File
      Go to Layout [ “Invoices” (PLENARY) ]
      View As
      [ View as List ]
      Sort Records by Field [ Ascending; PLENARY::ID ]
      Go to Record/Request/Page
      [ First ]
      Save Records as PDF [ File Name: “file:./$fileName” ; Records being browsed ]
      [ Document - Compatibility: Acrobat 7 and later ]
      [ Pages - Number Pages From: 1; Include: All pages ]
      [ Security - Printing: High Resolution ; Editing: Any except extracting pages ; Enable copying ; Enable Screen Reader ]
      [ Initial View - Show: Pages Panel and Page ; Page Layout: Default ; Magnification: Fit Page ]
      [ Restore; No dialog ]

      Expected result

      A single PDF file containing 500 pages.

      Actual result

      FileMaker crashes; no output.

      Exact text of any error message(s) that appear

      See image.

      Workaround

      I wrote a loop to save only the current record (rather than doing a one-time save of all browsed records), which results in 500 separate PDF files. I then used Adobe to combine these into one file.

      The loop fails, in the same manner as this defect, about 30 times. However, I restart saving the files after the latest one that didn't fail. In this way, over many hours, I was able to create all 500 files.

      FileMakerBug.PNG

        • 1. Re: "Save Records as PDF" crashes FileMaker

               Murray Hays:

               Thank you for the post.

               Are you able to replicate this in a new database or one of the starter solutions in FileMaker Pro 12?

                

               It may be a good idea to run a recover on your file to see if any problems are reported. Even if no problems are found, I'd test the recovered copy to see if it still exhibits the same behavior.

                

               Things to keep in mind about Recover:

                

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

                

               1. The recovered copy may behave differently even if recover reports "no problems found".

               2. Recover does not detect all problems

               3. Recover doesn't always fix all problems correctly

               4. 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.

                

               If you are able to replicate this behavior outside of the current database file, using a new database file built in FileMaker Pro 12 or one of the starter solutions, please let me know.

                

               TSFalcon

               FileMaker, Inc.

          • 2. Re: "Save Records as PDF" crashes FileMaker

                 I've tried Recover previously after reading similar bug report responses. No problems reported and no changes in behavior.

                 I recreated this problem in a newly created db, but I imported or copied over (as needed) the database schema, database data, scripts, custom functions and layout. To recreate the problem completely from scratch in a new database could take me days to do.

                 Does your response imply that my database file may be corrupt and that I would have to recreate everything from scratch to solve this problem? That would seem like an extreme resolution to this problem, since I suspect that no one has manually edited the database file, and the FileMaker GUI was the only portal through the contents of the database file could have gotten corrupted. That would not bode well for the quality of FileMaker.

            • 3. Re: "Save Records as PDF" crashes FileMaker
              philmodjunk

                   Ruling out damage to  your file is a standard step when you experience crashes or "hangs". And your file can be corrupted through any number of means and this is by no means unique to FileMaker database files.

                   Creating a small test file to see if it also crashes should not take days to do. You do not have to recreate every detail of your original file just add enough features to allow you to generate some PDF's. This is a far better test to see if there may be issues with your file--not just possible corruption than running a recover because there are no guarantees that Recover will find or fix all possible issues with your file.

              • 4. Re: "Save Records as PDF" crashes FileMaker

                     I opened my problematic database and exported all records into a .mer file (1865 records, 93 fields). I then closed FileMaker and started it back up. I selected "Convert an existing file..." to create a new database with the .mer file providing the data.

                     From this point on, all of my changes to the database were through the FileMaker GUI. I did not import anything from the problematic database, nor did I cut and paste anything from the problematic database to the new one. Everything was entered manually, except for putting some pictures from the file system into container fields. I methodically created backups along the way. I never reused a database file that had caused FileMaker to crash.

                     I defined the field types more appropriately, added and populated some new fields, add a custom function, add a couple of scripts, and created part of an INVOICE layout from scratch. I was able to reproduce the FileMaker crash. I then progressively removed text fields from the layout until the Save Records as PDF worked as desired.

                     I have 2 consecutive backups of the database, one which crashed repeatedly, and the other (with a single text field removed from a layout) that worked fine.

                • 5. Re: "Save Records as PDF" crashes FileMaker

                       I ended up thinking that this might be some kind of memory management "size" problem, that might be obviated by moving to a more modern OS.

                       So, I moved the database from my original machine running Windows XP, to a different machine running Windows 7. The problem has disappeared!