Minor incompatibility with Bits And Chisels
cozyGalvinism opened this issue ยท 1 comments
So today I had to recover our server world from a weird issue. One of our players built a pretty detailed tree with Bits And Chisels (like 2 double chests full of bit collection blocks). Afterwards, as soon as people received the data of the chunk from the server, it booted them right off the server with no real visible error on the client. The only trace I had was this stack trace:
[10:50:51] [Server thread/ERROR]: Sending very big packet 1084871
[10:50:51] [Server thread/INFO]: [STDERR]: java.lang.Throwable
[10:50:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_2658.md0650c8$lambda$redirectWriterIndex$0$0(class_2658.java:527)
[10:50:51] [Server thread/INFO]: [STDERR]: at com.qouteall.immersive_portals.my_util.LimitedLogger.invoke(LimitedLogger.java:27)
[10:50:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_2658.redirect$zik000$redirectWriterIndex(class_2658.java:525)
[10:50:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_2658.<init>(class_2658.java:42)
[10:50:51] [Server thread/INFO]: [STDERR]: at com.qouteall.hiding_in_the_bushes.MyNetwork.createRedirectedMessage(MyNetwork.java:115)
[10:50:51] [Server thread/INFO]: [STDERR]: at com.qouteall.immersive_portals.chunk_loading.ChunkDataSyncManager.lambda$onChunkProvidedDeferred$0(ChunkDataSyncManager.java:108)
[10:50:51] [Server thread/INFO]: [STDERR]: at com.qouteall.immersive_portals.Helper$3.get(Helper.java:918)
[10:50:51] [Server thread/INFO]: [STDERR]: at com.qouteall.immersive_portals.chunk_loading.ChunkDataSyncManager.lambda$onChunkProvidedDeferred$2(ChunkDataSyncManager.java:135)
[10:50:51] [Server thread/INFO]: [STDERR]: at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
[10:50:51] [Server thread/INFO]: [STDERR]: at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
[10:50:51] [Server thread/INFO]: [STDERR]: at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
[10:50:51] [Server thread/INFO]: [STDERR]: at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
[10:50:51] [Server thread/INFO]: [STDERR]: at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
[10:50:51] [Server thread/INFO]: [STDERR]: at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
[10:50:51] [Server thread/INFO]: [STDERR]: at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
[10:50:51] [Server thread/INFO]: [STDERR]: at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
[10:50:51] [Server thread/INFO]: [STDERR]: at java.util.stream.ReferencePipeline.forEach(Unknown Source)
[10:50:51] [Server thread/INFO]: [STDERR]: at com.qouteall.immersive_portals.chunk_loading.ChunkDataSyncManager.onChunkProvidedDeferred(ChunkDataSyncManager.java:134)
[10:50:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3898.md0650c8$lambda$null$0$4(class_3898.java:2844)
[10:50:51] [Server thread/INFO]: [STDERR]: at com.mojang.datafixers.util.Either.lambda$mapLeft$0(Either.java:162)
[10:50:51] [Server thread/INFO]: [STDERR]: at com.mojang.datafixers.util.Either$Left.map(Either.java:38)
[10:50:51] [Server thread/INFO]: [STDERR]: at com.mojang.datafixers.util.Either.mapLeft(Either.java:162)
[10:50:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3898.md0650c8$lambda$onCreateTickingFuture$1$3(class_3898.java:2841)
[10:50:51] [Server thread/INFO]: [STDERR]: at java.util.concurrent.CompletableFuture.uniAccept(Unknown Source)
[10:50:51] [Server thread/INFO]: [STDERR]: at java.util.concurrent.CompletableFuture$UniAccept.tryFire(Unknown Source)
[10:50:51] [Server thread/INFO]: [STDERR]: at java.util.concurrent.CompletableFuture$Completion.run(Unknown Source)
[10:50:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3900.method_17634(class_3900.java:58)
[10:50:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_1255.method_18859(class_1255.java:144)
[10:50:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3215$class_4212.method_18859(class_3215.java:545)
[10:50:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_1255.method_16075(class_1255.java:118)
[10:50:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3215$class_4212.method_16075(class_3215.java:554)
[10:50:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3215.method_19492(class_3215.java:280)
[10:50:51] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:749)
[10:50:51] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:737)
[10:50:51] [Server thread/INFO]: [STDERR]: at net.minecraft.class_1255.method_5383(class_1255.java:103)
[10:50:51] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:721)
[10:50:51] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:674)
[10:50:51] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257)
[10:50:51] [Server thread/INFO]: [STDERR]: at java.lang.Thread.run(Unknown Source)
After removing the tree, players were able to connect just fine. My assumption is, that the data for the bit collections are too big for the CustomPayloadS2CPacket? I don't have much experience with the network stack of Minecraft and mods in general, so I dunno if that is really the core issue? But this doesn't happen if Immersive Portals is not installed. Right now, we're discouraging users to use Bits and Chisels for large scale builds until we found a fix to this. I'd be happy to provide more information, in case it's needed.
Here is the world for reproducing this, the mods installed only need to be Bits and Chisels and the Immersive portals mod (and the Fabric API, obviously). The logs may complain about missing blocks, though that's because we play with a handful more mods. Coordinates for the tree are at X: 1177 Y: 63 Z: -223. Opening this in single player works fine, opening this on a server will close your connection.
Some details about the Minecraft instance:
Minecraft Version: 1.16.5
Fabric Loader Version: 0.11.3
Fabric API Version: 0.33.1+1.16
Bits And Chisels Version: 2.1.4
Immersive Portals Version: 0.90
Closing this as a duplicate of #474