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.

Handle Leak / Memory Leak using OpcLabs.EasyOpc.DataAccess

More
28 Apr 2020 12:57 - 28 Apr 2020 12:57 #8415 by support
Hello,
we do not officially support QuickOPC 5.35. I can provide any answer to the extent the version 5.35 is same or similar with the current version.

The suggested workaround was to add all three "<add key...>" entries to the configration.
What you then need to have or install depends on the OPC technology you are using. The C++ redistributable and OPC Core Components are needed if you are using OPC Classic, the UA Certificate Generator is needed if you are using OPC UA.

You have indicated that the C++ redist is clear. Assuming that you are using OPC Classic, you then just need the OPC Core Components, and you can get them here: opcfoundation.org/developer-tools/samples-and-tools-classic/core-components/ . (Installer packages are not in the current 3.00.108 version but in some earlier versions).

Regards
Last edit: 28 Apr 2020 12:57 by support.

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

  • jrcody38
  • Visitor
  • Visitor
28 Apr 2020 11:48 #8413 by jrcody38
Hi,

Picking up on this thread a little late.

We have noted a very similar handle leak when using QuickOPC-5.35. There is a consistent increase in abandoned Mutant Handles attributable to our .NET Windows Forms app which utilises the QuickOPCClient.

Can you provide further insight as to which pre-requisute installations map directly to the config entries you have suggested. Do we have to install ALL of the ones listed in the folder provided by OPC (C:\Program Files (x86)\OPC Labs\QuickOPC 5.3\Redist) or just a subset of them? I have attached a screenshot of the links to the available installations which are in the OPC Redistributables folder as well as the actual links themselves (one of the links appears to be dead also by the way).

1) That is C++ redistributable. That is clear
2) ?
3) ?

1: <add key="OpcLabs.EasyOpc.Native.Assemblies.EnableVC120RedistBoxer" value="false"/>
2: <add key="OpcLabs.EasyOpc.OpcPSBoxing.EnableOpcCodePSBoxer" value="false"/>
3: <add key="OpcLabs.EasyOpc.UA.Toolkit.UAClientEngineBase.EnableUACertificateGeneratorBoxer" value="false"/>


Available Links:
1) opcfoundation.org/developer-tools/developer-kits-classic/core-components/ DEAD LINK
1-A) opcfoundation.org/developer-tools/samples-and-tools-classic/core-components IS THIS THE CORRECT ALTERNATIVE??
2) www.opclabs.com/files/downloads/QuickOpc/5.35/OPC-UA-SDK-1.0...-Interop-Components-Redist.zip
3) opcfoundation.org/developer-tools/samples-and-tools-unified-...re/local-discovery-server-lds/
4) www.microsoft.com/en-us/download/details.aspx?id=40784


Thanks,

Johnny
Attachments:

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

More
06 Feb 2017 13:57 #4930 by support
You need to install the Visual C++ Redistributable: See the user's guide (Concepts) for version 3.5, chapter 12.13 Prerequisites Boxing.

The download links for the individual prerequisites for such
case are installed with QuickOPC, under the Redist folder (“3rd-party Redistributable Packages”
from the program group under Start menu).

That's precisely what is expected to happen. The problematic part which virtualized this prerequisite but is causing the handle leak is now turned off, hence the need to install the additional stuff.

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

More
06 Feb 2017 13:39 #4929 by JV
Hello,

Thanks again for you quick response.

The following two keys:
<add key="OpcLabs.EasyOpc.OpcPSBoxing.EnableOpcCodePSBoxer" value="false"/>
<add key="OpcLabs.EasyOpc.UA.Toolkit.UAClientEngineBase.EnableUACertificateGeneratorBoxer" value="false"/>
don't seem to do much in our setup, they don't generate any errors but don't stop the problem either. It seems like they are not read and as such ignored (please correct me if I'm wrong).

The key <add key="OpcLabs.EasyOpc.Native.Assemblies.EnableVC120RedistBoxer" value="false"/> generates following error:

