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.

Application crash in OPC code

More
30 May 2022 13:01 #10921 by spicerno
Thanks, version 5.63.215 is working properly

Best regards,
Stefano
The following user(s) said Thank You: support

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

More
28 May 2022 09:05 - 30 May 2022 11:14 #10919 by support
Thank you,
your information was quite helpful.

I think I was able to reproduce the issue. It could happen when there were two or more subscriptions to the same item, with different update rates (which is OK to do, and there is an optimization on our side which will internally make just one subscription with the fastest rate - and that is where the bug was).

We have made a fix. Please rebuild with version 5.63.215 or later, and retest.

Best regards
Last edit: 30 May 2022 11:14 by support.

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

More
27 May 2022 16:06 #10918 by spicerno
The application creates a fresh new EasyDAClient instance, connects to the server, and performs multiple subscribeMultipleItems calls .
Then the crash occurs and process / win service is terminated.

A new process/service is started automatically some minutes later by windows, but the outcome is always the same.

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

More
27 May 2022 16:01 #10917 by spicerno
From application log we successfully connect to the OPCDA server and perform multiple subscribeMultipleItems calls to subscribe all the signals we need to acquire.
The crash occurs before any event/notification reaches our code.

No dispose, or unsubscribe, or change subscription has been performed

Best regards,
Stefano

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

More
27 May 2022 11:32 #10915 by support
Hello,

yes, I agree - you are not doing anything wrong, this is a QuickOPC problem.

Can you specify which subscription-related methods you use in your program?
1) SubscribeItem/SubscribeMultipleItems (the answer if obviously Yes)
2) ChangeItemSubscription/ChangeMultipleItemSubscriptions?
3) UnsubscribeItem/UnsubscribeMultipleItems?
4) UnsubscribeAllItems?

In addition, do you repeatedly create (and then abandon on dispose of) EasyDAClient objects, or do you use one EasyDAClient object throughout the life of the program?

Thank you

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

More
27 May 2022 11:21 #10914 by spicerno
Hello,

the problem occurs in production on a customer environment.
We cannot reproduce the problem on our test environments.

However, whatever is the specific problem with this sever, the library should not drag the whole process to a crash
.
Is there any step I perform to provide you more diagnostic / logs from quick opc?
.
Regards,
Stefano

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

More
27 May 2022 10:40 #10913 by support
Hello,
do you have a reproducible scenario?

Best regards

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

More
27 May 2022 10:02 #10912 by spicerno
The same exception occurs even with the latest version of QuickOPC


