Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi,
I was using MathCAD Express Prime and whenever I randomly get the system error called System Error: Item have already been added. Key in dictionary: System.Int32[] Key being added: System.Int32[]
It was working fine until recently. This error has been occuring in seemly random locations and times in vector locations such as FaccumTA(6)=
What should I do?
Thanks!
Hello,
Can you attach your worksheet?
Has anything been figured out with this error because I too am experiancing this. It also appears randomly and often if I change a paramter above the error it will go away. I can then change the same parameter back to the original value and it works fine without any errors.
This error is frustrating because my sheet may take more than 30 sec to calculate and I have to wait that time before finding out if there is an error or not then change a parameter, wait 30 sec, change the parameter back, wait 30 sec, and it might work fine then or it may still present an error.
Thanks for your time,
Timothy
So you can't send a sheet showing that error in a reproducible way because of its randon nature, I guess.
Are you using the current version of Prime (3.0 F000)?
I have gotten errors like that as well. From my experience it is from using multithreading or having the program calculate things on different cores. When you have previous calculations that depend on the above, it appears that weird things happen as if it is happening out of order.
The way I have fixed it in the past is annoying but simple.
1. Disable the regions doing that, recalculate. Then reenable the regions and recalculate the worksheet.
2. Remove one or two items from the equation getting the error. After that calculate it, this will seed it new into the calculation routine. Then retype the items you just deleted, and that should then make it recalculate as it should be.
Those are the only work arounds i know of. It generally has occured for me when using a Solve Block or a programing routine that must goal seek the answer requried.
Thanks for the responses,
I am using Prime 2.0. The worksheet would be property of the compay so I would not be able to post it (sorry).
Jake, the workaround you suggested is about as camplicated as the one I offered in the original post and is still a pretty big pain.
Perhaps I should try disabling multithreading and see if I can still get results in a reasonable time.
Best Regards,
Timothy
My apologise, I meant to indicate that there are two workarounds I know of. Both have worked for me in the past.
I find the 2nd one by retyping some of the equation the easiest way to solve the issue. My post should have indicated that more clearly.
I haven't noticed any great performance from diabling multithreading, but my sheets may not be as long or complicated as the one you have.
Alright, so what I have been able to do successfully so far (another workaround) is to disable multi-threading, wait for it to calculate past the point where it was having the error and then re-enable multi-threading. It seems to be the fastest workaround that I have found but I really wish I had a solution instead of a workaround.
-Timothy
I was almost going crazy until I found this workaround. Many many thanks.
I was calculating an array of about the size 10000. Some of the values weren't calculated correctly due to this dubious "system error". But I can not check 10000 values. Some times when recalculating the worksheet a few times it worked, sometimes not.
This bug is really a shame for PTC.