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.

Unable to handle EasyUAClient with CreateInstanceFromAndUnwrap()

More
13 Dec 2023 09:38 #12475 by support
Hello,
thank you for letting me know.

It is OK to have here posts that turn out to be user errors. It is normal. I prefer to keep everything. It can also help others (and us) in similar situations.
But, if you insist on deleting this forum thread, let me know and I will do it.

Best regards

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

More
13 Dec 2023 09:29 #12474 by lolo1988
OK, I've solved my issue : after connecting to the remote server (whatever its nature - opc, ni-visa, etc), I sent an identification command which wasn't opc compliant at all.
The raised exception was hard to analyse, though.

So that's definitively not on OPCLabs side :)

I'm sorry for posting this question without fully debugging my code before, maybe moderators can delete my post?

Anyway, thank you for the kind attention.

Laurent

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

More
12 Dec 2023 16:47 #12473 by support
Hello,

it *can* still be something on our side. And I am quite willing to look into it; but without a repro, it's somewhere between very difficult and impossible.

Best regards

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

More
12 Dec 2023 16:11 #12472 by lolo1988
My simple project does NOT exhibit the issue, so it must be a problem with the whole VS solution : different System.Diagnostics versions between projects, deeper compiler/builder verifications, etc...

Anyway, the issue doesn't seem of the OPCLabs side.

Regards,
Laurent

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

More
12 Dec 2023 13:47 #12471 by lolo1988
Hello,

I use (licenced) OPC Labs QuickOPC 2023.2.

I can't share the actual VS project, because of huge inter-dependancies, but I'll try to make a simple project which exhibits the issue, and will share with you.

Regards,
Laurent

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

More
12 Dec 2023 13:41 #12470 by support
Hello.

Which QuickOPC version are you using please?
Can you send over a minimal reproducible example (a project)?

Thank you

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

More
12 Dec 2023 13:21 #12469 by lolo1988
Hello,

.NET 4.7.2 project in VS 2022 Community, the following code in a function seems to work :
obj = AppDomain.CurrentDomain.CreateInstanceFromAndUnwrap(fichier, "Remote.Remote");
with "Remote.Remote" an implementation of a modular device dialog using OpcLabs.QuickOPC \ EasyUAClient class (not component).
"obj" is returned not null and contains all the implemented members as expected. No exception occurs at that time, some controls have time to be display updated with some of obj members, but after a few seconds, the following exception is raised :
System.TypeInitializationException
  HResult=0x80131534
  Message=Une exception a été levée par l'initialiseur de type pour 'OpcLabs.EasyOpc.UA.Implementation.NetSdk.Client.EasyUAClientEngineBase'.
  Source=OpcLabs.EasyOpcUA
  Arborescence des appels de procédure :
   à OpcLabs.EasyOpc.UA.Implementation.NetSdk.Client.EasyUAClientEngineBase.CurrentDomainOnUnhandledException(Object sender, UnhandledExceptionEventArgs unhandledExceptionEventArgs) 
dans OpcLabs.EasyOpc.UA.Implementation.NetSdk.Client\EasyUAClientEngineBase.cs :ligne 113
 
  Cette exception a été levée à l'origine dans cette pile des appels : 
 
Exception interne 1 :
MissingMethodException : Méthode introuvable : 'System.Diagnostics.ActivitySource OpcLabs.BaseLib.Diagnostics.Managed.ActivitySourceManager.ProtectedGetActivitySource(System.String)'.
I struggle with managing the origin of such an exception...
Have anyone already encounter such an issue?

Thanks,
Laurent

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

Moderators: support
Time to create page: 0.078 seconds