02-02-2016 10:42 AM
I have code (in LV 2015) that modifes a step in a TS sequence (TS 2014), changing the sub-sequence being called.
The code works, but an error is thrown (indicating resources haven't been released), and in the end LabVIEW crashes. Strangely, the resources that it' complaining about are ones that I haven't accessed.
Here us the offending code:
It is the conversion of the Module reference to a SequenceCallModule that seems to be causing the trouble.
Here is the dialog box that appears:
Here us the complete text of the error:
References to PropertyObjects were not released properly.
Total number of objects: 1024
Number of top-level objects: 17
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:
Type Definitions [5 object(s) not released]
Type Definition #1:
Name: SeqCallStepAdditions
Type Definition #2:
Name: SequenceArgument
Type Definition #3:
Name: NI_SequenceParameterResult
Type Definition #4:
Name: Expression
Type Definition #5:
Name: Path
And the following uncategorized objects:
SequenceCallModule (SeqCallStepAdditions)
Name: SData
SequenceCallModule (SeqCallStepAdditions)
Name: SData
SequenceCallModule (SeqCallStepAdditions)
Name: SData
SequenceCallModule (SeqCallStepAdditions)
Name: SData
SequenceCallModule (SeqCallStepAdditions)
Name: SData
SequenceCallModule (SeqCallStepAdditions)
Name: SData
SequenceCallModule (SeqCallStepAdditions)
Name: SData
SequenceCallModule (SeqCallStepAdditions)
Name: SData
SequenceCallModule (SeqCallStepAdditions)
Name: SData
SequenceCallModule (SeqCallStepAdditions)
Name: SData
SequenceCallModule (SeqCallStepAdditions)
Name: SData
SequenceCallModule (SeqCallStepAdditions)
Name: SData
Can anyone tell me what I need to do the release resources after changing a subsequence call?
Solved! Go to Solution.
02-02-2016 10:56 AM
I don't see a close reference for the Module or the Step objects.
02-02-2016 11:19 AM
The code is in a subVI/ The step reference is passed to it, and closed by the caller.
I had thought that the Close Reference should close the module because the SequenceCallModule reference should be the same as the Module reference.
But it's not. When I added a Close Reference for the Module the problem went away.
Thanks.
Apparently using Vartiant To Data to change the type of a reference doesn't just change the type, but rather creates a new reference.
02-02-2016 04:10 PM
Yes you are correct. Using variant to data makes a copy, not a typecast.
So you always need to close both references.
Glad it is working now.
Cheers,
04-09-2017 10:47 PM
Hi All,
I tried this method, I am not able to run the Subsequence.
Thanks
Saran
04-10-2017 04:18 PM
Hello Saran!
In the future, it would be best to create a new thread to ensure a faster response.
However, for me to understand, you added a close reference after the Module Unload Invoke Node in the code above? I have included a screenshot of this implemented below. After doing this, you were still unable to run the subsequence successfully? It is also important to consider that the above code is in a subVI, so the Step Invoke Node at the end will also need to have a Close Reference VI.
Best,
Casey L.
Applications Engineer