NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple UI exit error

Solved!
Go to solution

open28_0-1583138167635.png

Hi, 

I Just designed the GUI based on the teststand default simple GUI. I just add the function that is to transport the variable between Teststand and labview . Attached please find software. The running process is OK but it would get an error the picture shows after I click the "EXIT" button. I am very confused about it . 

I really hope someone can help me find the reason. 

Thank you in advance!

 

 

open28

Download All
0 Kudos
Message 1 of 6
(2,232 Views)

Generally that error occurs because you are not releasing a sequence file or other TestStand object properly.  I ran you code (GUI and foo.seq) and didn't see any issues.  My guess is that you are passing the sequence context into a VI in a different sequence file and using the TestStand API to open objects and do stuff to them and not closing the references properly.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 6
(2,193 Views)

HI, jigg

Please allow me ask you a follow up question. 

How can I release the a sequence file or other TestStand object in the GUI code? Actually, I think when i close the GUI, it may release all resource. Because in the GUI shutdown case, i saw there is a process to release the teststand engine resource. If the Teststand engine resouce released, all resources of teststand would be released.

 

Besides, do you mean this error happen in the teststand code? not in the GUI code?

 

Thank you for your response!

 

open28

0 Kudos
Message 3 of 6
(2,177 Views)

Hi, jigg

attached please find my sequence file.

I have found  the main error happened at using the PostUImessageEX to pass the thiscontext reference to labview GUI.

Actually i don`t know why it could occur this error.  

0 Kudos
Message 4 of 6
(2,169 Views)
Solution
Accepted by topic author open28

Ok this one was a tricky one but I think I figured it out.  You actually have 2 issues happening.

 

The first is captured in UIMessageConvertSequenceContext.png attached.  For some odd reason you need to convert the sequence context from a variant to a reference before passing it to your event.  Also, I highly recommend that you move the property node for doing this inside of the case structure.  You never know when another UIMessage will send ActiveX data that is not a sequence context and then you'll run into worse issues.

 

The second one is that you need to close the sequence context inside of your event (CloseSequenceContext.png attached). 

 

Also, my advice is that what you are doing seems like it could be a huge cause for worse headaches down the road.  I would just handle the issue inside of your callback VI and not try to pass the sequence context back to your main VI.  The reason I recommend this is that once your callback VI completes execution it returns back to TestStand.  TestStand will then continue on and could be done with that sequence context by the time your UserEvent starts to handle it.  Therefore you could be dealing with a destroyed sequence context in your user event.  Basically you are opening up yourself to race conditions.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Download All
0 Kudos
Message 5 of 6
(2,152 Views)

Hi, jigg

Thank you for your help . I have solved this problem after follow your advice. 

Besides, I want to know. If there is any good idea to pass the variant between Teststand and LABVIEW? I am a newcomer of teststand.

Thank you again!

0 Kudos
Message 6 of 6
(2,141 Views)