NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

calling sequence in a new thread multiple times gives debug warning "reference not released properly"

Hi,
 
I am including steps inside a sequence which calls sub sequences in a new thread. After calling each sub sequence in a new thread, I am putting Wait step which is configured to wait for the respective sub seueqnce to complete its execution. When I include these steps (call a subsequence in a new thread and then configuring wait to complete it) once, it executes properly but when I includes these steps twice, I get debug warning when I close Teststand sequence editor. Due to this behaviour, when I run this sequence through operator interface (Simple OI), I get run time error R6025.
 
I checked if there is any object reference which might not be released, but could not figure it out here. Please see attached sequence and the debug warning message.
 
Used version: Teststand 4.0.1, LabVIEW 8.5, Windows XP
 
Kindly help.
 
Thanks in advance,
Nirmal
 
 
Download All
0 Kudos
Message 1 of 9
(3,931 Views)
Adding to my previous post, please see the correct sequence as attached.
Message 2 of 9
(3,930 Views)
Hi Nirmal,
 
I checked your lastest attachment on my TS 4.0 maschine. I let it run under UUT with NI - Sequential Model. I also checked that under StationOptions->Preferences the flag
Report Object Leaks is checked for my maschine.
I got no leaks !
 
So what do you called twice ?
Are you using original Ni Models ?
In some ealry projects i got this message, too. But the cause was bad model programming of myself !!
In your example (this is what i call simple, great!) i can not see any mistake.
 
Greetings
 
juergen
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 3 of 9
(3,918 Views)
I too am unable to reproduce this problem with 4.0.1f1. Does this happen every single time on a clean run of the sequence editor for your? Have you customized anything such as the frontend callback, station callbacks, or process models that could also be the source of this leak? Have you tried reproducing this on a clean install of teststand?

-Doug
0 Kudos
Message 4 of 9
(3,894 Views)

Hi Juergen, Doug,

Thanks for your prompt response.

I am using Ni's original Sequential Model. Calling twice means that I am calling two sub sequences each in a new thread and waiting for each of them to complete their execution.

To get the debug waring,

1. Open the attached sequence in the sequence editor

2. Run this sequence through Test UUTs (infact any execution entry point can be used)

3. After executing once, stop the sequence by pressing the Stop button in the Serial Number entry dialog box. You will get the test report.

4. Close the test report and this sequence.

5. Exit from the sequence editor.

Once you exit, you should be able to see the debug warning dialog box. If you do the same operation through the LabVIEW simple operator interface, a run time error (R6025) occurs once you exit from OI.

Regards,

Nirmal

0 Kudos
Message 5 of 9
(3,873 Views)

Hi Nirmal

I have tried it once more on my maschine as you descriped it. On the exit there will be no error message unless Messageing is activated.
I am using TS 4.0.0.326 and you 4.0.1

What happens if you start the editor and let an empty sequence (strg+n) running(F5) and close the editor again.

If the message is still there the Model or Frontendcallback (FrontEndCallbacks.seq) differs from release date.
If no message  the Types SequenceCall, NI_Wait, Statement may differ or are loaded for wrong file path (Search directory)

The best would be as Doug said try running it on a reinstalled TS-maschine

hope this helps

juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 6 of 9
(3,850 Views)
Hi Nirmal,

Thanks for the detailed instructions. I tried exactly what you said and I still do not see the leak. The problem is likely specific to something customized on that machine or in the very least does not happen every time or on all machines. I'd recommend trying to narrow down by eliminating the possibility of an unintended customization. If you can try installing a clean install of teststand on a clean machine and see if you can still reproduce the problem then that would help narrow things down a little. If you can't reproduce it on a clean install on a clean machine then I'd start looking at what's different on the machine you can reproduce it on. You could remove your config files to eliminate customizations to settings such as search directories. You could remove files from your components\User directory to eliminate the possibility of using those. Just a few ideas. Other people might have some other ones.

-Doug
0 Kudos
Message 7 of 9
(3,835 Views)
Hi juergen and Doug,
 
Thanks for your responses.
 
I tried it installing in a desktop with fresh Teststand, it works. Then I tried to run my st sequence (in the same PC) which calls a customized process model, after that I started getting this debug warning.
 
After talking to NI, it was found that in custom process model sequence, by disabling the ExecMask_TraceAllThreads-(Value: 0x800), memory leak (debug warning) disappears.
 
Regards,
Nirmal
0 Kudos
Message 8 of 9
(3,706 Views)

Hi Nirmal,

but this does not slove the memory leak! You have just hidden your leak.
So let's "hope" your system never crash.

 Greetings

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 9 of 9
(3,703 Views)