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.

Creating multiple EasyDAClient objects, blocking

More
25 Jul 2016 17:53 #4256 by support
Your text is not very clear. It is formulated like a question, but it rather looks like that you are trying to report an issue, i.e. that you observing an indefinite "block" when creating the EasyDAClient. Is that how I should understand it? For the rest of my reply I will assume that this is the case; if not, please correct me.

You are not doing anything wrong, as far as I can tell. But, I have seen once a situation where a customer had a code similar to yours, and where the objects were created on separate threads. Under some circumstances, for some unknown reason, the creation of EasyDAClient blocked. We tried to debug the issue, but it did not give any conclusion. The code appeared to be stopped each time at different place, inside some of the Windows calls being performed. We then found that 1) the execution actually continued when the program received a user input - e.g. clicking and moving a mouse in its console window, and 2) moving the creation of the objects to the program's main thread resolved the problem. It remained an unresolved mystery, but the workaround worked well for the customer, and that's what the status of it is by now.

Why precisely do you need multiple cline objects?

How are you creating them - and these in separate threads?

What kind of project you have (e.g. desktop app, Windows service, etc. ?)

Thank you

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

More
25 Jul 2016 17:39 #4255 by support
From: B.
Sent: Monday, July 25, 2016 10:51 AM
Cc: L.
Subject: EasyDAClient creation

Hi Zbynek,
We have a some method that gets invoked multiple times, and has creation of OPC client, and then some processing. E.g.
            EasyDAClient client = LidlOPCHelper.CreateAndConfigureEasyDaClient();
            WritePOValuesToOpc(client, productionOrder);
We create the client like this:
        public static EasyDAClient CreateAndConfigureEasyDaClient()
        {
            EasyDAClient.SharedParameters.Client.UseCustomSecurity = false;
            EasyDAClient client = new EasyDAClient();
 
            return client;
        }
Is it possible that upon multiple invoking of this method, some of the things for EasyDAClient are not all automatically disposed, or we need to invoke some additional disposing, so creation of new client gets blocked and waiting for indefinite amount of time?

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

Moderators: support
Time to create page: 0.041 seconds