View Issue Details

IDProjectCategoryView StatusLast Update
0004010Compliance Test Tool (CTT) Unified Architecture1 - Script Issuepublic2019-09-01 14:17
ReporterAlin Moldovean Assigned ToAlexander Allmendinger  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformWindowsOSWindowsOS VersionProffesional
Product Version1.03.340.358 
Target Version1.04 
Summary0004010: CTT Script issue in Monitor Items Deadband Filter\Test Cases\015.js
Description

Test case the “Deadband Filter/Test Cases/015.js” is causing the “Static/All Profiles/Arrays/Byte” to be set to null.

Steps To Reproduce

Tested against the UA .NET Standard Reference Server using CTT version 1.3.340.358

The problem is in "\maintree\Monitored Item Services\Monitor Items Deadband Filter\Test Cases\015.js" at line 69:
for( var i=0; i<items.length; i++ ) SafeArray.RemoveElement( { Value: items[i].Value.Value } );
The SafeArray.RemoveElement() call will cause the Arrays/Byte node to be set to null while the intent is only to remove the last element of the array.
This will affect some other tests from the "Deadband Filter" Conformance Unit.

The source of the problem seems to be in “\library\Base\array.js” line 594 :
bytes = _removeElement( { Value: bytes, Type: new UaBytes(), Element: args.Element } );

The line is intending to remove the last element of the array but it ends up changing it in a 2D array in case of byte array input values

TagsNo tags attached.
Files Affected

Activities

Alexander Allmendinger

2017-11-14 12:49

developer   ~0008711

Could you please provide a sample application to reproduce the issue? The actual server in GitHub does not allow to change the array dimension by the client.

Alin Moldovean

2017-11-21 13:28

reporter   ~0008724

Hello Alex,

The issue can be replicated with the actual version of the .NET Standard ReferenceServer from Github.
It replicates by simply running the Deadband Filter/Test Cases/015.js against the server.
The script will set the “Static/All Profiles/Arrays/Byte” to null instead of changing it's size as intended.
The CTT project used for testing is also check in to the following location : https://github.com/OPCFoundation/UA-.NETStandard/tree/master/SampleApplications/Workshop/Reference
I sent you an e-mail with a detailed report about this issue on "Tue 9/26/2017 3:12 PM" but maybe it was lost somehow. I will resend it now...

Thank you,
Alin

Alexander Allmendinger

2017-11-22 21:29

developer   ~0008744

I did find the problem and fixed it. Please go to the Library/ClassBased/UaB.js:
Search for Line146:
UaByteString.FromByteArray = function( bytes ) {
And replace the for loop starting at line 151 with this one:
for (i = 0; i < bytes.length; i++ ) {
x = bytes[i];
if( x < 16 ) str += "0";
str += x.toString(16)
}
This is fixed in Version 1.3.340.378

Paul Hunkar

2019-09-01 14:17

administrator   ~0010884

Reviewed in extra CMP call

Issue History

Date Modified Username Field Change
2017-10-12 13:15 Alin Moldovean New Issue
2017-10-12 13:47 Paul Hunkar Product Version 1.03.340.355 => 1.03.340.358
2017-10-12 14:53 Paul Hunkar Assigned To => Alexander Allmendinger
2017-10-12 14:53 Paul Hunkar Status new => assigned
2017-11-14 12:49 Alexander Allmendinger Note Added: 0008711
2017-11-14 12:49 Alexander Allmendinger Status assigned => feedback
2017-11-17 14:31 Paul Hunkar Target Version 1.03 => 1.04
2017-11-21 13:28 Alin Moldovean Note Added: 0008724
2017-11-21 13:28 Alin Moldovean Status feedback => assigned
2017-11-21 13:28 Alin Moldovean Note View State: 0008724: public
2017-11-22 21:29 Alexander Allmendinger Note Added: 0008744
2017-11-22 21:29 Alexander Allmendinger Status assigned => resolved
2017-11-22 21:29 Alexander Allmendinger Resolution open => fixed
2019-01-28 14:10 Paul Hunkar Category Script Issue => 1 - Script Issue
2019-09-01 14:17 Paul Hunkar Status resolved => closed
2019-09-01 14:17 Paul Hunkar Note Added: 0010884