-
-
Notifications
You must be signed in to change notification settings - Fork 13
"Corrupted" chunks prevent rest of map from loading and prevents map loading for other players #19
Description
In the server log, I see the following errors pop up:
`
[2026/01/31 23:51:18 SEVERE] [ChunkStore] Failed to load chunk! 0, 8
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: capacity < 0: (-1675047049 < 0)
at java.base/java.util.concurrent.CompletableFuture.wrapInCompletionException(CompletableFuture.java:323)
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:359)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:364)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1791)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1781)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1450)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2019)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
Caused by: java.lang.IllegalArgumentException: capacity < 0: (-1675047049 < 0)
at java.base/java.nio.Buffer.createCapacityException(Buffer.java:289)
at java.base/java.nio.Buffer.<init>(Buffer.java:252)
at java.base/java.nio.ByteBuffer.<init>(ByteBuffer.java:323)
at java.base/java.nio.ByteBuffer.<init>(ByteBuffer.java:331)
at java.base/java.nio.MappedByteBuffer.<init>(MappedByteBuffer.java:114)
at java.base/java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:104)
at java.base/java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:367)
at com.github.luben.zstd.ZstdDecompressCtx.decompress(ZstdDecompressCtx.java:350)
at com.github.luben.zstd.Zstd.decompress(Zstd.java:1560)
at com.hypixel.hytale.storage.IndexedStorageFile.readBlob(IndexedStorageFile.java:612)
at com.hypixel.hytale.server.core.universe.world.storage.provider.IndexedStorageChunkStorageProvider$IndexedStorageChunkLoader.lambda$loadBuffer$0(IndexedStorageChunkStorageProvider.java:122)
at com.hypixel.hytale.sneakythrow.supplier.ThrowableSupplier.get(ThrowableSupplier.java:13)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1789)
... 5 more
[2026/01/31 23:51:18 SEVERE] [Hytale] Unhandled exception! Thread[#63,ForkJoinPool.commonPool-worker-2,5,InnocuousForkJoinWorkerThreadGroup]
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: capacity < 0: (-1675047049 < 0)
at java.base/java.util.concurrent.CompletableFuture.wrapInCompletionException(CompletableFuture.java:323)
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:359)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:364)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1791)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1781)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1450)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2019)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
Caused by: java.lang.IllegalArgumentException: capacity < 0: (-1675047049 < 0)
at java.base/java.nio.Buffer.createCapacityException(Buffer.java:289)
at java.base/java.nio.Buffer.<init>(Buffer.java:252)
at java.base/java.nio.ByteBuffer.<init>(ByteBuffer.java:323)
at java.base/java.nio.ByteBuffer.<init>(ByteBuffer.java:331)
at java.base/java.nio.MappedByteBuffer.<init>(MappedByteBuffer.java:114)
at java.base/java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:104)
at java.base/java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:367)
at com.github.luben.zstd.ZstdDecompressCtx.decompress(ZstdDecompressCtx.java:350)
at com.github.luben.zstd.Zstd.decompress(Zstd.java:1560)
at com.hypixel.hytale.storage.IndexedStorageFile.readBlob(IndexedStorageFile.java:612)
at com.hypixel.hytale.server.core.universe.world.storage.provider.IndexedStorageChunkStorageProvider$IndexedStorageChunkLoader.lambda$loadBuffer$0(IndexedStorageChunkStorageProvider.java:122)
at com.hypixel.hytale.sneakythrow.supplier.ThrowableSupplier.get(ThrowableSupplier.java:13)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1789)
... 5 more`
The fix is to run /chunk regenerate 0 8 --confirm, then /world save --all --confirm, then /stop to restart the server. Upon restarting, the map will load a little further and report another corrupted chunk for which I have to regenerate, save the world, and restart the server again.
Right now I have been repeating this process for about 2 hours and it's still not working. I get that maybe these corrupted chunks are not the fault of the mod, but I think an improvement would be to try-catch these errors and allow further chunks to load so that I can get a master list of all the corrupted chunks, regenerate them in bulk, and hopefully then all should be resolved.
This is what the map will look like when it runs into a corrupted chunk while loading:
And then this is what the map looks like for players who join the server after that
So it seems to be crashing the whole plugin from allowing further map loading which requires a full server restart.
Also, /plugin reload dev.ninesliced:BetterMap doesn't repair the plugin either.