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.

Memory Leak in QuickOpc Library 5.72.1044

More
01 Aug 2024 08:16 #12982 by Andriy
Hello,
I finally got back to this issue. You are right, this is an unmanaged memory leak indirectly caused by QuickOPC library.
Your advice to disable the 'boxing' feature helped.
The BoxedAPI is quite unpredictable, so I would recommend disabling it by default.
Thanks for your assistance
The following user(s) said Thank You: support

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

More
10 Jul 2024 11:36 #12934 by support
Hello.

I do not know if I interpret the information correctly, but in my evaluation, there is no clear indication of a memory leak (in .NET managed memory). What I see is that the Heap Size, which was around 134 MB in Snapshot 1, has actually gone slightly down, to cca 126 MB, in Snapshot 7 (after >8 hours). Yes, it has gone up around 4 MB between Snapshot 3 and Snapshot 7, but given the nondeterministic behavior of .NET memory management, that is not a relevant increase. And yes, there is a large number of EasyDAItemChangedEventHandler objects, but the number itself is not a problem, they are short-living objects that can later be disposed.

So let's say the .NET heap size is not actually growing significantly - but the total consumed memory still is. That looks like unmanaged memory leak.
We have seen problems like this caused by a 3rd party component (BoxedApp) that QuickOPC uses. Can you please turn it off and see if the problem is affected? Here are the instructions:

kb.opclabs.com/How_to_disable_prerequisites_boxing

Regards

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

More
09 Jul 2024 16:32 #12930 by Andriy
Hello,
Thank you for the advice. After running the memory profiler in VS, I got the following results:


the list of snapshots:


It seems that instances of the OpcLabs.EasyOpc.DataAccess.EasyDAItemChangedEventHandler class are leaking somehow. Any guesses?
Attachments:

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

More
13 Jun 2024 18:45 #12872 by support
Hello.

Changes are listed on kb.opclabs.com/Versions (links under Key Changes - What's New Column), but I do not think anything relevant for this issue can be found there.

I suggest to try learn.microsoft.com/en-us/visualstudio/profiling/memory-usage?view=vs-2022 (as a minimum, the type of objects that are not being released should be possible to obtain). However, a reproducible scenario is always option #1.

Regards

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

More
13 Jun 2024 14:37 #12870 by Andriy
Hello,

.Net Core 6
We have encountered a memory leak after updating QuickOpc library to version 5.72.1044. The memory usage continually increases, ultimately causing the application to crash. Downgrading to the previous stable version 5.63.246, resolves the issue.
However, I cannot reproduce the problem with a test application.

I need your assistance in identifying the cause.
Could you provide the differences between these two versions?
Do you have any suggestions for detecting the issue?

Thank you in advance

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

Moderators: support
Time to create page: 0.052 seconds