NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

UI Message Event --> Property Objects not released

Solved!
Go to solution

Hi,

 

I've been working on my custom OI for a while and I'm already using UserMessages to send data to my LabVIEW OI successfully. Everything is runing quite smoothly.

Today, I tried also to implement some some functionality for the build in UI Messages (e.g. UIMsg_ModelState_BeginTesting) which also works. But now TestStand gives me an error when shutting down.

nonreleased.png

 

Is there anything special I have to consider when using this messages? Haven't had this problems when only using UserMessages.

One more thing: since I'm still implementing some other things, I'm starting the UI from the development enviroment. When I'm closing the LV project after the above error has occured, the following one comes up:

runtime.png

 

Windows consequently reports LabVIEW as unresponsive and asks how to go on.

 

I'm using (still) LV2013SP1f5 and TestStand 2013 SP1. The UI makes heavy use of the Actor Framework. The test sequence I'm running is just a generic that keeps sending messages to the OI

 

Anybody any ideas?

 

Cheers

Oli

 

 

 

0 Kudos
Message 1 of 5
(4,555 Views)
Solution
Accepted by topic author Oli_Wachno

Most likely you are missing a close reference on a sequence context somewhere in your code.

 

-Doug

0 Kudos
Message 2 of 5
(4,534 Views)

Thanks for the suggestion.

 

I guess, I haven't described this thing entirely.... the problem only occurs when I extend my application using the UI Message callback (basically the same property node I register the User Message event with).  In doing so I don't create a new ref that needs to be closed.

0 Kudos
Message 3 of 5
(4,531 Views)
Solution
Accepted by topic author Oli_Wachno

Hi Oli,

 

what are you triggering in the OI when you filter out these additional user events in the UI callback? Does the shutdown error go away if you comment out the changes in the callback (only the callback ... not the handling code in the OI)?

 

My guess is that the the callback triggers an error in the OI which does not get cleared and on shutdown causes some of the clean up code to get skipped, hence unreleased references. I doubt that it is the specific user message per se which causes the problem.

 

Best Regards

 

Mathis

0 Kudos
Message 4 of 5
(4,527 Views)

Doug, Mathis,

 

the both of you pointed me to the right direction, thanks! Smiley Happy

 

What I've overlooked was that the TestStand UI Messages also always send a seqeunce context within the variant data.... which I just didn't handle.

So now, on recieving a UI Message, I just cast the variant to a Sequence Context Type and close it immediately.

No more reference leaks are being reported Smiley Very Happy

 

Cheers

Oli

0 Kudos
Message 5 of 5
(4,521 Views)