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: 

Clarify Closing of TS Object References

Solved!
Go to solution

I'm getting the dreaded Out of Memory errors and "References to PropertyObjects were not released properly" pop up in TestStand 2013.  I'm tracing my references and I think I found the culprit, but I am not sure how to apply the fix.

 

In making the attached VI, I followed the advice about closing parent references to automatically close child references.

http://www.ni.com/tutorial/14393/en/

Did I mis-read this article?  Does closing the parent reference only work on VIs, not TS objects?  My guess is that I'm interpreting it incorrectly.

 

So now I have the attached VI that probably needs more reference closures than I have.  My question is how many do I need and where do I place them?  Do I have to put close some references in the FOR loop?

 

Normally, I'd mess around to figure this out myself, but to see the out-of-memory issues in TS and the PropertyObjects pop-up, I have to run TS for several hours.  That debug cycle is too long for me, so I'm here seeking some advice.

 

Thanks for the help.

 

TestStand 2013

LabView 2015 SP1

0 Kudos
Message 1 of 3
(3,031 Views)
Solution
Accepted by topic author jrasco

Honestly, there is a lot of correction for that VI is needed, but you are right - you must close all opened references.

You need to do it in opposite order, than there were opened. For example:

Open Refs Order: SeqContext -> Module -> LabVIEW Module -> Parameters -> LabVIEW Parameters

Close Refs Order: LabVIEW Parameters -> Parameters -> LabVIEW Module -> Module -> SeqContext

 

You can accumulate references in For Loop, and then close array of them.

 

And regarding Sequence Context reference - maybe I'm wrong, but what I saw, that one can leave it not closed, and while running from TS, it will be handled automatically. But if you open some childs objects from it - you need to close those objects.

 

Just give it a try, and hopefully you'll solve it easily.

 

Sincerely, kosist90

 

logos_middle.jpg

0 Kudos
Message 2 of 3
(3,019 Views)

kosist,

Thanks for confirming my hunch.  After implementing the fix, the program is working much better now with no memory leaks.

 

The closure of the context reference was done because I was following that app note about closing the parent to auto close the children.  As part of the fix, I removed that particular reference closure.

0 Kudos
Message 3 of 3
(2,977 Views)