NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Teststand shows messags saying objects were nog released after closing.

Plz help,

 

I took over a test stand project from my colleague and i am having problems after closing teststand.

I am getting an error message stating object where not released and i have no clue what i need to do to fix this issue (This is my first teststand project). 

 

I added the message below and the complete content of the message as a added txt file.

 

error message.png

 

 

Any help is appreciated.

 

Kind regards,

Richard

0 Kudos
Message 1 of 9
(219 Views)

Judging from the error messages, somewhere wiothin your project, the two files mentioned in the error message are opened via  Engine.GetSequenceFileEx

method.

This method returns a reference to the SequenceFile object, which needs to be closed via Engine.ReleaseSequenceFileEx.

 

Step 1.) Find out, where the references are stored.

Step 2.) Find out, from where thea are accessed

Step 3.) Find out an apporpriate time and place, where they can be closed. 

 

Step 3.) is really depending on what you find out in 1.) and 2.)

0 Kudos
Message 2 of 9
(212 Views)

I dont think i call those functions myself, are they automatically called whenever i call a subsequence from the main sequence?

0 Kudos
Message 3 of 9
(208 Views)

Are you using a custom process model?

 

In any case, you can go and search your project using CTRL+F search function

Or take the hardcore way.... rename those sequences and check, where the runtime errors pop up

0 Kudos
Message 4 of 9
(200 Views)

I'm sorry what do you mean by custom process model?

 

For the Ctrl-F result, thanks for the tip i did not know that was an option.

 

when i search for Engine.GetSequenceFileEx i get 0 results sadly, the only results i get for searching Engine. are some 'Runstate.Engine.is64bit' statements.

0 Kudos
Message 5 of 9
(173 Views)

When you use SinglePass or TestUUTs to execute a sequence, it is actually embedded into a very sophisticated code which implements things like the UUT Serial Entry Dialog, Report Generation, ....

 

You can see this quite easily in the Sequence Editor 

 

Oli_Wachno_0-1759752523562.png

 

If this says SequentialModel / BatchModel or ParallelModel, you might (if noone has misused it) use the standard, which doesn't create errors as you describe.

 

Another thing, which is possible (but makes tracking very hard if you haven't created the code yourself): the TestStand API allows to call the GetSequenceFileEx also form Code Modules (LabVIEW / .net ( Python/ ....)

So maybe, you might want to try the hard way and rename those files to force an error from the function call

 

0 Kudos
Message 6 of 9
(168 Views)

Hi,

 

Thank you for the quick responses.

I looked at the environment and it says the sequential model is being used.

The sequence does use Python and Labview codes which are being called upon from the teststand sequence (using python and labview steps). furthermore there are also 2 added libraries included for Comport communication and TCP IP communication (via DLL's).

 

I dont know what you mean by the Teststand API, is that what is underlying being used whenever we use a labview VI or python Code in the sequence?

0 Kudos
Message 7 of 9
(164 Views)

@RiBe_Act wrote:

Hi,

 

[...]

The sequence does use Python and Labview codes which are being called upon from the teststand sequence (using python and labview steps). furthermore there are also 2 added libraries included for Comport communication and TCP IP communication (via DLL's).

 

 


My guess ist that one or more of these Python / LabVIEW calls either read some information from or write information to these files after opening them, but the programmer forgot to release those references.

 


@RiBe_Act wrote:

 

I dont know what you mean by the Teststand API, is that what is underlying being used whenever we use a labview VI or python Code in the sequence?


TestStand offers an interface (what I refered to API earlier on) that allows you to interact with TestStand (more precisely the engine).  There is a lot of stuff which can be done using this interface.

 

 

 

0 Kudos
Message 8 of 9
(157 Views)

FWIW, that dialog tries to identify the most likely root cause of such leaks by ordering what is reported. The Engine expose the API Engine.GetSequenceFileEx, and SequenceAdapter.GetSequenceFile to add what I would call an edit-reference to a file and requires calls to Engine.ReleaseSequenceFileEx to release them. All the objects that the opened file creates will also be listed in some way by that dialog, but the file reference is likely the root cause for this dialog.

You might need to methodically pair-down your system to find the root cause by trying to eliminate functionality until the issue stops:

  1. Disable result processing plug-ins
  2. If not using the built-in process models, try using them.
  3. Start skipping/removing code from client sequence file
  4. Can you test with an almost empty client sequence file

At some point the leak dialog will not appear, then adjust to narrow down the root cause.

 

 

Scott Richardson
https://testeract.com
0 Kudos
Message 9 of 9
(114 Views)