- Posts: 15
- Thank you received: 0
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.
Speed up reading OPC values
thanks again for the support.
Now I try to find a solution.
When I find the problem I will update this post.
Best Regards
Sacha
Please Log in or Create an account to join the conversation.
I have spent many hours on this. In the end, I came to conclusion that the memory leak is caused by Xojo, and that most likely, Xojo has not just one, but multiple bugs in the area of COM objects ("OLE Automation").
I do not want to go to all technical details of how I investigated it, because that would take me several hours as well. But, to prove the point, I have made a super-simple Xojo application that only uses one COM library - the commonly used FileSystemObject from Microsoft. This library (and QuickOPC as well) works without memory leaks in any other tool I met.
Here is the code:
Dim FileSystemObject As New OLEObject("Scripting.FileSystemObject")
Dim Folder As OLEObject
Folder = FileSystemObject.GetFolder("C:\Windows")
Do
Dim Files As OLEObject
Files = Folder.Files
Dim i As Integer
For i = 0 To Files.Count - 1
Next
App.DoEvents 10
Loop Until False
If you run it, you will see that it is increasingly consuming more and more memory, but there is no reason for that in the source code. I am using Xojo 2020 Release 1.2.
These problems have to be fixed by Xojo.
Best regards
Please Log in or Create an account to join the conversation.
I was now able to reproduce the issue.
It is a complicated matter, I will need some time to investigate.
I will post here when I have an update.
Best regards
Please Log in or Create an account to join the conversation.
To load OPCLabs.AutomationUtilities you needs your AutomationUtilities.wsc file.
See forum: www.opclabs.com/forum/quickopc-com--4/2897-testing-demo-version-with-xojo
To register 64bit wsc file you need regsvr32 file located in windows/sysWOW64 directory.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Now you can start and stop the thread.
Regards
Sacha
Please Log in or Create an account to join the conversation.
I cannot get your app to work. And I am missing better instructions as to what to do.
If I start it and then press the "Start thread" button, I get a NilObjectException at line
ReturnedList = EasyDAClient1.ReadMultipleItems(RequestList)
If I start it and then press the "Load" button, I get "Invalid class string" exception at line
Dim AutomationUtilities As New OLEObject("OPCLabs.AutomationUtilities")
Regards
Please Log in or Create an account to join the conversation.
Every call needs 10MB memory.
I tested it until 3GB and then I stopped the threads.
After 1 hour memory usage was not decreased .
Best regards
Please Log in or Create an account to join the conversation.
I have received your email with the XoJo project.
How long have you observed it running and how big was the memory increase?
Regards
Please Log in or Create an account to join the conversation.
The increasing memory would only be a problem if it continues to grow indefinitely - and that cannot be be found by running it a couple of times.
If you believe there really is a problem, put together and send to us a small *complete* program that, when run, will increase the memory so that when observed with proper tools (PerfMon) for extended period of time, will show an unstopping trend.
Best regards
Please Log in or Create an account to join the conversation.