Applied Energistics 2

Applied Energistics 2

156M Downloads

ME drive causing disconnects in LAN

xun468 opened this issue ยท 1 comments

commented

Describe the bug
This might sound a bit ludicrous, but if I have an AE2 ME drive placed in my world and then open it to LAN, players cannot connect or load the chunk containing the drive. I have a very simple setup with an energy acceptor and ME drive which is connected by fluix ME glass cables to a ME terminal.

EDIT: This appears to be due to powering the network with a flux point from Flux Networks. I will also open an issue there.
EDIT2: Ok, it may not be due to flux networks. Powering the AE2 network with a Mekanism battery or TE sterling generator also causes crashes. I don't really know what it is now because a powered energy acceptor is now also crashing players trying to join. Apologies for the inconvenience, I am not sure what else I could test.

The error they receive when disconnecting is:

Internal Exception: Java.io.IOException: An existing connection was forcibly closed by the remote host.

and the one I have in my logs is

[01:12:39] [Netty Server IO #5/ERROR] [minecraft/NettyPacketEncoder]: Error encoding packet
io.netty.util.IllegalReferenceCountException: refCnt: 0
at io.netty.buffer.AbstractByteBuf.ensureAccessible(AbstractByteBuf.java:1417) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.buffer.AbstractByteBuf.checkIndex(AbstractByteBuf.java:1356) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.buffer.UnpooledHeapByteBuf.copy(UnpooledHeapByteBuf.java:538) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.buffer.AbstractByteBuf.copy(AbstractByteBuf.java:1170) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at net.minecraft.network.PacketBuffer.copy(PacketBuffer.java:1009) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:randompatches.mixins.json:packetsizelimits.PacketBufferMixin,pl:mixin:A}
at net.minecraft.network.play.server.SCustomPayloadPlayPacket.func_148840_b(SCustomPayloadPlayPacket.java:55) ~[?:?] {re:classloading}
at net.minecraft.network.NettyPacketEncoder.encode(NettyPacketEncoder.java:38) [?:?] {re:classloading}
at net.minecraft.network.NettyPacketEncoder.encode(NettyPacketEncoder.java:12) [?:?] {re:classloading}
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1071) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:300) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at net.minecraft.network.NetworkManager.lambda$sendPacket$5(NetworkManager.java:196) [?:?] {re:mixin,re:classloading}
at net.minecraft.network.NetworkManager$$Lambda$25549/0x0000000000000000.run(Unknown Source) [?:?] {}
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:465) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at java.lang.Thread.run(Thread.java:826) [?:1.8.0_302] {}
[01:12:39] [Netty Server IO #5/ERROR] [minecraft/NettyPacketEncoder]: Error encoding packet
io.netty.util.IllegalReferenceCountException: refCnt: 0
at io.netty.buffer.AbstractByteBuf.ensureAccessible(AbstractByteBuf.java:1417) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.buffer.AbstractByteBuf.checkIndex(AbstractByteBuf.java:1356) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.buffer.UnpooledHeapByteBuf.copy(UnpooledHeapByteBuf.java:538) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.buffer.AbstractByteBuf.copy(AbstractByteBuf.java:1170) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at net.minecraft.network.PacketBuffer.copy(PacketBuffer.java:1009) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:randompatches.mixins.json:packetsizelimits.PacketBufferMixin,pl:mixin:A}
at net.minecraft.network.play.server.SCustomPayloadPlayPacket.func_148840_b(SCustomPayloadPlayPacket.java:55) ~[?:?] {re:classloading}
at net.minecraft.network.NettyPacketEncoder.encode(NettyPacketEncoder.java:38) [?:?] {re:classloading}
at net.minecraft.network.NettyPacketEncoder.encode(NettyPacketEncoder.java:12) [?:?] {re:classloading}
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1071) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:300) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at net.minecraft.network.NetworkManager.lambda$sendPacket$5(NetworkManager.java:196) [?:?] {re:mixin,re:classloading}
at net.minecraft.network.NetworkManager$$Lambda$25549/0x0000000000000000.run(Unknown Source) [?:?] {}
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:465) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at java.lang.Thread.run(Thread.java:826) [?:1.8.0_302] {}
[01:12:39] [Netty Server IO #5/ERROR] [minecraft/NettyPacketEncoder]: Error encoding packet
io.netty.util.IllegalReferenceCountException: refCnt: 0
at io.netty.buffer.AbstractByteBuf.ensureAccessible(AbstractByteBuf.java:1417) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.buffer.AbstractByteBuf.checkIndex(AbstractByteBuf.java:1356) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.buffer.UnpooledHeapByteBuf.copy(UnpooledHeapByteBuf.java:538) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.buffer.AbstractByteBuf.copy(AbstractByteBuf.java:1170) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at net.minecraft.network.PacketBuffer.copy(PacketBuffer.java:1009) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:randompatches.mixins.json:packetsizelimits.PacketBufferMixin,pl:mixin:A}
at net.minecraft.network.play.server.SCustomPayloadPlayPacket.func_148840_b(SCustomPayloadPlayPacket.java:55) ~[?:?] {re:classloading}
at net.minecraft.network.NettyPacketEncoder.encode(NettyPacketEncoder.java:38) [?:?] {re:classloading}
at net.minecraft.network.NettyPacketEncoder.encode(NettyPacketEncoder.java:12) [?:?] {re:classloading}
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1071) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:300) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at net.minecraft.network.NetworkManager.lambda$sendPacket$5(NetworkManager.java:196) [?:?] {re:mixin,re:classloading}
at net.minecraft.network.NetworkManager$$Lambda$25549/0x0000000000000000.run(Unknown Source) [?:?] {}
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:465) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at java.lang.Thread.run(Thread.java:826) [?:1.8.0_302] {}
[01:12:39] [Netty Server IO #5/ERROR] [minecraft/NettyPacketEncoder]: Error encoding packet
io.netty.util.IllegalReferenceCountException: refCnt: 0
at io.netty.buffer.AbstractByteBuf.ensureAccessible(AbstractByteBuf.java:1417) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.buffer.AbstractByteBuf.checkIndex(AbstractByteBuf.java:1356) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.buffer.UnpooledHeapByteBuf.copy(UnpooledHeapByteBuf.java:538) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.buffer.AbstractByteBuf.copy(AbstractByteBuf.java:1170) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at net.minecraft.network.PacketBuffer.copy(PacketBuffer.java:1009) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:randompatches.mixins.json:packetsizelimits.PacketBufferMixin,pl:mixin:A}
at net.minecraft.network.play.server.SCustomPayloadPlayPacket.func_148840_b(SCustomPayloadPlayPacket.java:55) ~[?:?] {re:classloading}
at net.minecraft.network.NettyPacketEncoder.encode(NettyPacketEncoder.java:38) [?:?] {re:classloading}
at net.minecraft.network.NettyPacketEncoder.encode(NettyPacketEncoder.java:12) [?:?] {re:classloading}
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1071) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:300) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at net.minecraft.network.NetworkManager.lambda$sendPacket$5(NetworkManager.java:196) [?:?] {re:mixin,re:classloading}
at net.minecraft.network.NetworkManager$$Lambda$25549/0x0000000000000000.run(Unknown Source) [?:?] {}
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:465) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) [netty-all-4.1.25.Final.jar:4.1.25.Final] {}
at java.lang.Thread.run(Thread.java:826) [?:1.8.0_302] {}
[01:12:39] [Server thread/INFO] [minecraft/ServerPlayNetHandler]: Eitaas lost connection: Internal Exception: io.netty.handler.codec.EncoderException: io.netty.util.IllegalReferenceCountException: refCnt: 0

To Reproduce
Set up a simple network with an ME drive, energy acceptor, and ME terminal powered by a Flux Networks flux point. LAN players disconnect when approaching or loading this setup but do not if the drive is placed while they're connected. When the ME drive is removed, LAN players do not disconnect.

Environment
Minecraft 1.16.5
AppliedEnergistics2 8.4.1
Forge 36.2.0
EDIT: Updated to Forge 36.2.4 and the issue remained

commented

This looks like a bug in another mod. If you can reproduce this with only a handful of mods (AE2 + power source, essentially), please let us know.