NullPointerException when generating.
SettingDust opened this issue ยท 6 comments
I'm using https://www.curseforge.com/minecraft/mc-mods/chunkpregenerator with multi threading pre-gen. And it's crashed.
After I turn off the multi threading, the server haven't crashed currently.
I can't confirm whether bettercaves can generate async. So I submit a question for this
1.16.5 Forge
[04Dec2021 10:36:29.048] [Server thread/ERROR] [net.minecraft.server.MinecraftServer/]: Encountered an unexpected exception
java.util.concurrent.CompletionException: net.minecraft.crash.ReportedException: generating air carvers (TerraForged World-Gen)
at java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source) ~[?:1.8.0_311]
at java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source) ~[?:1.8.0_311]
at java.util.concurrent.CompletableFuture.uniCompose(Unknown Source) ~[?:1.8.0_311]
at java.util.concurrent.CompletableFuture$UniCompose.tryFire(Unknown Source) ~[?:1.8.0_311]
at java.util.concurrent.CompletableFuture$Completion.run(Unknown Source) ~[?:1.8.0_311]
at net.minecraft.world.chunk.ChunkTaskPriorityQueueSorter.func_219083_b(SourceFile:58) ~[?:?]
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(Unknown Source) ~[?:1.8.0_311]
at java.util.concurrent.ForkJoinTask.doExec(Unknown Source) ~[?:1.8.0_311]
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source) ~[?:1.8.0_311]
at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) ~[?:1.8.0_311]
at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) ~[?:1.8.0_311]
Caused by: net.minecraft.crash.ReportedException: generating air carvers (TerraForged World-Gen)
at net.minecraft.world.server.ChunkManager.lambda$null$18(ChunkManager.java:535) ~[?:?]
at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[?:?]
at net.minecraft.world.server.ChunkManager.lambda$scheduleChunkGeneration$20(ChunkManager.java:522) ~[?:?]
... 9 more
Caused by: java.lang.NullPointerException
at com.yungnickyoung.minecraft.bettercaves.world.carver.controller.CaveCarverController.carveChunk(CaveCarverController.java:209) ~[bettercaves:1.16.4-1.1.2]
at com.yungnickyoung.minecraft.bettercaves.world.carver.controller.MasterController.carveRegion(MasterController.java:53) ~[bettercaves:1.16.4-1.1.2]
at com.yungnickyoung.minecraft.bettercaves.world.carver.BetterCavesCarver.carveRegion(BetterCavesCarver.java:87) ~[bettercaves:1.16.4-1.1.2]
at com.yungnickyoung.minecraft.bettercaves.world.carver.BetterCavesCarver.func_225555_a_(BetterCavesCarver.java:27) ~[bettercaves:1.16.4-1.1.2]
at net.minecraft.world.gen.carver.ConfiguredCarver.func_227207_a_(SourceFile:39) ~[?:?]
at com.terraforged.mod.chunk.generator.TerrainCarver.carve(TerrainCarver.java:104) ~[terraforged:1.16.5-0.2.16-BETA-2]
at com.terraforged.mod.chunk.generator.TerrainCarver.carveTerrain(TerrainCarver.java:72) ~[terraforged:1.16.5-0.2.16-BETA-2]
at com.terraforged.mod.chunk.TFChunkGenerator.func_230350_a_(TFChunkGenerator.java:241) ~[terraforged:1.16.5-0.2.16-BETA-2]
at net.minecraft.world.chunk.ChunkStatus.func_222590_c(ChunkStatus.java:66) ~[?:?]
at net.minecraft.world.chunk.ChunkStatus$ISelectiveWorker.doWork(ChunkStatus.java:240) ~[?:?]
at net.minecraft.world.chunk.ChunkStatus.func_223198_a(ChunkStatus.java:198) ~[?:?]
at net.minecraft.world.server.ChunkManager.lambda$null$18(ChunkManager.java:524) ~[?:?]
at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[?:?]
at net.minecraft.world.server.ChunkManager.lambda$scheduleChunkGeneration$20(ChunkManager.java:522) ~[?:?]
... 9 more
Better Caves relies on each chunk being confined to a single thread in order to push/pop its CarvingContext in a ThreadLocal variable. I don't know to what extent Chunk Pregenerator changes the threading of chunk generation, but I wouldn't be surprised if it's not compatible.
I fied it by reconfiguring it, dont remember what though
The only Chunk PRejenerator that I have its this one
https://www.curseforge.com/minecraft/mc-mods/chunkpregenerator
Cab Confirm
Time: 12/13/21 4:38 PM
Description: Exception generating new chunk
java.lang.NullPointerException: Exception generating new chunk
at net.minecraft.world.gen.feature.jigsaw.JigsawOrientation.func_239643_b_(SourceFile:37) ~[?:?] {re:classloading}
at net.minecraft.world.gen.feature.jigsaw.JigsawOrientation.func_239641_a_(SourceFile:52) ~[?:?] {re:classloading}
at net.minecraft.util.math.vector.Orientation.func_235531_a_(SourceFile:203) ~[?:?] {re:classloading}
at net.minecraft.block.JigsawBlock.func_185499_a(SourceFile:38) ~[?:?] {re:classloading,pl:accesstransformer:B}
at net.minecraft.block.AbstractBlock$AbstractBlockState.func_185907_a(AbstractBlock.java:457) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:losttrinkets.mixins.json:AbstractBlockStateMixin,pl:mixin:APP:supplementaries.mixins.json:AbstractBlockMixin,pl:mixin:APP:immersiveengineering.mixins.json:coremods.AbstractBlockStateMixin,pl:mixin:A}
at net.minecraft.world.gen.feature.template.Template.func_215386_a(Template.java:175) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A}
at net.minecraft.world.gen.feature.jigsaw.SingleJigsawPiece.func_214849_a(SingleJigsawPiece.java:93) ~[?:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}
at com.yungnickyoung.minecraft.yungsapi.world.jigsaw.JigsawManager$Assembler.processPiece(JigsawManager.java:145) ~[?:1.16.4-Forge-13] {re:classloading}
at com.yungnickyoung.minecraft.yungsapi.world.jigsaw.JigsawManager.assembleJigsawStructure(JigsawManager.java:104) ~[?:1.16.4-Forge-13] {re:classloading}
at com.yungnickyoung.minecraft.yungsapi.api.YungJigsawManager.assembleJigsawStructure(YungJigsawManager.java:60) ~[?:1.16.4-Forge-13] {re:classloading}
at com.yungnickyoung.minecraft.betterdungeons.world.structure.small_dungeon.SmallDungeonStructure$Start.func_230364_a_(SmallDungeonStructure.java:77) ~[?:1.16.4-1.2.1] {re:classloading}
at com.yungnickyoung.minecraft.betterdungeons.world.structure.small_dungeon.SmallDungeonStructure$Start.func_230364_a_(SmallDungeonStructure.java:55) ~[?:1.16.4-1.2.1] {re:classloading}
at net.minecraft.world.gen.feature.structure.Structure.func_242785_a(Structure.java:224) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:performant.mixins.json:world.StructureMixin,pl:mixin:A}
at net.minecraft.world.gen.feature.StructureFeature.func_242771_a(SourceFile:35) ~[?:?] {re:mixin,re:classloading}
at net.minecraft.world.gen.ChunkGenerator.func_242705_a(SourceFile:278) ~[?:?] {re:mixin,re:computing_frames,re:classloading,pl:mixin:APP:betterdungeons.mixins.json:ChunkGeneratorAccessor,pl:mixin:APP:yungsapi.mixins.json:ChunkGeneratorAccessor,pl:mixin:APP:endrem.mixins.json:world.ChunkGeneratorMixin,pl:mixin:APP:tardis.mixins.json:ChunkGeneratorInvokerMixin,pl:mixin:A}
at net.minecraft.world.gen.ChunkGenerator.func_242707_a(SourceFile:267) ~[?:?] {re:mixin,re:computing_frames,re:classloading,pl:mixin:APP:betterdungeons.mixins.json:ChunkGeneratorAccessor,pl:mixin:APP:yungsapi.mixins.json:ChunkGeneratorAccessor,pl:mixin:APP:endrem.mixins.json:world.ChunkGeneratorMixin,pl:mixin:APP:tardis.mixins.json:ChunkGeneratorInvokerMixin,pl:mixin:A}
at net.minecraft.world.chunk.ChunkStatus.func_222586_d(ChunkStatus.java:41) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:bettercaves.mixins.json:ChunkStatusMixin,pl:mixin:A}
at net.minecraft.world.chunk.ChunkStatus$$Lambda$2343/458446213.doWork(Unknown Source) ~[?:?] {}
at net.minecraft.world.chunk.ChunkStatus.func_223198_a(ChunkStatus.java:198) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:bettercaves.mixins.json:ChunkStatusMixin,pl:mixin:A}
at net.minecraft.world.server.ChunkManager.lambda$null$18(ChunkManager.java:675) ~[?:?] {re:mixin,pl:accesstransformer:B,xf:OptiFine:default,re:classloading,pl:accesstransformer:B,xf:OptiFine:default,pl:mixin:APP:performant.mixins.json:world.chunk.ChunkManagerMixin,pl:mixin:APP:performant.mixins.json:world.chunk.ChunkManagerUpdatePlayerPosMixin,pl:mixin:APP:performant.mixins.json:world.chunk.ChunkManagerChunksAccessor,pl:mixin:A}
at net.minecraft.world.server.ChunkManager$$Lambda$35229/1175136233.apply(Unknown Source) ~[?:?] {}
at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-4.0.26.jar:?] {re:classloading,re:classloading}
at net.minecraft.world.server.ChunkManager.lambda$chunkGenerate$20(ChunkManager.java:673) ~[?:?] {re:mixin,pl:accesstransformer:B,xf:OptiFine:default,re:classloading,pl:accesstransformer:B,xf:OptiFine:default,pl:mixin:APP:performant.mixins.json:world.chunk.ChunkManagerMixin,pl:mixin:APP:performant.mixins.json:world.chunk.ChunkManagerUpdatePlayerPosMixin,pl:mixin:APP:performant.mixins.json:world.chunk.ChunkManagerChunksAccessor,pl:mixin:A}
at net.minecraft.world.server.ChunkManager$$Lambda$35223/1290240422.apply(Unknown Source) ~[?:?] {}
at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:952) ~[?:1.8.0_51] {}
at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:926) ~[?:1.8.0_51] {}
at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442) ~[?:1.8.0_51] {}
at net.minecraft.world.chunk.ChunkTaskPriorityQueueSorter.func_219083_b(SourceFile:58) ~[?:?] {re:classloading}
at net.minecraft.world.chunk.ChunkTaskPriorityQueueSorter$$Lambda$35037/923086847.run(Unknown Source) ~[?:?] {}
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402) ~[?:1.8.0_51] {}
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:1.8.0_51] {}
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) ~[?:1.8.0_51] {}
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1689) ~[?:1.8.0_51] {re:computing_frames}
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) ~[?:1.8.0_51] {}