TestStand References to PropertyObjects Were Not Released Properly

Updated May 13, 2025

Reported In

Software

  • TestStand
  • LabVIEW

Programming Language

  • Python
  • C# .NET

Issue Details

I'm using the TestStand API to run sequence files, and I 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 shown when a reference to a sequence has not been released. This can involve various objects, so check the Sequences [X object(s) not released] for details on 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 by referring to the linked documentation above.
  • Refer to the TestStand API examples for guidance. These can be 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.
  • If creating a new instance of the Engine using .NET, refer to the resource Starting and Shutting Down TestStand from a .NET User Interface for additional considerations regarding the management of object references, how to release them correctly and prevent leaks.

 

Alternatively, you can hide this behavior by disabling the option. However, 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 option in the Debug Options Dialog Box:
TS Report Object Leaks Option.png
 

If you are using LabVIEW or LabWindows/CVI, ensure that you are using compatible versions of LabVIEW and TestStand. Check the compatibility in the TestStand Compatibility with LabVIEW and LabWindows/CVI documentation.