NI TestStand

Showing results for 
Search instead for 
Did you mean: 

Top level Objects not released correctly - Custom UI

Go to solution

First off, I know that this has been a hot topic on the forums, I've trawled through plenty of examples but I still cannot specifically find the reason I am getting the following error:


The amount of objects not released correctly never changes.

Attached is the full log.


I am struggling to locate where I am making the mistake as there are alot of open references still. Could this be something to do with the fact that I load sequences through the API? I load both the process model and the sequence through the API, I'm using the "ReleaseSequenceFileEx" to release both the process model and the sequence. Is this enough?

0 Kudos
Message 1 of 8

When you exit your program, is the only thing that you're doing releasing sequence files? What code do you have in place when you exit your custom UI? 


What language are you using for your custom UI developments?

0 Kudos
Message 2 of 8

I'm using LabVIEW for my UI dev.


Here's a snippet of the exit code I am using


I believe that my issue is with my process model though, as if I set TestStand's station model to my custom process model, and run the sequence in the "Simple UI" (shipped with TestStand), I get the same result. If I re-do the sequence with the Sequential model selected, the warnings do not come up.


Any criticism on the exit method is welcome. I'm surprised that there isn't a nice clean method to end TestStand.

0 Kudos
Message 3 of 8

shouldn't you be unloading your sequencefile etc before you shutdown the Application Manager?



Ray Farmer
0 Kudos
Message 4 of 8

I've now made those changes and thanks, the warnings have reduced. I now get the following message:


References to PropertyObjects were not released properly.
    Total number of objects: 698
    Number of top-level objects: 9

    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:

        Executions [1 object(s) not released]

        Type Definitions [2 object(s) not released]
            Type Definition #1:
                Name: CommonResults

            Type Definition #2:
                Name: Error

        PropertyObjects [4 object(s) not released]
            PropertyObject #1:
                Type: Obj

            PropertyObject #2:
                Type: Array of Containers

            PropertyObject #3:
                Type: Array of Containers

            PropertyObject #4:
                Type: Array of Containers

        And the following uncategorized objects:

0 Kudos
Message 5 of 8
Accepted by topic author Lbee11

Have you still got an execution running or not released?

Ray Farmer
0 Kudos
Message 6 of 8

I realise that I was using a callback to close the execution reference, but the problem was the reference passed wasn't created yet, so it always resulted in an error (which was being masked somewhere).


I'm in the process of changing this to an event I can handle, but it certainly looks like this is part of the issue.

0 Kudos
Message 7 of 8

Issue was down to an execution reference lurking around. I'm now closing this reference on an event.



0 Kudos
Message 8 of 8