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.
- Forum
- Discussions
- QuickOPC-Classic in COM
- Reading, Writing, Subscriptions, Property Access
- Error in Live Binding when closing WPF Application
Error in Live Binding when closing WPF Application
We were able to reproduce the problem. It appears to do with the switching of the pages; when the application is closed, the Unloaded event does not get generated for the active Page.
We will think about how to prevent this in our code. For now, however, there is a workaround. Please add the following to PageWelcome.xaml.vb :
Class PageWelcome
Private Sub PageWelcome_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
AddHandler Dispatcher.ShutdownStarted, AddressOf Dispatcher_ShutdownStarted
End Sub
Private Sub Dispatcher_ShutdownStarted(sender As Object, e As EventArgs)
bindingExtender1.Online = false
End Sub
....
End Class
Public Sub unbindLiveBinding()
pointBinder1.Dispose()
End Sub
Please Log in or Create an account to join the conversation.
thank you. I have downloaded the attachment and removed it from the forum post. We are working on it.
The attachment was:
File Name: VB_Projekt...09-19.7z
File Size:13,954 KB
Regards
Please Log in or Create an account to join the conversation.
- treams-gmbh
- Topic Author
- Offline
- Senior Member
- Posts: 7
- Thank you received: 0
You will find a minimized project as an attachment. There is a screenshot from the Holding Mode when I close the application.
I removed the license file from the project.
If there is no need to keep the project in the forum, please delete it.
Regards
Attachments:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- treams-gmbh
- Topic Author
- Offline
- Senior Member
- Posts: 7
- Thank you received: 0
Yes, of course I can send you a minimized project. Where can i send it to?
My currently workaround is to dispose the Pointbinder before closing:
pointBinder1.Dispose()
Regards
Please Log in or Create an account to join the conversation.
we cannot reproduce the issue. Can you send a small project that would allows us to reproduce it here?
Best regards
Please Log in or Create an account to join the conversation.
- treams-gmbh
- Topic Author
- Offline
- Senior Member
- Posts: 7
- Thank you received: 0
I have implement a live binding in a WPF Application. The binding is working well but when I close the application i got the following error message:
(QickOPC 2018.3)
System.ArgumentException: OPC-DA subscription handle is invalid.
Parametername: handleArray[0]
bei OpcLabs.BaseLib.Utilities.ExceptionUtilities.CheckExceptions(IEnumerable`1 exceptions)
bei OpcLabs.BaseLib.LiveBinding.PointBinder.Operate[TPointActor](IEnumerable`1 pointBindings, Predicate`1 bindingPredicate, Func`2 getParametersFunc, Predicate`1 supportsPredicate, Func`2 getArgumentsTypeFunc, TPointActor actor, ArgumentDirections argumentDirections, Action`3 action, Func`3 succeededFunc)
bei OpcLabs.BaseLib.LiveBinding.PointBinder.InternalSubscribe(Boolean active, IEnumerable`1 pointBindings)
bei OpcLabs.BaseLib.LiveBinding.PointBinder.<>c__DisplayClass72_0.<Subscribe>b__0()
bei OpcLabs.BaseLib.LiveBinding.PointBinder.ExecuteOperationDirect(Action operation)
bei OpcLabs.BaseLib.LiveBinding.PointBinder.ExecuteOperation(Action operation)
bei OpcLabs.BaseLib.LiveBinding.PointBinder.Subscribe(Boolean active, IEnumerable`1 pointBindings)
bei OpcLabs.BaseLib.LiveBinding.PointBinder.Subscribe(Boolean active, IEnumerable`1 bindingGroups)
bei OpcLabs.BaseLib.LiveBinding.PointBinder.Subscribe(Boolean active, PointBindingGroup bindingGroup)
bei OpcLabs.BaseLib.LiveBinding.PointBindingGroup.ExecuteSubscribe(Boolean active)
bei OpcLabs.BaseLib.LiveBinding.PointBindingGroup.MakeLinks(Boolean make)
bei OpcLabs.BaseLib.LiveBinding.AbstractBindingGroup.set_OnlineBinder(AbstractBinder value)
bei OpcLabs.BaseLib.LiveBinding.BinderBase.SetGroupsOnlineBinder(AbstractBinder onlineBinder)
bei OpcLabs.BaseLib.LiveBinding.PointBinder.OnOnlineChanging(Boolean newValue)
bei OpcLabs.BaseLib.LiveBinding.BinderBase.set_Online(Boolean value)
bei OpcLabs.BaseLib.LiveBinding.BindingExtender.SetProvidersOnline(Boolean online)
bei OpcLabs.BaseLib.LiveBinding.BindingExtender.OnOnlineChanged()
bei OpcLabs.BaseLib.LiveBinding.BindingExtender.Dispose(Boolean disposing)
bei System.ComponentModel.Component.Finalize()
What can I do?
Thanks
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-Classic in COM
- Reading, Writing, Subscriptions, Property Access
- Error in Live Binding when closing WPF Application