NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory Leaks in TS3.0 OI's

Using TestStand 3.0, LV 7.1(witht 7.1.1 Update), Win2K, 3GHz P4, 512Mb.

Have written a custom OI, (Sort of based on the Simple OI that ships with TS3.0, but heavily tweeked).
Now I've had problems with memory leaks...... I've read the other posts on this issue and they don't seem to answer these problems.

Now going back a step, To confirm I'm not doing something stupid, I ran the OI's that ship pre-built with TS, with the "Benchmark.seq" sequence about 10-15 times(Tracing ON, Reports ON, Test UUT Entry Point). This seems to show that each run "leaks" about 92Kb each run. Now that doesn't seem much but test 1000units a day, and that will eat up around 100Mb of RAM, and that ridiculous! Its not the report in this case as thats only a few lines of text

With the OI that I've built up, leaks about 112Kb of RAM on the same Sequence. I'm not using the standard controls (eg Execution View) to display the progress, but using the Trace message to get what test last executed and putting the value in a table, I'm sure I've close off the references and acknowledged the UI messages recieved from TS when I've finished using them(using mainly the Close Reference.vi on all refs/SequenceContexts/Property Objects....ect, and acknowledging the UI Message when finished with it)

When running a "Real" test sequence on a test rig the situation is many times worse(can be 100's Kb per run depending it seems on the size of results file), I assume as the results are stored somewhere in TS between UUT runs.

Questions:
Why is there what seems like memory when leak running TS(even with the prebuilt OI's)?

How to minimise this leaks?

Which refs need particular attention, and whats the right method of closing them properly?

How to purge the TS runtime engine of the stored results between each run in "Test UUT's", and get it to free up the memory? (I assume this is why the memory it rising alot while testing with a sequence running real tests).

Does this happen with TS3.1?



Any help much appriciated, as this problem is really slowing things down here.
0 Kudos
Message 1 of 5
(3,313 Views)
Hi

There could be many reasons why the OI could be showing the leak.
1. In the code module
2. In report generation - There is a known Internet explorer bug which has been worked around in TestStand 3.1 This only effects Html and XML reports.
3. Database logging
4. Process models calls to code modules.

To help narrow the problem can you try each the following separately to help narrow the source of the leak.

1. Disable report generation
2. Disable database logging
3. Go back to the original process model if you have made changes.
4. Use the shipping Operator interface and an example sequence

Regards
Anand Jain
National Instruments.
0 Kudos
Message 2 of 5
(3,272 Views)
As far as tracking it down, it definately seems to be the report generation that is causing the problems, althought there is a minor "leak" when running with tracing enabled(about 1kb a run).
You mention a problem in the XML/HTML reporting with has been worked around in 3.1. Is there a fix for 3.0?
0 Kudos
Message 3 of 5
(3,252 Views)
Hi

If you are sure that you are leaking when you generate html/XML reports, then you should consider upgrading to 3.1.
The changes to work around a leak in IE is very extensive and is not available for TestStand 3.0
Below is the text from TestStand 3.1 readme which gives you more details.

"In TestStand, the sequence editor report tab and the Custom UI Report control use the Microsoft Internet Explorer ActiveX control to display html and XML reports. Each time the Internet Explorer control updates the report, the Internet Explorer control does not always release its internally allocated memory. If the control is updated continuously over an extended period of time, the TestStand process memory use increases. TestStand 3.0 used the control in a way such that the failure to release memory occurs more often. TestStand 3.1 contains workarounds that limit the amount of memory the control fails to release. Note that when using on-the-fly reports, the Internet Explorer control is only used when the control is visible. "

You can also consider using txt reports, which will also confirm that it is related to html/XML reports and not anything else.

I hope helps.
Regards
Anand Jain
National Instruments.
Message 4 of 5
(3,237 Views)
Thanks for the explaination. I'll try and get the company for to fork out for TS3.1, this will save me a load of hassle for me.
Many thanks for you answer.
0 Kudos
Message 5 of 5
(3,232 Views)