Astral Sorcery

Astral Sorcery

63M Downloads

Fatal Error When Synchronizing Information On Login

EulaZ opened this issue ยท 3 comments

commented

Minecraft 1.12.2
Forge 14.23.5.2815
Astral Sorcery 1.10.11
Players of my server would often be kicked with the message "A fatal error has occured,this connection is terminated" or "Internal Exception: java.io.IOException: An existing connection was forcibly closed by the remote host". Players that meet this problem will not be able to connect in till I restart the server but later it will happen again. The trials of changing Astral Sorcery to versions above 1.10 were failed.
Here is the server log of my failed connection attempts.
[18:58:36] [Server thread/INFO]: [Astral Sorcery] Waiting for server synchronization on login for Administrator...
[18:58:36] [Server thread/INFO]: Administrator[/124.115.222.149:37986] logged in with entity id 919254 at ([world]-206.98750001192093, 104.0, 266.30000001192093)
[18:58:36] [Server thread/INFO]: [Astral Sorcery] Synchronizing baseline information to Administrator
[18:58:36] [Server thread/ERROR]: FMLIndexedMessageCodec exception caught
io.netty.handler.codec.EncoderException: java.lang.NullPointerException
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:106) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1032) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:296) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.sendTo(SimpleNetworkWrapper.java:250) ~[SimpleNetworkWrapper.class:?]
at hellfirepvp.astralsorcery.common.data.SyncDataHolder.syncAllDataTo(SyncDataHolder.java:97) ~[SyncDataHolder.class:?]
at hellfirepvp.astralsorcery.common.event.listener.EventHandlerNetwork.lambda$onLogin$0(EventHandlerNetwork.java:41) ~[EventHandlerNetwork.class:?]
at hellfirepvp.astralsorcery.common.CommonScheduler.tick(CommonScheduler.java:45) [CommonScheduler.class:?]
at hellfirepvp.astralsorcery.common.auxiliary.tick.TickManager.serverTick(TickManager.java:63) [TickManager.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_705_TickManager_serverTick_ServerTickEvent.invoke(.dynamic) [?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) [ASMEventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:187) [EventBus.class:?]
at net.minecraftforge.fml.common.FMLCommonHandler.onPostServerTick(FMLCommonHandler.java:267) [FMLCommonHandler.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:826) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:634) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_192]
Caused by: java.lang.NullPointerException
[18:58:36] [Server thread/ERROR]: SimpleChannelHandlerWrapper exception
io.netty.handler.codec.EncoderException: java.lang.NullPointerException
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:106) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1032) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:296) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.sendTo(SimpleNetworkWrapper.java:250) ~[SimpleNetworkWrapper.class:?]
at hellfirepvp.astralsorcery.common.data.SyncDataHolder.syncAllDataTo(SyncDataHolder.java:97) ~[SyncDataHolder.class:?]
at hellfirepvp.astralsorcery.common.event.listener.EventHandlerNetwork.lambda$onLogin$0(EventHandlerNetwork.java:41) ~[EventHandlerNetwork.class:?]
at hellfirepvp.astralsorcery.common.CommonScheduler.tick(CommonScheduler.java:45) [CommonScheduler.class:?]
at hellfirepvp.astralsorcery.common.auxiliary.tick.TickManager.serverTick(TickManager.java:63) [TickManager.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_705_TickManager_serverTick_ServerTickEvent.invoke(.dynamic) [?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) [ASMEventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:187) [EventBus.class:?]
at net.minecraftforge.fml.common.FMLCommonHandler.onPostServerTick(FMLCommonHandler.java:267) [FMLCommonHandler.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:826) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:634) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_192]
Caused by: java.lang.NullPointerException
[18:58:39] [Netty Epoll Server IO #3/ERROR]: Network Disconnect: A fatal error has occurred, this connection is terminated
[18:58:39] [Server thread/INFO]: Administrator lost connection: A fatal error has occurred, this connection is terminated
[18:58:39] [Server thread/INFO]: Administrator Left the game.

Client side:
[Netty Client IO #9/ERROR]: NetworkDispatcher exception java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[?:1.8.0_161]
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) ~[?:1.8.0_161]
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[?:1.8.0_161]
at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[?:1.8.0_161]
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) ~[?:1.8.0_161]
at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288) ~[netty all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1100) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:372) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123) [netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:624) [netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:559) [netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:476) [netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438) [netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [netty-all-4.1.9.Final.jar:4.1.9.Final]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161]
I'm hoping that you might have a solution for this issue.
Thanks.

commented

Need the full log. Please upload log entries to pastebin or gist and link instead of putting them in the main ticket text.

commented

Try forcing a recalculation of the starlight network by setting "performNetworkIntegrityCheck" in the config to True next server restart. Only needs to be done once, it can be changed back to False for the subsequent scheduled restart. Otherwise I'm lining thing into #513