TestStand References to PropertyObjects Were Not Released Properly

Updated Oct 30, 2023

Reported In

Software

  • TestStand
  • LabVIEW

Programming Language

  • Python
  • C# .NET

Issue Details

I'm using the TestStand API to run sequence files and I'm see the following message at the end of my execution: 
References to PropertyObjects were not released properly.
    Total number of objects: 1114
    Number of top-level objects: 35

    Note: Some top-level objects may be included if they are referenced by
    an incorrectly released top-level object. For example, an unreleased
    SequenceContext object references a SequenceFile object.

    The following top-level objects were not released:

       Sequences [1 object(s) not released]
 
A pop-up is displayed similar to: 
TestStand Dialog Warning.png
 
 

Solution

This message is showed when the reference to a sequence has not been released. This can be a variety of objects, but check the Sequences [X object(s) not released] for details of which references have not been released.

To resolve this: 
  • Call the Engine method ReleaseSequenceFileEx after explicitly opening a sequence file using the NewSequenceFile or GetSequenceFileEx methods.
  • Verify the options you have selected for the GetSequenceFileEx and ReleaseSequenceFileEx functions after referring to the linked documentation above.
  • Refer to the TestStand API examples for a guide. These are found in C:\Users\Public\Documents\National Instruments\TestStand <YOUR VERSION>\Examples\TestStand API\Executing Sequences Using API. Choose the folder that matches your language. For Python, refer to .NET as the closest example.

Alternatively, you can hide this behaviour by disabling the option. But this only prevents the pop-up. Leaving open references could lead to a memory leak in your deployment. 
To disable the feature:
  1. Open TestStand.
  2. Select Configure >> Station Options...
  3. Select the Preferences tab
  4. Select Debug Options...
TS Debug Options.png
  1. Uncheck the Report Object Leaks box
TS Report Object Leaks Option.png
 
Refer to Debug Options Dialog Box for further information.

If using LabVIEW or LabWindows/CVI, make sure you are using LabVIEW and TestStand versions compatible. Check the compatibility in TestStand Compatibility with LabVIEW and LabWindows/CVI

 
 

Additional Information

For information about debugging components of a TestStand test program refer to Debugging TestStand Test Programs .