8 Replies Latest reply: May 15, 2014 9:57 AM by TomB _ RSS

    very weird formula problem

    rebecca _

      I am having a VERY weird formula problem.  When I load the model, the calculated fields do not calc.  I cut them out and repaste them... and now they work again.  I save the model.  I close it.  I reopen it.  I have the very same problem again.  WTH?

        • very weird formula problem
          Grant Perkins

          Hi Rebecca,

           

          You did not mention which version of Monarch you are using but I think you have hit a very obscure problem.

           

          I think I saw something similar once when testing a beta version but when I went back to check the specific problem it did not reappear.

           

          My guess was that the model file had become corrupt somehow so that it errored but allowed you to make correction which would then be in memory and work fine. When you save the model the corruption still exists so the next open re-introduces the problem.

           

          Try saving your model with a new name (if you have not already done so) and see if that fixes it. If it does, simply delete your old model and then copy and rename (or just rename) your new model to replace the old one.

           

          If it is a very large and complex model or an extremely large report or 'database' it is just possible that some internal limits are being exceeded and all the required calculated fields are not able to complete when loading - but I think the first idea is more likely.

           

          Looking forward to your feedback. If this does not offer a solution we will need to give it some further thought.

           

          Good luck,

           

           

          Grant

           

          Edit: Correction of confusing typos ...

           

          [size="1"][ August 17, 2005, 06:45 AM: Message edited by: Grant Perkins ][/size]

          • very weird formula problem
            rebecca _

            Hey Grant!

             

            This is version 7.  I have already tried the renaming idea and it did not work.  The problem persists.  The model has quite a few calc columns and several external imports, but it has loaded fine in the past, so I am thinking this is some kind of corruption.  Thoughts?

            • very weird formula problem
              Grant Perkins

              Hmm.

               

              I did once get a very badly corrupt model file which required re-creation of the model by re-keying to resolve the problem. However it sounds like that might be a large task in this case.

               

              Can you identify where the fail occurs? Is it first spotted when one of the fields with external links comes up for calculation?

               

              Could there be a problem with access to one of the linked files? It sounds unlikely from your description if a cut and paste of the formula fixes the problem.

               

              Are you models .mod or .xmod files?

               

              Has anything else changed in the model (or the input or lookup files) recently?

               

              Is the process being run automaticaly or interactively when it fails?

               

              OK, those are the more obvious questions - asked for completeness.

               

              I have managed to hit the technical limits of the system when reading in a very large database which had about 100 fields and about 400 characters worth of data, to which I added about 60 internal lookup tables, a number of calculated fields and about 2000 characters of text base fields from the results. That would simply stop processing when it ran out of capacity. (It was probably just as well that it did  - the results would have been much too large to work with!)

               

              If you have saved you re-edited and working model with a new name but then found that that also fails to load correctly when re-called it does sort of suggest thet there may be some problem external to the model file. However, quite how that would be resolved simply by editing the model once loaded seems mysterious.

               

              I wonder if anyone else has had similar experiences?

               

               

              Grant

              • very weird formula problem
                rebecca _

                "Can you identify where the fail occurs? Is it first spotted when one of the fields with external links comes up for calculation?"

                 

                Not really sure when it is happening but I know it has happened because the values are incorrect in the calc fields (mostly 0's when a number should be there).

                 

                "Could there be a problem with access to one of the linked files? It sounds unlikely from your description if a cut and paste of the formula fixes the problem."

                 

                I also doubt this.

                 

                "Are you models .mod or .xmod files?"

                 

                .mod

                 

                "Has anything else changed in the model (or the input or lookup files) recently?"

                 

                Yes these have changed recently... should I try dropping and then readding perhaps?

                 

                "Is the process being run automaticaly or interactively when it fails?"

                 

                Interactively

                 

                 

                I CAN rekey the entire model, but I sure don't want to do so... I'm considering it.  Think it might help?

                • very weird formula problem
                  Grant Perkins

                  Originally posted by rebecca:

                  "Can you identify where the fail occurs? Is it first spotted when one of the fields with external links comes up for calculation?"

                   

                  Not really sure when it is happening but I know it has happened because the values are incorrect in the calc fields (mostly 0's when a number should be there).[/b][/quote]OK, so I take it that means the fields are all being created (not always the case I found with my v. large database) but they are incorrect.

                   

                  Originally posted by rebecca:

                  "Are you models .mod or .xmod files?"

                   

                  .mod

                  /b[/quote]If all else fails it might be worth seeing if saving as an xmod makes any difference. (Our of interest ...)

                   

                  Originally posted by rebecca:

                   

                  "Has anything else changed in the model (or the input or lookup files) recently?"

                   

                  Yes these have changed recently... should I try dropping and then readding perhaps?

                   

                  /b[/quote]Is it the lookup values that have changed? (My apologies for asking 2 questions in one.)

                   

                  It does occur to me, as a long shot, that some changes or additions to (I assume) numeric values might not be read correctly as numerics. IN which case I guees the calculation would fail, the result would be a NULL but you may have the options set to display NULL as zero. So you would see 0.

                   

                  If the calculations are quite complex but often involve one value in one step for all the failing calculations that one value might be enough to cause many apparent failures.

                   

                  However I am still at a loss to explain the way the re-entering of the formula fixes such a problem.

                   

                  Originally posted by rebecca:

                  I CAN rekey the entire model, but I sure don't want to do so... I'm considering it.  Think it might help? /b[/quote]If my guess above proves to have no foundation I suppose it might be a logical thing to try next. At least that way it would preclude the possibility of the corrupt model file.

                   

                  I hope these suggestions help to move the quest forward.

                   

                  Grant

                  • very weird formula problem
                    TomB _

                    I've been having the same problem with two different models, so I don't see how both models could be corrupted. I'm also using vs 7.0. Has anyone got any update or further information to add?

                    • very weird formula problem
                      Grant Perkins

                      Hi Tom,

                       

                      Did you update to the latest V7 release? I'm not sure it is a factor in the problem but I figure it is always a good thing to do.

                       

                      Personally I have experiences this problem, whatever it is that causes it, on two separate occasions and on one of those occasions two variants of the model were affected. Frankly I cannot be sure whether one of them was saved as a new model when the first one was already corrupt.

                       

                      I have never been able to force the error to occur. The recreated models have never been a problem and that seems to be the same for the 2 or 3 others who have previously posted about it in the forum. (However I am assuming that on the basis that I don't recall anyone reporting the problem returning and demanding an explanation!)

                       

                      I suspect it might be an operating system related disk writing issue in some way. Rare but possible. Files can become corrupt but usually they become completely unreadable whereas here they are partially corrupt in the cases reported.

                       

                      FWIW I have 2 disks on my systems which were once C drives that suddently failed to boot correctly. The first one was about 8 years ago, the second one about 8 months ago. Both disks are fine and can be read easily but will not boot. Something caused the boot sector to become corrupt. I have no idea what or how to correct it to return the disk to its bootable state. Neither are critical so I will leave them as they are. But it does demonstrate that there is more potential for glitches that we might like to think there is. My guess is we don't always see the problems, maybe never use the files again.

                       

                      On the other hand if you are finding this to be a regular problem you may be in a position to help diagnose what is happening - as my events were random and unreproducable despite several hours of trying I could not help the developers much.

                       

                      HTH.

                       

                       

                      Grant

                      • very weird formula problem
                        TomB _

                        Thanks for the tip on downloading the latest upgrade. I downloaded version 7.02, and it seems to have fixed the problem. I am so relieved! Apparently, it was the following bug fix that did the job:

                         

                        "Fixed a bug where under certain conditions, a calculated field that depends indirectly on an external lookup would not refresh correctly depending on how columns were reordered."

                         

                        Apparently, when I reordered some columns coming from an external lookup, it messed-up the calculations. This makes sense because both of the models that had calculation problems use external lookups. Thanks for the help.