Repurposed Structures (Neoforge/Forge)

Repurposed Structures (Neoforge/Forge)

57M Downloads

Crash when worldgen:feature_structure_ShipwreckPieces

FierceManul opened this issue ยท 10 comments

commented

Description: Exception generating new chunk

java.util.ConcurrentModificationException: null
at java.util.HashMap.computeIfAbsent(HashMap.java:1226) ~[?:?] {}
at net.minecraft.world.gen.feature.template.TemplateManager.func_200219_b(SourceFile:64) ~[?:?] {re:classloading}
at net.minecraft.world.gen.feature.template.TemplateManager.func_200220_a(SourceFile:54) ~[?:?] {re:classloading}
at net.minecraft.world.gen.feature.structure.ShipwreckPieces$Piece.func_204754_a(SourceFile:105) ~[?:?] {re:classloading}
at net.minecraft.world.gen.feature.structure.ShipwreckPieces$Piece.(SourceFile:85) ~[?:?] {re:classloading}
at net.minecraft.world.gen.feature.structure.ShipwreckPieces.func_204760_a(SourceFile:70) ~[?:?] {re:classloading}
at net.minecraft.world.gen.feature.structure.ShipwreckStructure$Start.func_230364_a_(SourceFile:35) ~[?:?] {re:classloading}
at net.minecraft.world.gen.feature.structure.ShipwreckStructure$Start.func_230364_a_(SourceFile:25) ~[?:?] {re:classloading}
at net.minecraft.world.gen.feature.structure.Structure.func_242785_a(Structure.java:224) ~[?:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}
at net.minecraft.world.gen.feature.StructureFeature.func_242771_a(SourceFile:35) ~[?:?] {re:classloading}
at net.minecraft.world.gen.ChunkGenerator.func_242705_a(SourceFile:278) ~[?:?] {re:computing_frames,re:mixin,re:classloading}
at net.minecraft.world.gen.ChunkGenerator.func_242707_a(SourceFile:267) ~[?:?] {re:computing_frames,re:mixin,re:classloading}
at net.minecraft.world.chunk.ChunkStatus.lambda$static$2(ChunkStatus.java:41) ~[?:?] {re:classloading,pl:accesstransformer:B}
at net.minecraft.world.chunk.ChunkStatus.func_223198_a(ChunkStatus.java:198) ~[?:?] {re:classloading,pl:accesstransformer:B}
at net.minecraft.world.server.ChunkManager.lambda$null$18(ChunkManager.java:677) ~[?:?] {re:classloading,xf:OptiFine:default}
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:675) ~[?:?] {re:classloading,xf:OptiFine:default}
at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1146) ~[?:?] {}
at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478) ~[?:?] {}
at net.minecraft.world.chunk.ChunkTaskPriorityQueueSorter.func_219083_b(SourceFile:58) ~[?:?] {re:classloading}
at net.minecraft.util.concurrent.DelegatedTaskExecutor.func_213148_e(SourceFile:94) ~[?:?] {re:classloading}
at net.minecraft.util.concurrent.DelegatedTaskExecutor.func_213145_a(SourceFile:137) ~[?:?] {re:classloading}
at net.minecraft.util.concurrent.DelegatedTaskExecutor.run(SourceFile:105) ~[?:?] {re:classloading}
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1429) ~[?:?] {}
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) ~[?:?] {}
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016) ~[?:?] {}
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665) ~[?:?] {re:computing_frames}
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598) ~[?:?] {re:computing_frames}
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177) ~[?:?] {}

crash-2020-11-10_20.39.59-server.txt

commented

Can no upload batches zipfile here.
https://drive.google.com/file/d/1yZCc-eEYShmE_2UbTOzOn4mnF0LTY9JK/view?usp=sharing
seed: 6523992037896405528
x: -749 z: -1633

commented

awesome thank you! I'll check it out

commented

I seen this same issue in fabric when another mod adds properties to blocks in an unsafe manner. Can you provide me the latest.log file after getting the crash? (it would be in the logs folder above the mods folder). And can you export your mods you are using to me? That way I don't have to spend an hour downloading all the mods to find which one is breaking my mod.

commented

Actually scratch what I said before. I misread the log a bit. ConcurrentModificationException means it is trying to access the structure's piece file at the exact same time as another piece. Are you using Java newer than Java 8 and are you on a server or have other people in your world?

The way to get this crash consistently I seen was when a server had people in the Overworld and Nether loading chunks at the same time due to each dimension being on a separate thread or something. And on Java 9+, sometimes the chunk in Overworld has a structure when it is being made at the exact same time a chunk in the Nether is being made. The game tries to get the structures at the exact same time and dies because the code for getting structures is not threadsafe.

This is a vanilla bug and I'm not sure I can even fix it on my end. Or does it happen constantly when no one is on the server? Well, I guess I should wait until you can give me a bit more info of what's going on before I can really say for certain if it is this bug lol

commented

2020-11-10-4.log.gz
2020-11-10-5.log.gz
I using JAVA14, and single play, not in server. Crash when i go to that designated place.
Oh, my mods too big, can`t upload.
adwadawdwad

commented

Yeah that'll take me a while to download all those mods lol. Does zipping and uploading them in batches work instead?

Still, that error is very strange to get in single player.

commented

I am very certain it is this mojang bug: https://bugs.mojang.com/browse/MC-149777

However, I couldn't reproduce the crash on my end with your mods so what I did was ported https://github.com/modmuss50/Voyager Voyager to forge. the jar is below. Can you put on this jar and see if that fixes the crash? It should make java 11+ safe for all structure generations including vanilla's.

structure_safe_java_eleven-1.0.zip

commented

I have circumvented this crash by removing RepurposedStructures, then generating chunks, then re adding it.
And I couldn't reproduce the crash with same seed world too. Really strange.
I will try this jar next time.

commented

It work! Thanks!

commented

Awesome! I'll close this then