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.

Precondition failed: attributeDataResultArray.Length == readList.Count

More
20 Jul 2016 08:09 #4247 by Erik
Hello,

Correct, old links works. Just didnt get an email when you replied to this "new" topic yesterday. No harm done, got the mail off the other topic and found my way here.

Best regards,

Erik

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

More
20 Jul 2016 07:59 #4246 by support
Thank you - that (= multiple servers) explains it.

I do not think that forum thread splits generate an email notification. The associated old URLs still work (and cause an internal redirect), therefore such notification is not strictly necessary.

Best regards

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

More
20 Jul 2016 07:51 #4244 by Erik
I must have missed this thread split (did not get an email). But thank you!

For your information: yes, we do have multiple servers to read from.

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

More
20 Jul 2016 07:45 #4243 by support
This issue is fixed in QuickOPC 5.40.302.1. This build is now on our public Web site for download, and in NuGet gallery.

We have also found a reason why this issue might not appear in version 5.35, so it looks like that you were right about it.

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

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

More
19 Jul 2016 10:49 #4240 by support
Thank you for reporting this. It is a bug on our side. We will fix it (into version 5.40) and deliver together with the other fix (crash when "endpoint domain mismatch" is to be displayed).

Note that contrary to your statement, this problem appears to be present both in version 5.35 and 5.40, but only if the ReadMultipleXXXX call references more than one server session. In this case, the code splits, and works on these in parallel - and that is where the bug is located.

You can either be intentionally reading data from more than one server (that would be OK), or you might have, by mistake, used a slightly different endpoint descriptor for the same intended target server (that would work but is ineffective, because it open two separate sessions).

Best regards

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

More
13 Jul 2016 10:06 - 13 Jul 2016 12:20 #4228 by Erik
Hello,

I might have spoken to soon...

When I call the following code:
List<UAReadArguments> uaItems = new List<UAReadArguments>();
 
//Fill uaItems ~110 times
uaItems.Add(new UAReadArguments(endpointDescriptor: new UAEndpointDescriptor(descriptorString: mlcComProperties.Property.Module.MachineConfigurations[mlcComProperties.ModuleSequenceNumber].PLC.UAAddress),
    nodeDescriptor: new UANodeDescriptor(expandedNodeIdText: nodeIdText)));
 
OpcLabs.BaseLib.OperationModel.ValueResult[] uaReadResults = _uaClient.ReadMultipleValues(uaItems.ToArray());

