6 Replies Latest reply on Aug 31, 2015 11:12 AM by MattLeach

    Not enough memory to complete this operation

    MattLeach

      Im in the process of reviewing a database made by another developer in order to make some changes.

       

      In the dataviewer, I setup a quick calculation to make sure it accomplished what was needed based on fields and relationships that already exist. I setup the calc, clicked evaluate and it performed what I needed.

       

      I then setup a new calc field with the same calculation and when I attempt to save it I get an error saying 'Sorry, there is not enough memory to complete this operation'.

       

      Thinking I copied things wrong from the dataview, I went back in to my saved calc in the dataviewer, clicked evaluate and received the same error.

       

      If I close out of the file and come back in and evaluate the calc, it works again. IT appears as though I am only able to run it once, then I get the not enough memory error.

       

      I've never come across this error before.

       

      I've notice that in this database there are a TON of unstored calc and the calc I was writing references some of those, could that be the issue?

        • 1. Re: Not enough memory to complete this operation
          Mike_Mitchell

          Matt -

           

          Without seeing the calculation, it's hard to say. It smells like a problem with dependencies, though. How many levels deep do the calculations run, and are there any aggregates among these unstored calculations?

           

          Mike

          • 2. Re: Not enough memory to complete this operation
            steveromig

            Im in the process of reviewing a database made by another developer in order to make some changes.

             

            In the dataviewer, I setup a quick calculation to make sure it accomplished what was needed based on fields and relationships that already exist. I setup the calc, clicked evaluate and it performed what I needed.

             

            I then setup a new calc field with the same calculation and when I attempt to save it I get an error saying 'Sorry, there is not enough memory to complete this operation'.

             

            Thinking I copied things wrong from the dataview, I went back in to my saved calc in the dataviewer, clicked evaluate and received the same error.

             

            If I close out of the file and come back in and evaluate the calc, it works again. IT appears as though I am only able to run it once, then I get the not enough memory error.

             

            I've never come across this error before.

             

            I've notice that in this database there are a TON of unstored calc and the calc I was writing references some of those, could that be the issue?

             

            What version of FileMaker Pro is this?

             

            Is this something you can reproduce in other files or is it just the file you are trying to modify?

             

            Platform?  High level overview of your system?

             

            While it isn't out of the question that the unstored calculations might have something to do with it - I am skeptical that they are the root cause.

             

            Steve Romig

            FileMaker, Inc.

            • 3. Re: Not enough memory to complete this operation
              MattLeach

              I was not involved with the creation of the database, was approached by client to make some modifications.

               

              Im utilizing FileMaker Pro Advanced 13 on Mac. I've tried 14 as well but doing so I get the error even on the first try.

               

              I've attached a copy of the database (figured it would be easier)

               

              From the client screen, search for patient 4864 and click on name to open, then go to Invoices button.

               

              From there, I went into the dataviewer and entered this calc:

              Sum ( Invoices to Invoices by Client ID::Bal Due )

               

              Im basically trying to get the total balance due across all invoices. The relationship and fields were already there, was simply just trying to run the calc.

              • 4. Re: Not enough memory to complete this operation
                Mike_Mitchell

                This thing has a circular calculation in it.

                 

                     Bal Due = Total - Previous bal

                 

                But:

                 

                     Previous bal = Sum ( Invoices to Invoices by Client ID::Bal Due ) - Invoices::Bal Due

                 

                Therefore, in order to know what the Balance Due is, you have to calculate the Previous Balance. But the Previous Balance is dependent on the Balance Due.

                 

                Houston, we have a problem. I'm not surprised it runs out of memory. Probably need to clean this up before you go any further.

                 

                And, my initial suspicions were correct. This thing has a ton of dependencies with interwoven aggregates. Those need to be cleaned up too. If it gets any significant amount of data load, it's going to grind to a screeching halt.

                • 5. Re: Not enough memory to complete this operation
                  schamblee

                  I have not look at your database yet.

                   

                  There is an issue with GetNthRecord in non-stored calculation, that will cause  such a crash after so many calculations, which  falls under the same category Mike was talking about. Dependencies with interwoven aggregates, it get so far then crashes.   The crashes happen at different times based on amount of ram and what is running on the computer. 

                  • 6. Re: Not enough memory to complete this operation
                    MattLeach

                    I've started looking through more of the calcs after I posted it and see what you are talking about. Some cleanup if definitely in order. Thanks for taking the time to look.