You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Bug]: WARN org.apache.plc4x.java.spi.GeneratedDriverByteToMessageCodec - Error decoding package with content [010314127000000000126a000000000000000000000000c9]: Index 24 out of bounds for length 24
#831
Closed
2 of 16 tasks
StrawberryBlue opened this issue
Mar 4, 2023
· 2 comments
PlcReadRequest build = builder.build();
while (true){
PlcReadResponse readResponse = build.execute().get(200, TimeUnit.MILLISECONDS);
for (String fieldName : readResponse.getFieldNames()) {
if (readResponse.getResponseCode(fieldName) == PlcResponseCode.OK){
int numValues = readResponse.getNumberOfValues(fieldName);
// If it's just one element, output just one single line.
if(numValues == 1) {
System.out.println("Value[" + fieldName + "]: " + readResponse.getObject(fieldName));
}
// If it's more than one element, output each in a single row.
else {
System.out.println("Value[" + fieldName + "]:");
for(int i = 0; i < numValues; i++) {
System.out.println(" - " + readResponse.getObject(fieldName, i));
}
}
}
// Something went wrong, to output an error message instead.
else {
System.out.println("Error[" + fieldName + "]: " + readResponse.getResponseCode(fieldName).name());
}
}
System.out.println("*******************************************************************************");
Thread.sleep(100);
}`
this code with
`17:13:54.529 [nioEventLoopGroup-2-1] WARN org.apache.plc4x.java.spi.GeneratedDriverByteToMessageCodec - Error decoding package with content [010314127000000000126a000000000000000000000000c9]: Index 24 out of bounds for length 24
java.lang.ArrayIndexOutOfBoundsException: Index 24 out of bounds for length 24
at com.github.jinahya.bit.io.ArrayByteInput.read(ArrayByteInput.java:106)
at com.github.jinahya.bit.io.DefaultBitInput.read(DefaultBitInput.java:57)
at com.github.jinahya.bit.io.AbstractBitInput.unsigned8(AbstractBitInput.java:63)
at com.github.jinahya.bit.io.AbstractBitInput.unsigned16(AbstractBitInput.java:87)
at com.github.jinahya.bit.io.AbstractBitInput.readInt(AbstractBitInput.java:130)
at org.apache.plc4x.java.spi.generation.ReadBufferByteBased.readUnsignedInt(ReadBufferByteBased.java:175)
at org.apache.plc4x.java.spi.codegen.io.DataReaderSimpleUnsignedInt.read(DataReaderSimpleUnsignedInt.java:33)
at org.apache.plc4x.java.spi.codegen.io.DataReaderSimpleUnsignedInt.read(DataReaderSimpleUnsignedInt.java:25)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderChecksum.lambda$readChecksumField$0(FieldReaderChecksum.java:36)
at org.apache.plc4x.java.spi.codegen.FieldCommons.switchParseByteOrderIfNecessary(FieldCommons.java:69)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderChecksum.readChecksumField(FieldReaderChecksum.java:36)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderFactory.readChecksumField(FieldReaderFactory.java:81)
at org.apache.plc4x.java.modbus.readwrite.ModbusRtuADU.staticParseBuilder(ModbusRtuADU.java:139)
at org.apache.plc4x.java.modbus.readwrite.ModbusADU.staticParse(ModbusADU.java:121)
at org.apache.plc4x.java.modbus.readwrite.ModbusADU.staticParse(ModbusADU.java:106)
at org.apache.plc4x.java.modbus.rtu.ModbusRtuDriver.lambda$getStackConfigurer$0(ModbusRtuDriver.java:107)
at org.apache.plc4x.java.spi.GeneratedDriverByteToMessageCodec.decode(GeneratedDriverByteToMessageCodec.java:87)
at io.netty.handler.codec.ByteToMessageCodec$1.decode(ByteToMessageCodec.java:42)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:529)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at org.apache.plc4x.java.transport.serial.SerialChannel$SerialNioUnsafe.read(SerialChannel.java:289)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:689)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:652)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:829)
17:13:54.530 [nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.transport.serial.SerialSelectionKey - Returning ready operation 1
17:13:54.530 [nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.transport.serial.SerialChannel - Reading...
17:13:54.530 [nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.transport.serial.SerialChannel - Trying to read bytes from wire...
17:13:54.530 [nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.transport.serial.SerialChannel - Read 1 bytes from the wire
17:13:54.530 [nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.spi.codegen.fields.FieldReaderSimple - reading field address
17:13:54.530 [nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.spi.codegen.fields.FieldReaderSimple - reading field pdu
17:13:54.530 [nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.spi.codegen.fields.FieldReaderDiscriminator - reading field errorFlag
17:13:54.530 [nioEventLoopGroup-2-1] WARN org.apache.plc4x.java.spi.GeneratedDriverByteToMessageCodec - Error decoding package with content [65]: Index 1 out of bounds for length 1
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at com.github.jinahya.bit.io.ArrayByteInput.read(ArrayByteInput.java:106)
at com.github.jinahya.bit.io.DefaultBitInput.read(DefaultBitInput.java:57)
at com.github.jinahya.bit.io.AbstractBitInput.unsigned8(AbstractBitInput.java:63)
at com.github.jinahya.bit.io.AbstractBitInput.unsigned16(AbstractBitInput.java:92)
at com.github.jinahya.bit.io.AbstractBitInput.readInt(AbstractBitInput.java:135)
at com.github.jinahya.bit.io.AbstractBitInput.readBoolean(AbstractBitInput.java:100)
at org.apache.plc4x.java.spi.generation.ReadBufferByteBased.readBit(ReadBufferByteBased.java:111)
at org.apache.plc4x.java.spi.codegen.io.DataReaderSimpleBoolean.read(DataReaderSimpleBoolean.java:33)
at org.apache.plc4x.java.spi.codegen.io.DataReaderSimpleBoolean.read(DataReaderSimpleBoolean.java:25)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderDiscriminator.lambda$readDiscriminatorField$0(FieldReaderDiscriminator.java:34)
at org.apache.plc4x.java.spi.codegen.FieldCommons.switchParseByteOrderIfNecessary(FieldCommons.java:69)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderDiscriminator.readDiscriminatorField(FieldReaderDiscriminator.java:34)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderFactory.readDiscriminatorField(FieldReaderFactory.java:89)
at org.apache.plc4x.java.modbus.readwrite.ModbusPDU.staticParse(ModbusPDU.java:118)
at org.apache.plc4x.java.modbus.readwrite.ModbusRtuADU.lambda$staticParseBuilder$0(ModbusRtuADU.java:135)
at org.apache.plc4x.java.spi.codegen.io.DataReaderComplexDefault.read(DataReaderComplexDefault.java:70)
at org.apache.plc4x.java.spi.codegen.io.DataReaderComplexDefault.read(DataReaderComplexDefault.java:61)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderSimple.lambda$readSimpleField$0(FieldReaderSimple.java:34)
at org.apache.plc4x.java.spi.codegen.FieldCommons.switchParseByteOrderIfNecessary(FieldCommons.java:69)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderSimple.readSimpleField(FieldReaderSimple.java:34)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderFactory.readSimpleField(FieldReaderFactory.java:129)
at org.apache.plc4x.java.modbus.readwrite.ModbusRtuADU.staticParseBuilder(ModbusRtuADU.java:132)
at org.apache.plc4x.java.modbus.readwrite.ModbusADU.staticParse(ModbusADU.java:121)
at org.apache.plc4x.java.modbus.readwrite.ModbusADU.staticParse(ModbusADU.java:106)
at org.apache.plc4x.java.modbus.rtu.ModbusRtuDriver.lambda$getStackConfigurer$0(ModbusRtuDriver.java:107)
at org.apache.plc4x.java.spi.GeneratedDriverByteToMessageCodec.decode(GeneratedDriverByteToMessageCodec.java:87)
at io.netty.handler.codec.ByteToMessageCodec$1.decode(ByteToMessageCodec.java:42)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:529)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at org.apache.plc4x.java.transport.serial.SerialChannel$SerialNioUnsafe.read(SerialChannel.java:289)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:689)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:652)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:829)
java.util.concurrent.TimeoutException
at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1886)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2021)
at com.example.ztio.modbus.ModbusRtuTest.Read04(ModbusRtuTest.java:30)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
`
Version
v0.10.0
Programming Languages
plc4j
plc4go
plc4c
plc4net
Protocols
AB-Ethernet
ADS /AMS
BACnet/IP
CANopen
DeltaV
DF1
EtherNet/IP
Firmata
KNXnet/IP
Modbus
OPC-UA
S7
The text was updated successfully, but these errors were encountered:
I've just pushed an update that should make Modbus ASCII and RTU a bit more stable in situations as you describe. Please give the SNAPSHOT a try as soon as Jenkins is finished building it.
What happened?
`String connectionString = "modbus-rtu:serial://COM2?unit-identifier=1&baudRate=9600&stopBits=1&parityBits=None&dataBits=8";
PlcConnection plcConnection = new PlcDriverManager().getConnection(connectionString);
PlcReadRequest.Builder builder = plcConnection.readRequestBuilder();
builder.addItem("value-1", "40001[10]");
this code with
`17:13:54.529 [nioEventLoopGroup-2-1] WARN org.apache.plc4x.java.spi.GeneratedDriverByteToMessageCodec - Error decoding package with content [010314127000000000126a000000000000000000000000c9]: Index 24 out of bounds for length 24
java.lang.ArrayIndexOutOfBoundsException: Index 24 out of bounds for length 24
at com.github.jinahya.bit.io.ArrayByteInput.read(ArrayByteInput.java:106)
at com.github.jinahya.bit.io.DefaultBitInput.read(DefaultBitInput.java:57)
at com.github.jinahya.bit.io.AbstractBitInput.unsigned8(AbstractBitInput.java:63)
at com.github.jinahya.bit.io.AbstractBitInput.unsigned16(AbstractBitInput.java:87)
at com.github.jinahya.bit.io.AbstractBitInput.readInt(AbstractBitInput.java:130)
at org.apache.plc4x.java.spi.generation.ReadBufferByteBased.readUnsignedInt(ReadBufferByteBased.java:175)
at org.apache.plc4x.java.spi.codegen.io.DataReaderSimpleUnsignedInt.read(DataReaderSimpleUnsignedInt.java:33)
at org.apache.plc4x.java.spi.codegen.io.DataReaderSimpleUnsignedInt.read(DataReaderSimpleUnsignedInt.java:25)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderChecksum.lambda$readChecksumField$0(FieldReaderChecksum.java:36)
at org.apache.plc4x.java.spi.codegen.FieldCommons.switchParseByteOrderIfNecessary(FieldCommons.java:69)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderChecksum.readChecksumField(FieldReaderChecksum.java:36)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderFactory.readChecksumField(FieldReaderFactory.java:81)
at org.apache.plc4x.java.modbus.readwrite.ModbusRtuADU.staticParseBuilder(ModbusRtuADU.java:139)
at org.apache.plc4x.java.modbus.readwrite.ModbusADU.staticParse(ModbusADU.java:121)
at org.apache.plc4x.java.modbus.readwrite.ModbusADU.staticParse(ModbusADU.java:106)
at org.apache.plc4x.java.modbus.rtu.ModbusRtuDriver.lambda$getStackConfigurer$0(ModbusRtuDriver.java:107)
at org.apache.plc4x.java.spi.GeneratedDriverByteToMessageCodec.decode(GeneratedDriverByteToMessageCodec.java:87)
at io.netty.handler.codec.ByteToMessageCodec$1.decode(ByteToMessageCodec.java:42)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:529)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at org.apache.plc4x.java.transport.serial.SerialChannel$SerialNioUnsafe.read(SerialChannel.java:289)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:689)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:652)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:829)
17:13:54.530 [nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.transport.serial.SerialSelectionKey - Returning ready operation 1
17:13:54.530 [nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.transport.serial.SerialChannel - Reading...
17:13:54.530 [nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.transport.serial.SerialChannel - Trying to read bytes from wire...
17:13:54.530 [nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.transport.serial.SerialChannel - Read 1 bytes from the wire
17:13:54.530 [nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.spi.codegen.fields.FieldReaderSimple - reading field address
17:13:54.530 [nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.spi.codegen.fields.FieldReaderSimple - reading field pdu
17:13:54.530 [nioEventLoopGroup-2-1] DEBUG org.apache.plc4x.java.spi.codegen.fields.FieldReaderDiscriminator - reading field errorFlag
17:13:54.530 [nioEventLoopGroup-2-1] WARN org.apache.plc4x.java.spi.GeneratedDriverByteToMessageCodec - Error decoding package with content [65]: Index 1 out of bounds for length 1
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at com.github.jinahya.bit.io.ArrayByteInput.read(ArrayByteInput.java:106)
at com.github.jinahya.bit.io.DefaultBitInput.read(DefaultBitInput.java:57)
at com.github.jinahya.bit.io.AbstractBitInput.unsigned8(AbstractBitInput.java:63)
at com.github.jinahya.bit.io.AbstractBitInput.unsigned16(AbstractBitInput.java:92)
at com.github.jinahya.bit.io.AbstractBitInput.readInt(AbstractBitInput.java:135)
at com.github.jinahya.bit.io.AbstractBitInput.readBoolean(AbstractBitInput.java:100)
at org.apache.plc4x.java.spi.generation.ReadBufferByteBased.readBit(ReadBufferByteBased.java:111)
at org.apache.plc4x.java.spi.codegen.io.DataReaderSimpleBoolean.read(DataReaderSimpleBoolean.java:33)
at org.apache.plc4x.java.spi.codegen.io.DataReaderSimpleBoolean.read(DataReaderSimpleBoolean.java:25)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderDiscriminator.lambda$readDiscriminatorField$0(FieldReaderDiscriminator.java:34)
at org.apache.plc4x.java.spi.codegen.FieldCommons.switchParseByteOrderIfNecessary(FieldCommons.java:69)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderDiscriminator.readDiscriminatorField(FieldReaderDiscriminator.java:34)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderFactory.readDiscriminatorField(FieldReaderFactory.java:89)
at org.apache.plc4x.java.modbus.readwrite.ModbusPDU.staticParse(ModbusPDU.java:118)
at org.apache.plc4x.java.modbus.readwrite.ModbusRtuADU.lambda$staticParseBuilder$0(ModbusRtuADU.java:135)
at org.apache.plc4x.java.spi.codegen.io.DataReaderComplexDefault.read(DataReaderComplexDefault.java:70)
at org.apache.plc4x.java.spi.codegen.io.DataReaderComplexDefault.read(DataReaderComplexDefault.java:61)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderSimple.lambda$readSimpleField$0(FieldReaderSimple.java:34)
at org.apache.plc4x.java.spi.codegen.FieldCommons.switchParseByteOrderIfNecessary(FieldCommons.java:69)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderSimple.readSimpleField(FieldReaderSimple.java:34)
at org.apache.plc4x.java.spi.codegen.fields.FieldReaderFactory.readSimpleField(FieldReaderFactory.java:129)
at org.apache.plc4x.java.modbus.readwrite.ModbusRtuADU.staticParseBuilder(ModbusRtuADU.java:132)
at org.apache.plc4x.java.modbus.readwrite.ModbusADU.staticParse(ModbusADU.java:121)
at org.apache.plc4x.java.modbus.readwrite.ModbusADU.staticParse(ModbusADU.java:106)
at org.apache.plc4x.java.modbus.rtu.ModbusRtuDriver.lambda$getStackConfigurer$0(ModbusRtuDriver.java:107)
at org.apache.plc4x.java.spi.GeneratedDriverByteToMessageCodec.decode(GeneratedDriverByteToMessageCodec.java:87)
at io.netty.handler.codec.ByteToMessageCodec$1.decode(ByteToMessageCodec.java:42)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:529)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at org.apache.plc4x.java.transport.serial.SerialChannel$SerialNioUnsafe.read(SerialChannel.java:289)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:689)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:652)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:829)
java.util.concurrent.TimeoutException
at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1886)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2021)
at com.example.ztio.modbus.ModbusRtuTest.Read04(ModbusRtuTest.java:30)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
`
Version
v0.10.0
Programming Languages
Protocols
The text was updated successfully, but these errors were encountered: