- Posts: 4
- 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.
EasyUAClient StackOverflowException
Best regards,
F.
Please Log in or Create an account to join the conversation.
The fix will go into upcoming QuickOPC 2018.2, which should be released in less than a week.
I do not know whether your license covers the new version. If not, let me know I will arrange a free upgrade, because it was really beneficial to have this discovered and resolved.
Best regards
Please Log in or Create an account to join the conversation.
I will test on Czech version (give me some time) and let you know here.
Regards
Please Log in or Create an account to join the conversation.
1. Was that on 32-bit or 64-bit system? – All are 64bit
2. Do you know whether it also happens on English version of Windows? This is weird – English version is OK. Czech W7 generating StackOverflow issue (Tested on 3 independent computers).
3. Do you know whether it also happens on Windows 10? - Windows 10 seems to be OK as well (English).
It’s not related to the second issue – I have found the second issue during the investigation of the first – wasn’t sure if it’s related to the assembly returned by AssemblyResolve, but we clarified it.
And one more thing – I noticed there is no issue with previous version…5.51.465.1
Thank you,
F.
Please Log in or Create an account to join the conversation.
I used your project, and the precise QuickOPC version. I did not have precisely the same operating system and .NET Framework in my test, though. Let me ask:
1. Was that on 32-bit or 64-bit system?
2. Do you know whether it also happens on English version of Windows?
3. Do you know whether it also happens on Windows 10?
Best regards
Please Log in or Create an account to join the conversation.
We do not fire this event directly. It is, as usually, fired by the CLR when the assembly is not found. What we do is that we hook a handler to it, and for the assemblies that we can provide internally (they are stored as resources inside our library), we resolve them.
There can be multiple handlers to AssemblyResolve. But if one of them throws, it means that the assembly cannot be loaded. So, your handler can prevent our handler from getting chance to resolve it.
Best regards/ S pratelskym pozdravem
Please Log in or Create an account to join the conversation.
AssemblyResolve was originally used for diagnostic of missing assemblies. This event was always fired whenever the CLR tried to bind to an assembly and fails. Now it is fired from the OpcLabs.BaseLib, but RequestingAssembly is NULL - this never happened before and Null wasn’t expected. So I can easily fix this exception.
Now I understand the requested assembly (in the next event call is the Opc.Ua.Client, Version=1.3.342.0 requested) is resolved somehow and I don’t have to take care about it?
Best regards
F.
Please Log in or Create an account to join the conversation.
I will first answer the second part of your post, because that is probably easier.
QuickOPC hooks its own handler to the AssemblyResolve event, and uses it to load some dependent assemblies that it internally uses. This is done so that you, as a developer, do not have to distribute too many assembly files.
It is possible that your AssemblyResolve handler conflicts with this mechanism. What do you in your handler when you are passed in an assembly name that you do not know how to load? It should *not* throw. It must return null, so that the assembly resolution can continue. It can only throw if the assembly name is recognized but cannot be loaded.
I will reply to the first part after I try it out.
Best regards
Please Log in or Create an account to join the conversation.
I have started to implement the QuickOpc to my older project, but I came across the StackOverflowException. It seems it happens inside of the OpcLabs worker thread…
This problem can be reproduced inside of new empty project (has been sent to your e-mail already). If you change the CurrentThread.CurrentUICulture first and then create the instance (new operator or take SharedInstance) of EasyUAClient it crashes. If you create the instance first, then it works.
I also noticed, when AppDomain.CurrentDomain.AssemblyResolve event is registered before you create instance of the EasyUAClient the following exception is thrown:
System.TypeInitializationException: 'The type initializer for 'OpcLabs.EasyOpc.UA.Toolkit.UAClientEngineBase' threw an exception.'
FileLoadException: Could not load file or assembly 'Opc.Ua.Client, Version=1.3.342.0, Culture=neutral, PublicKeyToken=6faddca41dacb409' or one of its dependencies. Neplatný ukazatel (Exception from HRESULT: 0x80004003 (E_POINTER))
QuicOpc version 5.52.184.1
OPC UA
Windows 7 prof. CZ
.Net 4.5.2
MSVS 2015 prof.
Do you have any ideas?
Thank you in advance,
Frantisek
Please Log in or Create an account to join the conversation.