From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory leak

Hi All.

I have a strange memory leak problem.

I tried to cut down my problem, and I think I have a good clue now.

I have tried to run my OI for about 1 hour, no memory leak here..
Then I load a seq from my OI (its a system seq that has to run the full time (Disable Result Recording for all Steps is chosen)), then the memory leak starts.
Then I have cutted my seq down to a "do while" loop, and disabled the record results for both steps (just to be sure), then I can see that for the first couple of minutes, then it doesn't increase in memory allocation, but then something is happening, and it then increase with about 20-30Kb every second.

Why ??????

This seq is of course running without a seqmodel

As I see it then my OI has no problem with memory.... it must be something inside teststand...
0 Kudos
Message 1 of 8
(3,920 Views)
Hi

Can you please post a TestStand sequence which reproduces this problem.

Thank you
Anand Jain
National Instruments.
0 Kudos
Message 2 of 8
(3,908 Views)
Hi

I have been in touch with NI here in denmark, and the supporter have spoken with some other people and the conclusion for now, is that everything I am doing seems to be OK, so now my case is sent to Austin (don't know the name), it seems to be a bug in TS...or an unwritten feature 🙂

I have broken it down to that if I have enabled tracing, then it eats 20Kb of memory each second (after about 5 seconds of running), and that is when I have only have a do while loop as a seq (still all logging disabled, and no processmodel). If I then remove my UIMessage Event Callback, then it stops to eat memory. It doesn't matter if the callback is empty or not.

Attached is a quick version of the Simple OI from NI, this will start up the seq (also in the zip file) from c:\ (so copy the seq to that location).
Please keep in mind that I have hided the execution in the OI, if you want to see it then change the 1 to a 0 in the NewExecution call (you properly know), this will lower the memory increasing to about 4kb every second.

I will post here again if I hear something from other sources.

Kind regards Thomas
0 Kudos
Message 3 of 8
(3,900 Views)
I have been able to reproduce the problem by using the default OI and adding a UIMessageEvent Callback VI. I will need to investigate a little further to try to identify the source of the problem, and will give you an update as soon as I do.

Allen P.
NI
0 Kudos
Message 4 of 8
(3,884 Views)
Hi Allen,

I too have been able to reproduce the problem and have created a CAR about it.
Let me know if you need further details.

Regards

Anders Meister
NIDK
0 Kudos
Message 5 of 8
(3,877 Views)
From our initial testing, it appears that this only occurs when handling all UI Messages through event callbacks. Normally, you would not need to handle the default messages, as the manager controls will automatically handle them. Is there some particular reason why you are trying to handle all UI messages and not just User Messages?

All signs at this time point to a leak in LabVIEW. I will be sending this information to the LabVIEW group to examine further. The best solution may be to try to avoid this situation from happening in the first place.
0 Kudos
Message 6 of 8
(3,852 Views)
Hi Allan.

Nice to hear that you have found a workaround for now, there is no particular reason why I used all UIMessages, so I have no problems with changing to only user messages, so this is done, and it seems to work.

Looking forward to hear the result from the Labview group....

Kind Regards Thomas
0 Kudos
Message 7 of 8
(3,830 Views)
Thomas -
Just wanted to let you know that if you use AfterUIMessageEvent instead of UIMessageEvent, the leak does not appear to occur. This suggest that the in/out Cancel parameter for the UIMessageEvent might be related to the problem.
Scott Richardson
0 Kudos
Message 8 of 8
(3,775 Views)