Hi,
I am facing a crash on easyUAClient.ReadValue(). See the code below. My code is unable to catch the crash. See the attached screen capture. The bolded line is crashing. See the attached screen captures. The OPC server is ProSys UA.
Can you please check what is the reason for the crash?
Thank you.
Michael
Try
If UA_Security_Annonymous Then ' Jul-18-2021
ValueResult = easyUAClient.ReadValue(MyServerURL, values(i).NodeId.ExpandedText, UAAttributeId.DataType)
Else
ValueResult = easyUAClient.ReadValue(gdsEndpointDescriptor, values(i).NodeId.ExpandedText, UAAttributeId.DataType)
End If
Catch opcException As OpcException
The crash details are:
OpcLabs.EasyOpc.UA.OperationModel.UAException
HResult=0x80131600
Message=An OPC-UA operation failure with error ID 'Opc.UA.StatusCode=0x80340000' occurred, originating from '' and with depth of 1. The inner exception, of type "OpcLabs.EasyOpc.UA.UAStatusCodeException", contains details about the problem.
Source=OpcLabs.EasyOpcUA
StackTrace:
at OpcLabs.EasyOpc.UA.IEasyUAClientExtension.ReadValue(IEasyUAClient client, UAReadArguments readArguments)
at OpcLabs.EasyOpc.UA.IEasyUAClientExtension.ReadValue(IEasyUAClient client, UAEndpointDescriptor endpointDescriptor, UANodeDescriptor nodeDescriptor, UAAttributeId attributeId)
at EBO_Browse.Form1.GlobalTagBrowse_UA(String MyServerURL, String MyServerName, String MyGroup) in D:\MyBin\Proj-VS2017\EBO-OPC Client\Configuration(1)\Form1.vb:line 306
at EBO_Browse.Form1.AddOPCItemsToolStripMenuItem_Click(Object sender, EventArgs e) in D:\MyBin\Proj-VS2017\EBO-OPC Client\Configuration(1)\Form1.vb:line 958
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at EBO_Browse.My.MyApplication.Main(String[] Args) in :line 81
Inner Exception 1:
UAStatusCodeException: Status is not good: {BadNodeIdUnknown}. The node id refers to a node that does not exist in the server address space.
+ The node descriptor used was: NodeId="nsu=urn:DEV2017:OPCUA:SimulationServer ;ns=1;g=de16a2ac-efd5-452c-aca7-bc2b8ff0ead8".
+ The client method called (or event/callback invoked) was 'ReadMultiple'.