"An unhandled exception of type 'System.TypeInitializationException' occurred in Microsoft.VisualStudio.HostingProcess.Utilities.dll

Additional information: The type initializer for 'NS_IMCCommunication.Main' threw an exception."

It seems that the parameter is found but initialization fails. Do I do something wrong?

I will add the entire project in attachment for you reference.
Attachments:

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

More
06 Feb 2017 12:29 - 06 Feb 2017 12:52 #4928 by support
Hello.

I have looked into the archive for version 5.35, and there are some differences indeed. With version 5.35, please try the settings below instead.
<appSettings>
    <add key="OpcLabs.EasyOpc.Native.Assemblies.EnableVC120RedistBoxer" value="false"/>
    <add key="OpcLabs.EasyOpc.OpcPSBoxing.EnableOpcCodePSBoxer" value="false"/>
    <add key="OpcLabs.EasyOpc.UA.Toolkit.UAClientEngineBase.EnableUACertificateGeneratorBoxer" value="false"/>
</appSettings>

Note that the "namespaces" in 2 of the settings have changed, a different version of C++ redistributables is reflected in the name (120 vs. 140), and that in version 5.35 there is basically a typo in the name of one of the settings (EnableOpcCodePSBoxer instead of EnableOpcCorePSBoxer), but that's how it was back then, so the settings have to use it that way too.

Regards
Last edit: 06 Feb 2017 12:52 by support.

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

More
06 Feb 2017 11:27 #4927 by JV
Hello,

Thanks for your quick reply.

I added the application settings as stated in the article you provided ("kb.opclabs.com/How_to_disable_prerequisites_boxing").
For now this doesn't solve the problem.

Maybe I add them in a wrong way or it are indeed different setting-names for this version as you stated in your reply.
I added the current 'App.Config'-file as an attachment.

Kind regards,

JV
Attachments:

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

More
04 Feb 2017 17:14 #4925 by support
Hello,

thank you for reporting this. I was able to reproduce the issue, and I have determined that it is caused by a 3rd party library that we use. For this reason, we cannot immediately fix it, and will have to deal with the vendor of that library to see if they can provide a fix.

Fortunately, there is a workaround - the library is not essential, and it is possible to disable its usage. The affected part of the functionality is Prerequisite Boxing, described here: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...ml#Prerequisites%20Boxing.html .

Based on this need, I have written a Knowledge Article describing how to disable the boxing. It is here: kb.opclabs.com/How_to_disable_prerequisites_boxing .

I have tested the problem and the workaround with the current version, 2016.2 . It should hopefully also work with version 5.35. If it does not, let me know and I will have a further look at it. It is possible that the older version may have different names for the settings (in which case I will look them up for you) or that it does not have the capability at all (in which case an upgrade to a newer version will be necessary).

Best regards

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

More
03 Feb 2017 17:24 #4921 by JV
We encountered a handle leak/memory leak using OPCLabs QuickOPC DA in .NET.
The code is written in VB.NET.
Once we reference "OpcLabs.EasyOpc.DataAccess" anywhere in the code (instantiating a "EasyDAClient" of even just setting a parameter) the standard timer "System.Threading.Timer" starts leaking handles about linearly with the timer-frequency.

To observe the problem I stripped the application to the bare foundations.
The timer calls a sub that only executes:
Console.WriteLine("HandleCount: " & System.Diagnostics.Process.GetCurrentProcess().HandleCount)

Nothing else, but it there is still a handle leak implying a memory leak (resulting in 100% RAM usage after a while).

Is there any known issue with this?

You will find the stripped down version of the code in attachment + a screenshot of the referenced dll's.
There is no handle leak if everything reffering to OPCLabs is commented out.
Once any of the OPCLabs-lines is enabled again the memory/handle leak appears.
(e.g. line 15, 16, 23 ,24 or 25)

I use QuickOPC-5.35 (specifically build 5.35.442.1)
(A valid license was obtained for QuickOPC 5.22-5.3x Standard, with maintenance untill 23-11-2017)
Attachments:

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

Moderators: support
Time to create page: 0.065 seconds