Skip to main content
June 7, 2022
Solved

How do I trace the stack to remove an error in MathCAD?

  • June 7, 2022
  • 4 replies
  • 2208 views

Making some calculations with MathCAD I got an error such as:

 

Unknown error: A call target threw an exception.

Is there some stack trace which I could investigate to comprehend the situation? Thanks in advance.

 
Best answer by Werner_E

AFAIK Prime (I guess you are referring to Prime and not to Mathcad 15 or earlier) does not offer that kind of tool.

 

Error messages often are imprecise, misleading or, as in your case, pretty unhelpful.

Sometimes experience helps to determine the real cause for the error.

If you are able to do so you may post the worksheet here or a stripped down demo worksheet showing the error. Maybe some users here are able to track down the error.

4 replies

Werner_E25-Diamond IAnswer
25-Diamond I
June 7, 2022

AFAIK Prime (I guess you are referring to Prime and not to Mathcad 15 or earlier) does not offer that kind of tool.

 

Error messages often are imprecise, misleading or, as in your case, pretty unhelpful.

Sometimes experience helps to determine the real cause for the error.

If you are able to do so you may post the worksheet here or a stripped down demo worksheet showing the error. Maybe some users here are able to track down the error.

June 8, 2022

Thank you all of you for the explanation. It is clear for me. Exactly what I needed!

23-Emerald IV
June 7, 2022

I assume you're using Prime... Did it stay alive, or did it crash with that message?

The error message, to me, is not of the sort that a user should get. It sounds more like Prime ran into an unexpected problem, that the application wasn't prepared for. So I (also) assume it crashed with that message. In that case you may have a .log file, somewhere in C:\ProgramData\PTC\Mathcad Prime\Logs. The log file is for PTC to know what went wrong, not for users to help them correct their input to the application.

 

Success!
Luc

21-Topaz II
June 8, 2022

Hi,

Pepper the file with WRITEPRN statements altering the file name in a sensible fashion.

Prime will write the files until something crashes then you know what is causing the problem.

Capture.JPG

Cheers

Terry

5-Regular Member
June 8, 2022

If you see an error message that starts with "Unknown error" it is usually an indication of a defect and should be reported to tech support with sample worksheet, or steps to reproduce. 

Mathcad Prime has "Error Tracing" functionality on "Calulation" tab in ribbon. This feature helps to navigate "error chain" i.e. in situation when calculation error in one region is caused by  or related to an error in another region. I am not sure it will be helpful in your specific case. 

Mathcad 15 also has similar error tracing functionality.