23:25, EET
December 15, 2023
When some OPC/UA server reports misleading information on ReadRequests regarding
ArrayDimensions vs real arity of data, this message can be observed:
Caused by: com.prosysopc.ua.stack.encoding.a: Bad_DecodingError (code=0x80070000, description=”Variant’s ArrayDimensions [0, 0] total size of 0 does not match defined ArrayLength of 1. Variant value was: [i=0]”)
at com.prosysopc.ua.stack.encoding.binary.a.fOM(SourceFile:1382) ~[application-5.0.0-173.jar:5.0.0-173]
The final outcome is that the browser is stuck in some infinite loop, i.e. does not recover
from this problem e.g. by ignoring it.
23:34, EET
December 15, 2023
How to reproduce:
* fetch a vaniilatclsh for the platform of your choice from http://www.ch-werner.de/LUCK/
* run it like “vanillatclsh… builtin:ckua 4840” which makes it into an OPC/UA server on port 4840
* connect to it using Prosys OPC UA Browser
9:29, EET
Moderators
February 11, 2020
Hello,
That decoding error you got means that the Server is encoding array values incorrectly. In OPC UA Binary, the total number of elements is encoded as Int32 for arrays. Additionally, the total number of dimensions is encoded as Int32 and the length of each dimension is encoded as Int32 element in an Int32 array. See https://reference.opcfoundation.org/Core/Part6/v105/docs/5.2.5 and https://reference.opcfoundation.org/Core/Part6/v105/docs/5.2.2.16 for more information.
In your case, the decoding error claims that the total number of elements (ArrayLength in the error) was 1 and the lengths of dimensions (ArrayDimensions in the error) were [0,0], which is an invalid combination. The decoding error also points out that actual value of the Variant indeed was an array with one element ([i=0]), which means that the lengths of dimensions were encoded incorrectly.
While I do not know why this decoding error would cause Browser to get stuck in an infinite loop, I was able to reproduce that behavior. While we will need to further investigate why this happens, you should contact the developer of that Server to let them know that it is encoding array values incorrectly.
9:47, EET
December 15, 2023
Matti,
thanks for looking into this. Meanwhile I know the culprit: it’s me, of course. And fair enough the open62541 library doesn’t prevent me shooting in my own feet, I mean from writing bogus array data. However would I appreciate if the Prosys OPC UA Browser were tolerant regarding this issue, i.e. gracefully recover from the exception and continue with its connection setup. In my Tcl binding to open62541 I’ve already added some logic to make the array dimension issue less problematic (check-in https://www.androwish.org/home/info/38747b01a0630b77) but still it is possible to write bogus information. I bet this can happen out in the wild with arbitrary servers, too, thus in any case it’s a good idea to address this issue.
Most Users Ever Online: 1919
Currently Online:
16 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 726
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7, franciscagrimwad, adult_galleryModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1