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.

Unobserved Task Exception when Using EasyUAClient

More
07 Feb 2023 10:18 #11513 by support
Hello,
thank you for update.

Regarding the other exception, I was not aware of it, and with high probability, it is something that comes from the OPC Foundation stack layer, and was probably fixed in there, and I took over the fix by updating to a newer version of the stack.

Best regards
The following user(s) said Thank You: gkalipershad

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

More
06 Feb 2023 22:27 #11511 by gkalipershad
To close the loop on this - the user upgraded to latest build and confirmed this resolved the issue. My own testing confirmed the same. Thank you for the quick turnaround on this!

Furthermore, another customer approached me because they were receiving the following exception every time they introduced an EasyUAClient object:

+ InnerException {"Unable to cast object of type 'System.Net.Mail.SmtpClient' to type 'System.Net.HttpWebRequest'."} System.Exception {System.InvalidCastException}

Upgrading to the latest build resolved this issue as well. He was previously on 5.59.1034.1, so it is possible that another change in the toolkit addressed the problem, but I wanted to document here in case someone else ran into something similar.
The following user(s) said Thank You: support

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

More
01 Feb 2023 19:51 #11506 by gkalipershad

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

More
01 Feb 2023 19:49 #11505 by support
Hello,

this is now fixed in 5.70.1053.1.
I will send you an email with download info.

Best regards

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

More
30 Jan 2023 18:46 #11498 by gkalipershad
Yes, the user has requested a fix for V5.70.

Thanks,
GK

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

More
28 Jan 2023 16:49 #11494 by support
(Regarding the attachment: It is somewhat unexpected that in order for the attachment to appear in the post, one must first "add" it (select the file), and then "insert" it into the message. I myself got caught multiple times by forgetting to insert it. So that's the most likely reason. Size is also limited, but I have raised the limit quite high, and there is an error message when it is exceeded).

Thank you for the project. I was able to reproduce the error, and I can confirm it is a problem in version 5.70. And, it has already been fixed in the upcoming version 5.71, but that is not going to be released any time soon.

The error comes from an internal "warm-up" processing that is being done in order to force .NET to compile parts of toolkit code as soon as possible, so that the subsequent operations are executed faster. The warm-up code attempts a connection to an invalid address, which causes the exception. It is wrong that it happens, but it is essentially harmless.

With this explanation, is it required to provide a fix into version 5.70?

Best regards

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

More
26 Jan 2023 20:25 #11468 by gkalipershad
Perhaps the attachment didn't stick due to its size? Here is a download link instead: softwaretoolbox.sharefile.com/d-seab1364eae9c486bb388fc4a7c3a4cee

The error still occurs, but the application never crashes due to how the exception is being handled. I think we are trying to figure out where the exception comes from in the first place because it is only present one an EasyUAClient object is introduced.

Regards,
GK

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

More
26 Jan 2023 18:38 #11464 by support
Hello.

You forgot to "insert" the attachment.

But I probably know know where this might be coming from. Can you answer one question:
When the application is run *outside* the Visual Studio & debugger, does this exception crash the application?
Or is it just something that happens inside the debugger?

Regards

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

More
25 Jan 2023 17:30 #11462 by gkalipershad
QuickOPC 5.70.1012
.NET 6.0
VS2022
Windows 10.0.22621

The user set up a sample application that sets some shared static properties when the application starts, while also kicking off a task to do some other things. Once the GC kicks in, we see an Unobserved Task Exception occur around DNS. This only happens when there is an EasyUAClient object instantiated.

The following error is generated: Unobserved Task Exception: IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address. (Parameter 'hostname')

I have attached a sample Console application that highlights the problem. Please let us know if the error stems from something we are doing incorrectly, or if there is something happening under the hood with the EasyUAClient Object.
Attachments:

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

Moderators: support
Time to create page: 0.070 seconds