Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

After EasyDAClient Dispose some OPC DA Server does not shutdown.

More
09 Feb 2015 06:08 #2741 by Emilio
Good morning Zbynek,

yes I agree.
We have to release this week, after that we have some time (not a lot but enough) to switch to the new OpcLabs version and see what happens.

From now on we shall avoid the name conflicts with OPC DA Servers. Unfortunately we are talking of released products, therefore up to now we have to deal with it.

Thanks for support,
best regards,
Emilio

Please Log in or Create an account to join the conversation.

More
07 Feb 2015 15:41 #2735 by admin
Emilio,

I did not know (or, I forgot) about how the AppId entries look like. You are right, there seems to be some dependence on the executable file names (or process names). I am not sure how it precisely works, though. I think that, in general, it should that it is not an ideal practice to give two different COM out-of-process servers the same executable file name, because they would end up being treated as either a single DCOM "app
", or worse, or only of them (the one registered last) will be a manageable DCOM "app".

Anyway, it seems that you are going to ship whatever you have now. And, you will then consider switching to latest QuickOPC (5.32, as of now), right? If so, it would really be best to investigate this with QuickOPC 5.32 only, because there were some issues with EasyDAClient/EasyAEClient.Dispose that were fixed in 5.32. If we see the problem with 5.32 as well, we would then investigate in depth.

Do you agree?

Please Log in or Create an account to join the conversation.

More
06 Feb 2015 08:04 #2732 by Emilio
Hello Zbynek,
thanks for the prompt reply!

I can give you some more explanation.

About downloading the new OpcLabs version (we are currently using the 5.23): actually we make our first release of the current product next week, therefore I would not change the OpcLabs right now...I'm sure that it would work but, if anything happens, then we might have some unexpected trouble.

Later we shall release a second version, with some functionality more. I can download the newest OpcLabs just after the very first release, that sounds good.

By the way, I'm using OpcLabs also in our OPC UA Server, as a wrapper from OPC DA Servers. There I don't have at the moment any rush, therefore I could try to use the newest OpcLabs already now.

About the current problem, I tell you first why I suspected that the file name MIGHT play a role.
After 15+ years of COM/DCOM (mainly OPC) I found out yesterday that the file name (without path) is a KEY in the HKEY_CLASSES_ROOT/AppID section in the Registry.
And also in some other section.
If you look there, you also see the opcrtkit.exe.

Obviously if tho different OPC servers have the same name, at least the registration does not look very clean...

I've tried to change the file name and register again, actually I had to do more job because of internal details that I don't mention here for simplicity, the problem is not solved but it is somehow better.

What I mean: if 3 different servers, with different names, are running at the same time, when I dispose the EasyDAClient (after unsubscribe all parameters) sometimes 2 are released, sometimes only 1, never all the three.

When they have the same name then only one is released, 100% of the cases.

Conclusion: I'm not sure where the problem is now. The file names are different, the code inside the servers (which is basically only a wrapper of the OPC interface, our code comes after in form of .NET plugin) is the same, although they are three different processes.

Shutting down other DA client, ex. Softing DEMO DA Client, then also all the three DA servers shutdown.

If this give some idea to you, you are welcome to share your inputs.
I don't see the problem in the OpcLabs software, I just wanted to know whether you see something, or it happened already, just share some experience.

Do you think I should send you the servers?
I do not want to disturb you of course, but if we reach the point that I should try it here and send some result to you, then it would be much easier do it there directly.

Anyway I will go futher on with analysis, maybe I'll find something else.

Thanks for support,
best regards
Emilio

Please Log in or Create an account to join the conversation.

More
05 Feb 2015 16:38 #2720 by support
Emilio,

This is odd, because on our side, we do not really "know" or work with the information about the server EXE names or locations etc. All we use are the ProgIDs or CLSIDs, and the rest of the work is done for us by Microsoft COM.

But of course I trust you that this is happening. If we do not find the solution in remotely on a few steps, I will ask you to send me the servers for test. But let's try some things first:

Which version are you using? If it is QuickOPC 5.32, or if you can switch to it, I have just recently made some fixes that related to Dispose-ing. They were not specifically for the case you described, they were rather such that the behavior could have been unpredictable -which means that it can also manifest in about any way, including yours. If you can, please download the current build (5.32.1063.1 or later), rebuild your app, and retest.

If you cannot use version 5.32, let me know.

Plus, a question: Do you suspect that the cause is that the names are same, or maybe just because they are built using the same code? I mean, if you simply rename the EXE and change the registry entry, will the problem disappear?

Best regards

Please Log in or Create an account to join the conversation.

More
05 Feb 2015 14:20 - 05 Feb 2015 15:47 #2718 by Emilio
Hello,

I have a problem that occurs only in a specific situation, luckily reproducible 100% of times.

The good case:
Our application starts OPC DA Subscriptions with many different OPC DA Servers.
When we close the application, we call on the EasyDAClient objects (they are exactly two) first UnsubscribeAllItems(), then they are disposed and then set to null.
All the OPC DA Servers are released as expected.

The bad case:
We developed an internal OPC DA Server Toolkit, based on a toolkit that we have bought, to allow our partners to create their own OPC DA Server.
If we have more than one such server connected at the same time, the name of the EXE is the same (one can also see these names in the Task Manager) obviously the COM / DCOM registration parameters are different. They are also installed in different paths.

Everything works fine until we close our application.

After that, we see that exactly one of these OPC DA Servers is released, all the other ones stay running. One has to kill them in Task Manager, if needed.

This problem occurs only with these servers, where apparently the only "possible" odd thing is that they have the same EXE name, but not path, CLSID, APPID and anything else.

If I connect the servers with a (for example) the OPC DA Softing Demo, then I disconnect them, they go all released.

Do you have any idea about that?

If required, I can easily send two such servers, each of them is just a couple of files...

Many thanks,
Emilio

I noticed that always the first DA server that was started for subscriptions is also released. The other ones not.
I can seed this if I change the order of starting subscriptions.
Last edit: 05 Feb 2015 15:47 by Emilio. Reason: Further analysis done.

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.054 seconds