Hi all, kevin,
I do not know if I find a bug on eclipse milo or i do so mistake (likely the second one);
I'm going to decode the following:
In more specific:
There is a structure that is a subType of JoiningProcessDataType we have called it QualityProcessMetaDataType that has added the field ExtendedMetaData;
In attached the two coded written one for JoiningProcessDataType and for QualityProcessMetaDataType, but when i make I call I get:
18:21:21.012 [milo-shared-thread-pool-3] ERROR o.e.m.e.m.opcua.ModeledNamespace - Uncaught Throwable invoking method handler for methodId=NodeId{ns=8, id=96}.
java.lang.StackOverflowError: null
at java.base/sun.nio.cs.UTF_8$Encoder.encodeArrayLoop(UTF_8.java:456)
at java.base/sun.nio.cs.UTF_8$Encoder.encodeLoop(UTF_8.java:564)
at java.base/java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:585)
at java.base/sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:293)
at java.base/sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)
at java.base/sun.nio.cs.StreamEncoder.write(StreamEncoder.java:132)
at java.base/java.io.OutputStreamWriter.write(OutputStreamWriter.java:205)
at java.base/java.io.BufferedWriter.flushBuffer(BufferedWriter.java:120)
at java.base/java.io.PrintStream.writeln(PrintStream.java:722)
at java.base/java.io.PrintStream.println(PrintStream.java:1028)
at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.readStruct(OpcUaBinaryStreamDecoder.java:716)
at org.eclipse.milo.opcua.stack.core.types.structured.JoiningProcessDataType$Codec.decode(JoiningProcessDataType.java:69)
at org.eclipse.milo.opcua.stack.core.types.structured.JoiningProcessDataType$Codec.decode(JoiningProcessDataType.java:1)
at org.eclipse.milo.opcua.stack.core.serialization.codecs.GenericDataTypeCodec$GenericBinaryDataTypeCodec.decode(GenericDataTypeCodec.java:47)
at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.readStruct(OpcUaBinaryStreamDecoder.java:704)
at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.lambda$0(OpcUaBinaryStreamDecoder.java:719)
at java.base/java.util.Optional.map(Optional.java:260)
at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.readStruct(OpcUaBinaryStreamDecoder.java:719)
at org.eclipse.milo.opcua.stack.core.types.structured.JoiningProcessDataType$Codec.decode(JoiningProcessDataType.java:69)
at org.eclipse.milo.opcua.stack.core.types.structured.JoiningProcessDataType$Codec.decode(JoiningProcessDataType.java:1)
at org.eclipse.milo.opcua.stack.core.serialization.codecs.GenericDataTypeCodec$GenericBinaryDataTypeCodec.decode(GenericDataTypeCodec.java:47)
at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.readStruct(OpcUaBinaryStreamDecoder.java:704)
at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.lambda$0(OpcUaBinaryStreamDecoder.java:719)
at java.base/java.util.Optional.map(Optional.java:260)
at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.readStruct(OpcUaBinaryStreamDecoder.java:719)
at org.eclipse.milo.opcua.stack.core.types.structured.JoiningProcessDataType$Codec.decode(JoiningProcessDataType.java:69)
at org.eclipse.milo.opcua.stack.core.types.structured.JoiningProcessDataType$Codec.decode(JoiningProcessDataType.java:1)
at org.eclipse.milo.opcua.stack.core.serialization.codecs.GenericDataTypeCodec$GenericBinaryDataTypeCodec.decode(GenericDataTypeCodec.java:47)
at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.readStruct(OpcUaBinaryStreamDecoder.java:704)
at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.lambda$0(OpcUaBinaryStreamDecoder.java:719)
at java.base/java.util.Optional.map(Optional.java:260)
at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.readStruct(OpcUaBinaryStreamDecoder.java:719)
at org.eclipse.milo.opcua.stack.core.types.structured.JoiningProcessDataType$Codec.decode(JoiningProcessDataType.java:69)
at org.eclipse.milo.opcua.stack.core.types.structured.JoiningProcessDataType$Codec.decode(JoiningProcessDataType.java:1)
at org.eclipse.milo.opcua.stack.core.serialization.codecs.GenericDataTypeCodec$GenericBinaryDataTypeCodec.decode(GenericDataTypeCodec.java:47)
at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.readStruct(OpcUaBinaryStreamDecoder.java:704)
at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.lambda$0(OpcUaBinaryStreamDecoder.java:719)
at java.base/java.util.Optional.map(Optional.java:260)
at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.readStruct(OpcUaBinaryStreamDecoder.java:719)
at org.eclipse.milo.opcua.stack.core.types.structured.JoiningProcessDataType$Codec.decode(JoiningProcessDataType.java:69)
at org.eclipse.milo.opcua.stack.core.types.structured.JoiningProcessDataType$Codec.decode(JoiningProcessDataType.java:1)
at org.eclipse.milo.opcua.stack.core.serialization.codecs.GenericDataTypeCodec$GenericBinaryDataTypeCodec.decode(GenericDataTypeCodec.java:47)
at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.readStruct(OpcUaBinaryStreamDecoder.java:704)
at org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamDecoder.lambda$0(OpcUaBinaryStreamDecoder.java:719)
at java.base/java.util.Optional.map(Optional.java:260)
looking at code it seems that the method
public Object readStruct(String field, NodeId dataTypeId)
call the method
public Object readStruct(String field, ExpandedNodeId dataTypeId)
and in turns call again
public Object readStruct(String field, NodeId dataTypeId)
I'm not able to understand why that happen!!!!
thanks
-- Ing. Viscomi Francesco
_______________________________________________