-
Notifications
You must be signed in to change notification settings - Fork 34
Description
As the title says, whenever there are a lot of ImageFrames loaded within render distance (regardless of if they are animated or not), bedrock players will receive a disconnect message for the error End of stream. Now, this is likely related to #45 , but there is probably a better way to handle this.
For information on my server, it is a Velocity Proxy with Geyser forwarding to the paper server with ImageFrame. This happens on the latest version of Geyser and ImageFrame. Removing ImageFrame and loading in the chunks (where all the ImageFrames once were) works fine, but when ImageFrame is added back, the End of Stream error happens again. There is no log on the paper side (whereas this is likely the fault of Geyser/Host), but the proxy gives the following errors:
[23:24:02 ERROR]: [connected player] . (): exception encountered in com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler@535dd0e1
java.lang.IllegalStateException: Not in event loop
at com.google.common.base.Preconditions.checkState(Preconditions.java:502) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at com.velocitypowered.proxy.connection.MinecraftConnection.ensureInEventLoop(MinecraftConnection.java:220) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at com.velocitypowered.proxy.connection.MinecraftConnection.setAutoReading(MinecraftConnection.java:348) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler.writabilityChanged(ClientPlaySessionHandler.java:515) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at com.velocitypowered.proxy.connection.MinecraftConnection.channelWritabilityChanged(MinecraftConnection.java:215) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelWritabilityChanged(AbstractChannelHandlerContext.java:417) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelWritabilityChanged(DefaultChannelPipeline.java:1452) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.DefaultChannelPipeline.fireChannelWritabilityChanged(DefaultChannelPipeline.java:946) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.ChannelOutboundBuffer.fireChannelWritabilityChanged(ChannelOutboundBuffer.java:659) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.ChannelOutboundBuffer.setWritable(ChannelOutboundBuffer.java:625) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.ChannelOutboundBuffer.decrementPendingOutboundBytes(ChannelOutboundBuffer.java:207) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.ChannelOutboundBuffer.remove(ChannelOutboundBuffer.java:304) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.local.LocalChannel.doWrite(LocalChannel.java:390) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:802) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:766) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1391) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:792) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:778) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:764) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.ChannelDuplexHandler.flush(ChannelDuplexHandler.java:127) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:794) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:838) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:807) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:872) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1046) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.Channel.writeAndFlush(Channel.java:257) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at org.geysermc.geyser.network.netty.ChannelWrapper.writeAndFlush(ChannelWrapper.java:224) ~[?:?]
at com.velocitypowered.proxy.connection.MinecraftConnection.closeWith(MinecraftConnection.java:286) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at com.velocitypowered.proxy.connection.client.ConnectedPlayer.disconnect0(ConnectedPlayer.java:660) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at com.velocitypowered.proxy.connection.client.ConnectedPlayer.disconnect(ConnectedPlayer.java:642) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler.exception(ClientPlaySessionHandler.java:495) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at com.velocitypowered.proxy.connection.MinecraftConnection.exceptionCaught(MinecraftConnection.java:181) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:291) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelWritabilityChanged(AbstractChannelHandlerContext.java:422) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelWritabilityChanged(DefaultChannelPipeline.java:1452) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.DefaultChannelPipeline.fireChannelWritabilityChanged(DefaultChannelPipeline.java:946) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.ChannelOutboundBuffer$2.run(ChannelOutboundBuffer.java:653) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:148) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:141) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:507) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.SingleThreadIoEventLoop.run(SingleThreadIoEventLoop.java:180) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:1073) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?][23:24:02 ERROR]: [connected player] . (): exception encountered in com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler@535dd0e1
java.lang.IllegalStateException: Not in event loop
at com.google.common.base.Preconditions.checkState(Preconditions.java:502) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at com.velocitypowered.proxy.connection.MinecraftConnection.ensureInEventLoop(MinecraftConnection.java:220) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at com.velocitypowered.proxy.connection.MinecraftConnection.setAutoReading(MinecraftConnection.java:348) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at com.velocitypowered.proxy.connection.client.ClientPlaySessionHandler.writabilityChanged(ClientPlaySessionHandler.java:515) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at com.velocitypowered.proxy.connection.MinecraftConnection.channelWritabilityChanged(MinecraftConnection.java:215) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelWritabilityChanged(AbstractChannelHandlerContext.java:417) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelWritabilityChanged(DefaultChannelPipeline.java:1452) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.DefaultChannelPipeline.fireChannelWritabilityChanged(DefaultChannelPipeline.java:946) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.ChannelOutboundBuffer$2.run(ChannelOutboundBuffer.java:653) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:148) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:141) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:507) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.channel.SingleThreadIoEventLoop.run(SingleThreadIoEventLoop.java:180) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:1073) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[velocity.jar:3.4.0-SNAPSHOT (git-81deb1ff-b521)]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]Now as for why I am opening the issue here instead of Geyser, is that this error happens when ImageFrame sends its data. Now if you believe this issue should be moved upstream to Geyser, I can redirect it there. Maybe there is a way to implement a limit as to not send too much data at once if a client is on bedrock? As mentioned in the issue linked above, this is easy to do with the Geyser Api.
Please let me know if you need any more information!