5 Replies Latest reply on Aug 24, 2010 8:55 PM by ralvy

    FM11 Save As Copy: an important bug?

    ralvy

      Title

      FM11 Save As Copy: an important bug?

      Post

      Recently, while testing a release of a FM runtime solution with FMDiff, FMDiff reported I had 5 orphaned blocks. Though Recover found "no problems" with the same file, looking into its recover log I see entries at the end like this:

      "Page 853 marked free but not in free list"

      What I have found, in extensive nervous testing of many previous backup copies of this solution in the last 24 hours, is that I can reliably do this:

      1. Load a version of the file that is clean with with FM10 and do a Save Copy (not compacted).

      2. Test the copy made in step 1 with FMDiff and find no errors.

      3. Load the same file with FM11 and do a Save Copy (not compacted).

      4. Test the copy made in step 3 with FMDiff and find the orphaned blocks.

      This is reliably reproducible. What is also reproducible is compacting the file results in FMDiff finding no errors. But saving the new compacted copy as a non-compacted copy with FM11 will produce the errors in the new copy. Again, FM10 doesn't do this.

      Anyone know if FM11 "Save as Copy" works differently than FM10's version of that?"

      Before reporting this to FMI, I've been trying to create a small solution that will reproduce this. I was able to get that solution to produce an orphaned block on a File Save (with FM11) only once, but further testing isn't producing the error. So I don't have the pattern yet.

      More about this particular file. It's part of a data separation solution. The problem file is the UI file for that solution. It consists only of 3 utility tables. 2 of the tables have only a single record each on startup, and the third is empty on startup. On startup, the existing 2 records are deleted and then recreated. No file in the solution has FM11-specific features.

       

       

      <!--   ~-|**|PrettyHtmlStart|**|-~   -->
      __._,_.___









        • 1. Re: FM11 Save As Copy: an important bug?
          fitch

          My guess would be that perhaps FMDiff hasn't been updated for FM11.

          • 2. Re: FM11 Save As Copy: an important bug?
            ralvy

            Even FM's Recover finds errors in the FM11-saved file. It finds free blocks, like I mentioned early in that post. If I hadn't used FMDiff, I would never have noticed this. FM's Recover reports "no problems" with the file, but when I look in the recover log, I see the free blocks, like this:

             

            "Page 853 marked free but not in free list"

            • 3. Re: FM11 Save As Copy: an important bug?
              ralvy

              I have found it very hard to create a small database with a repeatable event that exposes this problem. But I do find the following will expose it reliably on the first Save As Copy of the database created with these steps ...

              ---

              Do the following with FM10 and then do it again, step by step, with FM11, making 2 separate databases:

              Create a new database and rename its initial table, Table 1.
              Create two more tables, Table 2 and Table 3.

              In Table 1, create a field, Field 1. Make it a Global Text field.
              In Table 2, create a field, Field 1. Make it a Global Text field.
              In Table 3, create a field, Field 1. Make it a Global Text field.

              Go to the default layout for Table 1.

              If there's a record there already, delete it and recreate it, leaving its field empty. If there wasn't a record there already, create it, delete it, and recreate it, leaving its field empty.

              Go to the default layout for Table 2 and do the same as you did for Table 1.

              Do not create a record in Table 3.

              Now Save As Copy (not Compacted, not Clone).

              Exit the database.

              [If you use FMDiff, inspect the copy made with FM10 and then the copy made with FM11. The problem will be very obvious: an orphaned block. So you don't need to do the following with Recover unless you feel like it.]

              Using Recover, do a Consistency Check on the original and examine the recover log. Note it has no errors.

              Using Recover, do a Consistency Check on the copy and examine the recover log. Don't just rely on the dialog. Look at the recover log. Note it has no errors if you Saved A Copy with FM10, but has an error like this if you Saved A Copy with FM11:

              "Page 16 marked free but not in free list"















              • 4. Re: FM11 Save As Copy: an important bug?
                ralvy

                The author of FMDiff has confirmed and reported to FMI that Save As Copy behavior (not compacted) has changed with the release of FM11. In some cases, it will write an extra free block to the file when it does this.

                • 5. Re: FM11 Save As Copy: an important bug?
                  ralvy

                  This has not been fixed with FMPA 11 v2.