cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Mathcad Memory Leak - Large Data on Clipboard

Lemens
7-Bedrock

Mathcad Memory Leak - Large Data on Clipboard

OVERVIEW:

1) I copy a large table from RISA-3D

2) Open a blank Mathcad Sheet

3) Look in Windows Task Manager, The Memory for mathcad.exe *32 increases DRAMATICALLY when Mathcad has focus, when Mathcad doesn't have focus; Memory only increases by 500 KB per second.

4) this 'RAPID' Memory use can be terminated by copying something MUCH smaller (i.e. A string variable from mathcad itself)

5) After copying something smaller, mathcad sill has a large memory allocation; only way to free it is to terminate the Applicaton

6) If I fail to copy something else; mathcad runs out of memory preventing me from saving and eventually crashes.

SPEC:

Mathcad 15.0 (15.0.0.436 [006041742]) -> MC15 M020

Windows 7 Proffesional; Service Pack 1 (64-bit)

QUESTION:

Is there a fix? OR am I just going to have to copy and past quickly?

11 REPLIES 11
Werner_E
25-Diamond I
(To:Lemens)

To get you right: You have a large amount of data on the clipboard before you startup Mathcad. Then you start the program and have just a blank sheet. You do NOT insert the data in Mathcad but Mathcad runs out of memory just because ther is big data on the clipboard? Strange, indeed!

Obviously copying something smaller replaces the big data on the clipboard and stops the effect. So the workaround would be to clear the clipboard before starting Mathcad by copying anything (desktop icon or whatever) via CTRL-C? Does the same thing happens if you copy the big data to the clip after you startup Mathcad?

Lemens
7-Bedrock
(To:Werner_E)

That is Correct. Copied, Opened up Mathcad, and within 80 seconds:

Untitled.png

Identical results when mathcad is opened during the copy operation.

Catch 22 is that I'm pasting the information into Mathcad, so I merely cannot avoid making large copies w/ mathcad open. However, I do have an 80 second window to paste and save. I am able to reopen the file and work with it without losing memory, its just when I have something in the clipboard. This is actually kind of scary considering I'm not telling mathcad to do anything WITH the copied information and its crashing.

Thank you,

Werner_E
25-Diamond I
(To:Lemens)

Guess you should contact PTC support if you are under maintenance. PTC seems not to be that keen on bug reports and you have tp pay for the privilege to turn them in.

Lemens
7-Bedrock
(To:Werner_E)

So you have to pay PTC in order to tell them something... Hhmmm.... How many posts do you think this blog would see if you needed to pay for each posting? Well, if PTC is the only entity to address this fix; looks like I'll just have to work around it.

Do you know if I can display the process memory in the mathcad document itself? Then I can make a handle that warns red before the application crashes.

Werner_E
25-Diamond I
(To:Lemens)

So you have to pay PTC in order to tell them something...

In effect, yes. You can only open a support call if you have paid for maintenance. Unless of course a good soul amongst the PTC employees is scanning this forum and willing to report it to R&D department. The point is if the effect would be reproduceable. So the question in case somebody is willing to try - how big is the large data in clipboard? What size are we talking of here?

Do you know if I can display the process memory in the mathcad document itself? Then I can make a handle that warns red before the application crashes.

AFAIK there is no way to do that. Its a long standing wish to be able to do so and to free up memory in some way. MC has a rather bad memory management and e.g. memory taken up by matrices never gets freed even if the matrices are deleted (this in contrary to matrices created inside programs - here garbage collections works as it should).

But the effect you describe would mean that Mathcad is constantly scanning the clipboard to do whatever(?) if something is copied to it. Never heard of that before.

dschenken
21-Topaz I
(To:Lemens)

Look for Sysinternals Process Explorer for a more detailed reporter of process functions. It won't fix your problem, but it will provides a much better view of what's going on.

VladimirN
24-Ruby II
(To:Lemens)

Kenny Lemens wrote:

OVERVIEW:

1) I copy a large table from RISA-3D

2) Open a blank Mathcad Sheet ...

Why do not you first save this table in ".txt/.prn" or ".xls" format?

Kenny Lemens wrote:

... SPEC:

Mathcad 15.0 (15.0.0.436 [006041742]) -> MC15 M020 ...

PTC Mathcad 15 F000 = 15.0.0.436 [006041742]. Try to upgrade to the latest service release Mathcad 15 M030.

VladimirN.,


Initially, I was saving the data in ".xls" format, but Excel wasn't capable of the large copy and paste I was doing; that is to say that I had more than 65536 rows... a lot more to be exact. I could use a ".txt" and input the table that way into mathcad, but my problem isn't that Mathcad cannot handle the memory of the large amount of data (on the contrary, Mathcad handles the data VERY well) but that it cannot control itself when there is a large amount of data on the Clipboard. I think this is an OLE interface issue... because when Mathcad is busy (lets say an infinite loop I put it into constantly check memory usage) the memory does not rise, but as soon as I terminate this process; mathcad resumes its memory feeding frenzy.

M030 may address this problem, but I doubt it. I'm just going to work around it.

Cheers,

Werner_E
25-Diamond I
(To:Lemens)

M030 may address this problem, but I doubt it. I'm just going to work around it.

Find attached the readme for MC15 M030 with the list of fixes made.

Most noticable is the short description of a problem which was fixed in M020:

"2047116 Fixes a memory issue resulting in crash in certain copy and paste operations"

VladimirN
24-Ruby II
(To:Lemens)

Please provide your feedback if you upgrade to M030 service release.

I updated, and nothing changed; Mathcad Still leaks.

Announcements

Top Tags