Application: NeptuneDataCollector.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException
   at OpcLabs.EasyOpc.DataAccess.Implementation.HandleMappingEasyDAClient.GetInnerHandle(Int32)
   at OpcLabs.EasyOpc.DataAccess.Implementation.HandleMappingEasyDAClient.ChangeMultipleItemSubscriptions(OpcLabs.EasyOpc.DataAccess.OperationModel.DAHandleGroupArguments[])
   at OpcLabs.EasyOpc.DataAccess.Implementation.DelegatingEasyDAClient.InnerChangeMultipleItemSubscriptions(OpcLabs.EasyOpc.DataAccess.IEasyDAClient, OpcLabs.EasyOpc.DataAccess.OperationModel.DAHandleGroupArguments[])
   at OpcLabs.BaseLib.Collections.Generic.Extensions.IReadOnlyListExtension+<>c__DisplayClass6_0`1[[System.ValueTuple`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<IfThenElse>b__1(System.Collections.Generic.IReadOnlyList`1<System.ValueTuple`2<System.__Canon,System.__Canon>>)
   at OpcLabs.BaseLib.Collections.Generic.Extensions.IReadOnlyListExtension.IfThenElse[[System.ValueTuple`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.ValueTuple`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IReadOnlyList`1<System.ValueTuple`2<System.__Canon,System.__Canon>>, System.Predicate`1<System.ValueTuple`2<System.__Canon,System.__Canon>>, System.Func`2<System.Collections.Generic.IReadOnlyList`1<System.ValueTuple`2<System.__Canon,System.__Canon>>,System.Collections.Generic.IEnumerable`1<System.ValueTuple`2<System.__Canon,System.__Canon>>>, System.Func`2<System.Collections.Generic.IReadOnlyList`1<System.ValueTuple`2<System.__Canon,System.__Canon>>,System.Collections.Generic.IEnumerable`1<System.ValueTuple`2<System.__Canon,System.__Canon>>>)
   at OpcLabs.EasyOpc.DataAccess.Implementation.DelegatingEasyDAClient.DelegatedChangeMultipleItemSubscriptions(System.Collections.Generic.IReadOnlyList`1<OpcLabs.EasyOpc.DataAccess.OperationModel.DAHandleGroupArguments>)
   at OpcLabs.EasyOpc.DataAccess.Implementation.DelegatingEasyDAClient.ChangeMultipleItemSubscriptions(OpcLabs.EasyOpc.DataAccess.OperationModel.DAHandleGroupArguments[])
   at OpcLabs.EasyOpc.DataAccess.Implementation.HandleMappingEasyDAClient.ChangeMultipleItemSubscriptions(OpcLabs.EasyOpc.DataAccess.OperationModel.DAHandleGroupArguments[])
   at OpcLabs.EasyOpc.DataAccess.Implementation.EasyDAClientCompositor.ChangeMultipleItemSubscriptions(OpcLabs.EasyOpc.DataAccess.OperationModel.DAHandleGroupArguments[])
   at OpcLabs.BaseLib.Collections.Generic.Extensions.IEnumerableExtension.ForAll[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Action`1<System.__Canon>)
   at OpcLabs.EasyOpc.DataAccess.Optimization.Implementation.RequestChunkingEasyDAClient.ChangeMultipleItemSubscriptions(OpcLabs.EasyOpc.DataAccess.OperationModel.DAHandleGroupArguments[])
   at OpcLabs.EasyOpc.DataAccess.Implementation.DelegatingEasyDAClient.ChangeMultipleItemSubscriptions(OpcLabs.EasyOpc.DataAccess.OperationModel.DAHandleGroupArguments[])
   at OpcLabs.EasyOpc.DataAccess.Implementation.DelegatingEasyDAClient.ChangeMultipleItemSubscriptions(OpcLabs.EasyOpc.DataAccess.OperationModel.DAHandleGroupArguments[])
   at OpcLabs.EasyOpc.DataAccess.Implementation.HandleMappingEasyDAClient.ChangeMultipleItemSubscriptions(OpcLabs.EasyOpc.DataAccess.OperationModel.DAHandleGroupArguments[])
   at OpcLabs.EasyOpc.DataAccess.Implementation.StateLockingEasyDAClient.OnLastUnlockState()
   at OpcLabs.EasyOpc.DataAccess.Implementation.StateLockingEasyDAClient.UnlockState()
   at OpcLabs.EasyOpc.DataAccess.Optimization.Implementation.SubscriptionBlendingEasyDAClient.SubscribeMultipleItems(OpcLabs.EasyOpc.DataAccess.OperationModel.EasyDAItemSubscriptionArguments[])
   at OpcLabs.EasyOpc.DataAccess.Implementation.HandleMappingEasyDAClient.MappedSubscribeMultipleItems(System.Collections.Generic.Dictionary`2<Int32,OpcLabs.EasyOpc.DataAccess.OperationModel.EasyDAItemSubscriptionArguments>)
   at OpcLabs.EasyOpc.DataAccess.Implementation.DelegatingEasyDAClient+<>c__DisplayClass11_0.<SubscribeMultipleItems>b__1()
   at OpcLabs.EasyOpc.DataAccess.Implementation.DelegatingEasyDAClient+<>c__DisplayClass110_0.<QueueBackEndAction>b__0()
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at OpcLabs.BaseLib.Threading.WorkItem.Execute()
   at OpcLabs.BaseLib.Threading.FifoExecution.ProcessQueuedItems(System.Object)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
 

Any advice ?

Best regards,
Stefano

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

More
26 May 2022 09:57 #10902 by support
Yes, that is the same thing.

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

More
26 May 2022 09:52 #10901 by spicerno
nuget.org reports 5.63.194 as the latest version available, published 14 days ago.
is it the same as 5.63.194.1 ? if not, where can I obtain the .1 version ?

Best regards,
Stefano

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

Moderators: support
Time to create page: 0.074 seconds