BedrockConnect icon indicating copy to clipboard operation
BedrockConnect copied to clipboard

Buffer inflation exception

Open jarmond opened this issue 2 years ago • 5 comments

What happened?

Using Bedrock Connect 1.26, I'm getting an exception on connect:

bedrock-connect_1  | [Network Listener - #3] WARN io.netty.util.concurrent.AbstractEventExecutor - A task raised an exception. Task: com.pyratron.pugmatt.protocol.bedrock.BedrockRakNetSessionListener$$Lambda$155/0x0000000800f2f4c8@5404af01
bedrock-connect_1  | java.lang.RuntimeException: Unable to inflate buffer data
bedrock-connect_1  |    at com.pyratron.pugmatt.protocol.bedrock.wrapper.BedrockWrapperSerializerV9_10.deserialize(BedrockWrapperSerializerV9_10.java:87)
bedrock-connect_1  |    at com.pyratron.pugmatt.protocol.bedrock.BedrockSession.onWrappedPacket(BedrockSession.java:283)
bedrock-connect_1  |    at com.pyratron.pugmatt.protocol.bedrock.BedrockRakNetSessionListener.lambda$onEncapsulated$0(BedrockRakNetSessionListener.java:39)
bedrock-connect_1  |    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
bedrock-connect_1  |    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
bedrock-connect_1  |    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:387)
bedrock-connect_1  |    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
bedrock-connect_1  |    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
bedrock-connect_1  |    at java.base/java.lang.Thread.run(Thread.java:833)
bedrock-connect_1  | Caused by: java.util.zip.DataFormatException: incorrect header check
bedrock-connect_1  |    at java.base/java.util.zip.Inflater.inflateBufferBuffer(Native Method)
bedrock-connect_1  |    at java.base/java.util.zip.Inflater.inflate(Inflater.java:546)
bedrock-connect_1  |    at com.nukkitx.natives.zlib.Java11Inflater.inflate(Java11Inflater.java:21)
bedrock-connect_1  |    at com.pyratron.pugmatt.protocol.util.Zlib.inflate(Zlib.java:56)
bedrock-connect_1  |    at com.pyratron.pugmatt.protocol.bedrock.wrapper.BedrockWrapperSerializerV9_10.deserialize(BedrockWrapperSerializerV9_10.java:61)
bedrock-connect_1  |    ... 8 more

Expected Behaviour?

Connection to serverlist.

Steps to reproduce.

No response

Screenshots/Videos

No response

Minecraft Bedrock Version

1.19.50

Console

Windows 11

Additional Context

No response

jarmond avatar Dec 04 '22 23:12 jarmond

Sorry for the delay. Did some tests on my end but can't seem to replicate. Do you have any startup arguments enabled (e.g. custom_servers, language, etc), or is it the default setup?

Pugmatt avatar Dec 13 '22 20:12 Pugmatt

Thanks for taking a look. I do have arguments:

java -jar BedrockConnect-1.0-SNAPSHOT.jar \
    nodb=true \
    custom_servers=custom-servers.json \
    whitelist=connect-whitelist.txt \
    featured_servers=false

Java is openjdk-17-jre-headless - OpenJDK 64-Bit Server VM (build 17.0.5+8-Ubuntu-2ubuntu120.04, mixed mode, sharing). I have two servers listed in custom-servers.json, with same IP but different ports, both have an iconUrl.

jarmond avatar Dec 14 '22 14:12 jarmond

Try changing your launch command to the following:

java -XX:+UnlockDiagnosticVMOptions -XX:-UseAESCTRIntrinsics -jar BedrockConnect-1.0-SNAPSHOT.jar \
    nodb=true \
    custom_servers=custom-servers.json \
    whitelist=connect-whitelist.txt \
    featured_servers=false

Not sure if this is the same issue, but the error looks to be coming from the Protocol library BedrockConnect uses, and it looks like there are similar error reports from Geyser's issue tracker, which also uses the same Protocol library: https://github.com/GeyserMC/Geyser/issues/2694 https://github.com/GeyserMC/Geyser/issues/2861

Pugmatt avatar Dec 17 '22 02:12 Pugmatt

Tried the additional java args, but it made no difference I'm afraid.

jarmond avatar Dec 17 '22 18:12 jarmond

We've also seen this error for jars that aren't up-to-date with 1.19.30+ support.

Camotoy avatar Jan 04 '23 02:01 Camotoy

Yes, this is fixed in current versions.

jarmond avatar Apr 04 '24 16:04 jarmond