View Issue Details

IDProjectCategoryView StatusLast Update
0007992CTT UA Scripts1 - Script Issuepublic2023-11-03 15:43
ReporterFlorin Neamtu Assigned ToYannik Klaass  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformWindowsOSWindows 
Fixed in Version1.04.501 
Summary0007992: Increment issue for a big Double type value
Description

Get a particular version of ReferenceServer ( please get version https://github.com/mrsuciu/UA-.NETStandard - resendData branch just for this particular bug purpose)

Inside CTT project settings please add a node assigned on Server Test\NodeIds\Static\AllProfiles\Scalar\Double = ns=2;s=Scalar_Static_Double entry

Run only the test Base Information\Base Info ResendData Method\010.js script

Inside 010.js line 51 there is the following code
...
for( i = 0; i < TC_Variables.TestMonitoredItems.length; i++ ) {
UaVariant.Increment( { Item: TC_Variables.TestMonitoredItems[i] } );
}
...

When UaVariant.Increment(...) tries to increment input parameter when double value = 14438842530529280 it does not succeed

Due to this missing incrementation the test result is not finalized as expected.

Steps To Reproduce

inside ClassBased\UaUnregisterNodesNodesRequest\UaV.js script line 475

UaVariant.Increment = function( args ) {
...
case BuiltInType.Double: {
if ( val.toDouble() === Constants.Double_Max ) val.setDouble( 0 );
else val.setDouble( val.toDouble() + args.Increment );
break;
}
...

I assume for double big values for the val.setDouble( val.toDouble() + args.Increment ); the args.Increment it might need perhaps a cast.

Even if there is no js assertion in this particular case the incrementation is not ok.

Additional Information

if node (ns=2;s=Scalar_Static_Double) value is low for example 100, 1000 there is no problem to increment.
The issue shows up when double is quite big.

Because the executable assemblies for ReferenceServer it takes more than 7 MB I avoided to attached it here.

TagsNo tags attached.
Files Affected

Relationships

related to 0006198 closedSebastian Allmendinger Monitored Item Services/Monitor Value Change/042.js increment problem with serveral data types 

Activities

Paul Hunkar

2022-05-19 15:04

administrator   ~0016731

Believe that there is a limit on the size of a double in the CTT (less then the actual size of a double) - Update the CTT to wrap at this limit back to 1

Yannik Klaass

2022-09-05 13:09

developer   ~0017517

Changed the limit for incrementing a double with UaVariant.Increment() from 'Constants.Double_Max' to the value of Number.MAX_SAFE_INTEGER (9007199254740992) as this is the limit javascript can safely handle.

Paul Hunkar

2022-10-06 15:39

administrator   ~0017962

Reviewed changes in call, agreed to updates and closed issue

Issue History

Date Modified Username Field Change
2022-05-17 11:33 Florin Neamtu New Issue
2022-05-19 15:04 Paul Hunkar Note Added: 0016731
2022-05-19 15:04 Paul Hunkar Assigned To => Alexander Allmendinger
2022-05-19 15:04 Paul Hunkar Status new => assigned
2022-05-29 21:55 Alexander Allmendinger Assigned To Alexander Allmendinger => Yannik Klaass
2022-08-02 20:22 Paul Hunkar Project Compliance Test Tool (CTT) Unified Architecture => CTT UA Scripts
2022-09-05 13:09 Yannik Klaass Status assigned => resolved
2022-09-05 13:09 Yannik Klaass Resolution open => fixed
2022-09-05 13:09 Yannik Klaass Note Added: 0017517
2022-10-06 15:39 Paul Hunkar Status resolved => closed
2022-10-06 15:39 Paul Hunkar Fixed in Version => 1.04.501
2022-10-06 15:39 Paul Hunkar Note Added: 0017962
2023-11-03 15:43 Sebastian Allmendinger Relationship added related to 0006198