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.

"External component has thrown an exception." in SubscribeItem

More
19 Jan 2011 10:42 #208 by support
W.,

I have made a change that is very likely to fix the problem, although I was not able to verify it because I have no “repro”.
The fix will be in today’s build (QuickOPC.NET 5.04.43.1), which I will send to you when it is ready.

Best regards,
Zbynek Zahradnik

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

More
15 Jan 2011 09:06 #206 by support
W.,

I have found something in the code that can explain this exception, in multithreaded situation. I will try to fix together with the timeout setting issue; I will let you know when it is ready.

Regards,
Zbynek Zahradnik

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

More
15 Jan 2011 08:28 #205 by support
From: W.
Sent: Friday, January 14, 2011 9:44 PM
To: Zbynek Zahradnik
Subject: RE: Error Explanations - The SubscribeItem call fails because an "External component has thrown an exception"

Zbynek,

Their application is multi thread and they may be unsubscribing from a different thread. They are using it in a .net windows service. Let me know if you have other questions.

Thanks,

W.

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

More
15 Jan 2011 08:27 #204 by support
W.,
.....

Are they calling SubscribeItem and UnsubscribeItem from multiple threads?
Also, do I get it right from their comments that the component is used in .NET application that runs as Windows service?

Thanks
ZZ

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

More
15 Jan 2011 08:26 #203 by support

From: W.
Sent: Thursday, January 13, 2011 10:47 PM
To: Zbynek Zahradnik
Subject: Error Explanations

Hello Zbynek,

..... I have some thoughts on this and would like your expert opinion. The customer has proposed a workaround ..... I will comment on that ...... error and the workaround below the error

.....

The SubscribeItem call fails because an "External component has thrown an exception"

System.Runtime.InteropServices.SEHException = {"External component has thrown an exception."}
Source = "EasyOpcDANet"
StackTrace = " at AfxThrowInvalidArgException() at OpcLabs.EasyOpc.DataAccess.CDAInnerPump.StartEvents(CDAInnerPump* ) at CEDAAbstractPump.Activate(CEDAAbstractPump* ) at OpcLabs.EasyOpc.DataAccess.EasyDAClient.SubscribeItem(DAItemGroupArguments arguments) at OpcLabs.EasyOpc.DataAccess.EasyDAClient.SubscribeItem(ServerDescriptor serverDescriptor, DAItemDescriptor itemDescriptor, DAGroupParameters groupParameters, Object state) at
InnerException = Nothing

This error is correlated with service startup and shutdown (especially premature shutdown of the service before it has finished subscribing all of its tags). The occurrences of this exception during premature shutdown are a negligible concern. Although it's very rare, we HAVE seen this error arise spontaneously during otherwise-normal service runtime, so we can't ignore it completely.

Proposed workaround: when this exception occurs, retry the SubscribeItem call and hope that the error goes away.
Have you seen this error before. This is one I am not sure about. I guess retying is the best option but would like to know if you have any insight on this error.

Thanks in advance for you time.

W.

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

Moderators: support
Time to create page: 0.052 seconds