10-28-2015 10:06 AM
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.
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:
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
Solved! Go to Solution.
10-29-2015 08:35 AM
Most likely you are missing a close reference on a sequence context somewhere in your code.
-Doug
10-29-2015 09:00 AM
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.
10-29-2015 09:24 AM
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
10-29-2015 10:05 AM
Doug, Mathis,
the both of you pointed me to the right direction, thanks!
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
Cheers
Oli