I get a a crash stating: Precondition failed: attributeDataResultArray.Length == readList.Count and with the following stack trace:
System.ArgumentException: Precondition failed: attributeDataResultArray.Length == readList.Count
   at System.Diagnostics.Contracts.__ContractsRuntime.Requires[TException](Boolean condition, String msg, String conditionTxt)
   at OpcLabs.EasyOpc.UA.Implementations.NetSdk.EasyUAEngine.BeginReadList(UASmartSession smartSession, List`1 readList, UAAttributeDataResult[] attributeDataResultArray, AsyncCallback userCallback, Object stateObject)
   at OpcLabs.EasyOpc.UA.Implementations.NetSdk.EasyUAEngine.Read(ICollection`1 readListDictionary, UAAttributeDataResult[] attributeDataResultArray)
   at OpcLabs.EasyOpc.UA.Implementations.NetSdk.EasyUAEngine.ReadAttributes(UAReadArguments[] readArgumentsArray, EasyUAAdaptableParameters adaptableParameters)
   at OpcLabs.EasyOpc.UA.Implementations.NetSdk.NetSdkEasyUAClient.<>c__DisplayClass29_0.<ReadMultiple>b__0()
   at OpcLabs.EasyOpc.UA.Implementations.NetSdk.NetSdkEasyUAClient.DisposeGuard[TResult](Func`1 func)
   at OpcLabs.EasyOpc.UA.Implementations.NetSdk.NetSdkEasyUAClient.DisposeGuardNotNull[TResult](Func`1 func)
   at OpcLabs.EasyOpc.UA.Implementations.NetSdk.NetSdkEasyUAClient.ReadMultiple(UAReadArguments[] readArgumentsArray)
   at OpcLabs.EasyOpc.UA.ForwardingEasyUAClient.ReadMultiple(UAReadArguments[] readArgumentsArray)
   at OpcLabs.EasyOpc.UA.ForwardingEasyUAClient.ReadMultiple(UAReadArguments[] readArgumentsArray)
   at OpcLabs.EasyOpc.UA.LicensingEasyUAClient.ReadMultiple(UAReadArguments[] readArgumentsArray)
   at OpcLabs.EasyOpc.UA.EasyUAClient.ReadMultiple(UAReadArguments[] readArgumentsArray)
   at OpcLabs.EasyOpc.UA.IEasyUAClientExtension.ReadMultipleValues(IEasyUAClient client, UAReadArguments[] readArgumentsArray)
   at DGpS.Business.JobOPCManager.GetValuesFromMLC() in D:\Projects\Scada\HMI\Main HMI\DGpS.Business\JobOPCManager.cs:line 315
   at GenericUserControls.UserControls.LoadRecipe.GetFromMLC() in D:\Projects\Scada\HMI\Main HMI\GenericUserControls\UserControls\LoadRecipe.cs:line 1523
   at GenericUserControls.UserControls.LoadRecipe.LoadRecipe_Load(Object sender, EventArgs e) in D:\Projects\Scada\HMI\Main HMI\GenericUserControls\UserControls\LoadRecipe.cs:line 424
   at System.Windows.Forms.UserControl.OnLoad(EventArgs e)
   at System.Windows.Forms.UserControl.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.ControlCollection.Add(Control value)
   at HMI.Modules.Job.MainControl.MakeSelectStart()
   at HMI.Modules.Job.MainControl.ShowSelectStart(Object sender, JobWizardEventArgs ea)
   at DGpS.Business.Event.EventHandling.RaiseJobWizardEvent(EventHandler`1 eventHandler, Object sender, JobWizardEventArgs ea) in D:\Projects\Scada\HMI\Main HMI\DGpS.Business\Event\EventHandling.cs:line 22
   at HMI.Modules.Job.UserControls.JobOverview.gsbNewJob_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at GenericUserControls.CustomControls.GreyscaleButton.OnMouseUp(MouseEventArgs e) in D:\Projects\Scada\HMI\Main HMI\GenericUserControls\CustomControls\GrayscaleButton.cs:line 99
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Just like before, this all worked with version 5.35.

Edit: Running the code with the debugger attached generates a different error:
'System.Diagnostics.Contracts.__ContractsRuntime.ContractException' occurred in OpcLabs.EasyOpcUA.dll
 
Additional information: Assertion failed: smartSession.SmartEngine == this

Stacktrace:
   at System.Diagnostics.Contracts.__ContractsRuntime.TriggerFailure(ContractFailureKind kind, String msg, String userMessage, String conditionTxt, Exception inner)
   at System.Diagnostics.Contracts.__ContractsRuntime.ReportFailure(ContractFailureKind kind, String msg, String conditionTxt, Exception inner)
   at System.Diagnostics.Contracts.__ContractsRuntime.Assert(Boolean condition, String msg, String conditionTxt)
   at OpcLabs.EasyOpc.UA.Implementations.NetSdk.EasyUAEngine.ReadAttributes(UAReadArguments[] readArgumentsArray, EasyUAAdaptableParameters adaptableParameters)
   at OpcLabs.EasyOpc.UA.Implementations.NetSdk.NetSdkEasyUAClient.<>c__DisplayClass29_0.<ReadMultiple>b__0()
   at OpcLabs.EasyOpc.UA.Implementations.NetSdk.NetSdkEasyUAClient.DisposeGuard[TResult](Func`1 func)
   at OpcLabs.EasyOpc.UA.Implementations.NetSdk.NetSdkEasyUAClient.DisposeGuardNotNull[TResult](Func`1 func)
   at OpcLabs.EasyOpc.UA.Implementations.NetSdk.NetSdkEasyUAClient.ReadMultiple(UAReadArguments[] readArgumentsArray)
   at OpcLabs.EasyOpc.UA.ForwardingEasyUAClient.ReadMultiple(UAReadArguments[] readArgumentsArray)
   at OpcLabs.EasyOpc.UA.ForwardingEasyUAClient.ReadMultiple(UAReadArguments[] readArgumentsArray)
   at OpcLabs.EasyOpc.UA.LicensingEasyUAClient.ReadMultiple(UAReadArguments[] readArgumentsArray)
   at OpcLabs.EasyOpc.UA.EasyUAClient.ReadMultiple(UAReadArguments[] readArgumentsArray)
   at OpcLabs.EasyOpc.UA.IEasyUAClientExtension.ReadMultipleValues(IEasyUAClient client, UAReadArguments[] readArgumentsArray)
   at DGpS.OPC.UAClient.ReadMultipleValues(UAReadArguments[] readArguments) in D:\Projects\Scada\HMI\Main HMI\DGpS.OPC\UAClient.cs:line 124
   at DGpS.Business.JobOPCManager.GetValuesFromMLC() in D:\Projects\Scada\HMI\Main HMI\DGpS.Business\JobOPCManager.cs:line 296
   at GenericUserControls.UserControls.LoadRecipe.GetFromMLC() in D:\Projects\Scada\HMI\Main HMI\GenericUserControls\UserControls\LoadRecipe.cs:line 1526
   at GenericUserControls.UserControls.LoadRecipe.set_FromMLC(Boolean value) in D:\Projects\Scada\HMI\Main HMI\GenericUserControls\UserControls\LoadRecipe.cs:line 97
   at GenericUserControls.UserControls.LoadRecipe.LoadRecipe_Load(Object sender, EventArgs e) in D:\Projects\Scada\HMI\Main HMI\GenericUserControls\UserControls\LoadRecipe.cs:line 424
   at System.Windows.Forms.UserControl.OnLoad(EventArgs e)
   at System.Windows.Forms.UserControl.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.ControlCollection.Add(Control value)
   at HMI.MainFrame.btn_Click(Object sender, EventArgs e) in D:\Projects\Scada\HMI\Main HMI\ThalloLine\HMI\MainFrame.cs:line 217
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.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 HMI.Program.Main() in D:\Projects\Scada\HMI\Main HMI\ThalloLine\HMI\Program.cs:line 27
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Best regards,

Erik
Last edit: 13 Jul 2016 12:20 by Erik.

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

Moderators: support
Time to create page: 0.076 seconds