08-18-2009 02:20 PM
I have a LabVIEW v8.5 application that is built as an ActiveX server. If this program is directly started (double-click the .exe), then when it is exited there is no error. If this program is started in response to an Automation Open from another LabVIEW v8.5 application (ActiveX client), then when the server is exited the following error appears:
This error appears whether the client has an opportunity to close the Automation refnum or not before the server is shutdown (the server can be shutdown either by the client or by the direct intervention of the user). What can be causing this (pointer) error ?
08-19-2009 05:53 PM
lgk,
Hello! A few questions for you.
1.) Once you do the Automation Open call from the client, do you try to access anything within the server from the client?
2.) Does this error happen when the ActiveX server exe is started via the client's Automation Open Call? or sometime later in the code?
3.) Do you error handling in your code?
4.) Can you simplify your code down to the bare amount that causes this issue?
5.) Can you post a screenshot of the section of your code that does the Automation Open?
08-19-2009 10:12 PM
Post the code or an image for us to look at please.
Battler.
08-20-2009 02:25 PM
Ben: Thank you for your response.
Following your questions:
1.) After the Automation Open the client gets (in a timed polling loop) and sets the values of many controls in the server, using a Virtual Instruments Invoke Node (GetControlValue and SetControlValue). This all appears to be working fine; the client is an alternate user interface that controls the server program and it works.
2.) The error message relates to the server and occurs when the server terminates (the program disappears and then the message pops up). I suppose that the error could happen at any time after the Automation Open and is only reported on program termination, but that's a guess on my part.
3.) No explicit error handling in the server. In the client I do chain together the error outputs and inputs of the Automation calls. I have observed no error from a probe at the end of the chain (the Close Reference VI).
4.) As a last resort, there's a number of other things that I must get out of the way before I can devote the time necessary for this exercise.
5.) Sure, I have posted a screenshot of the Automation Open, see attached.
08-21-2009
03:33 PM
- last edited on
04-02-2025
04:58 PM
by
Content Cleaner
lgk,
Thanks for answering so quickly!
Are you using the close reference function to close your references? If not, I would suggest doing so. I looked at your code and I didn't see this included.
09-15-2009 10:46 AM
Ben:
Yes, I am using a close reference on the application refnum.
Today, I added a close reference on the VI refnum, also.
Closing the VI refnum in addition to closing the application refnum did not change the behavior, I'm still getting the error message after the server terminates.
09-16-2009 02:50 PM
lgk,
Could you post your code such that we could look at it and possibly determine the issue?