Repurposed Structures (Forge)

Repurposed Structures (Forge)

21M Downloads

[crash]: 1.19.2 PoolElementStructurePiece jigsaw pieces

CKY- opened this issue · 6 comments

commented

it would appear as if there is something incorrect in one or more of the jigsaw pieces and is causing a crash

[22.11 04:09:01] [Server] [Server thread/ERROR] [minecraft/PoolElementStructurePiece]: Input does not contain a key [element_type]: MapLike[{}]
[22.11 04:09:01] [Server] [Server thread/ERROR] [minecraft/PiecesContainer]: Exception loading structure piece with id minecraft:jigsaw
[22.11 04:09:01] [Server] java.lang.IllegalStateExceptionInvalid pool element found
[22.11 04:09:01] [Server] 	at net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece.m_163129_(PoolElementStructurePiece.java:55) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:repurposed_structures.mixins.json:structures.PoolElementStructurePieceAccessor,pl:mixin:A}
[22.11 04:09:01] [Server] 	at java.util.Optional.orElseThrow(Optional.java:403) ~[?:?] {re:mixin}
[22.11 04:09:01] [Server] 	at net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece.<init>(PoolElementStructurePiece.java:55) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:repurposed_structures.mixins.json:structures.PoolElementStructurePieceAccessor,pl:mixin:A}
[22.11 04:09:01] [Server] 	at net.minecraft.world.level.levelgen.structure.pieces.PiecesContainer.m_192753_(PiecesContainer.java:73) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:classloading}
[22.11 04:09:01] [Server] 	at net.minecraft.world.level.levelgen.structure.StructureStart.m_226857_(StructureStart.java:56) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A}
[22.11 04:09:01] [Server] 	at net.minecraft.world.level.chunk.storage.ChunkSerializer.m_188254_(ChunkSerializer.java:474) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:mixin,re:classloading,pl:mixin:APP:corgilib.mixins.json:chunk.MixinChunkSerializer,pl:mixin:APP:architectury.mixins.json:MixinChunkSerializer,pl:mixin:A}
[22.11 04:09:01] [Server] 	at net.minecraft.world.level.chunk.storage.ChunkSerializer.m_188230_(ChunkSerializer.java:206) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:mixin,re:classloading,pl:mixin:APP:corgilib.mixins.json:chunk.MixinChunkSerializer,pl:mixin:APP:architectury.mixins.json:MixinChunkSerializer,pl:mixin:A}
[22.11 04:09:01] [Server] 	at net.minecraft.server.level.ChunkMap.m_214889_(ChunkMap.java:563) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A}
[22.11 04:09:01] [Server] 	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?] {}
[22.11 04:09:01] [Server] 	at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?] {}
[22.11 04:09:01] [Server] 	at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:157) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
[22.11 04:09:01] [Server] 	at net.minecraft.server.level.ServerChunkCache$MainThreadExecutor.m_6367_(ServerChunkCache.java:535) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:classloading}
[22.11 04:09:01] [Server] 	at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:131) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
[22.11 04:09:01] [Server] 	at net.minecraft.server.level.ServerChunkCache$MainThreadExecutor.m_7245_(ServerChunkCache.java:543) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:classloading}
[22.11 04:09:01] [Server] 	at net.minecraft.server.level.ServerChunkCache.m_8466_(ServerChunkCache.java:267) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:cupboard.mixins.json:ChunkLoadDebug,pl:mixin:APP:chunkpregen.mixins.json:common.storage.ServerChunkProviderMixin,pl:mixin:APP:smoothchunk.mixins.json:ServerChunkCacheMixin,pl:mixin:A}
[22.11 04:09:01] [Server] 	at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:751) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:A}
[22.11 04:09:01] [Server] 	at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:740) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:A}
[22.11 04:09:01] [Server] 	at net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:116) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
[22.11 04:09:01] [Server] 	at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:725) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:A}
[22.11 04:09:01] [Server] 	at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:658) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:A}
[22.11 04:09:01] [Server] 	at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:244) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:APP:kubejs-common.mixins.json:inject_resources.MinecraftServerMixin,pl:mixin:A}
[22.11 04:09:01] [Server] 	at java.lang.Thread.run(Thread.java:833) [?:?] {re:mixin}

minecraft: 1.19.2
forge: 43.3.5
repurposed_structures_forge: 6.3.28+1.19.2

I have the full log if needed but i need to do alot of redaction as im not going to post 10 players UUIDS and IP address if you need more info let me know and I will trim the logs..

commented

Is this crash happening with rs alone or within a modpack? If modpack, please export or link modpack for me to download as well as the world seed and coordinate of crash.

commented

Within a mod pack, https://legacy.curseforge.com/minecraft/modpacks/overkill3-smp
Seed: [-3751391035715125158]
x:-3697 z:1763
here are the region files from the overworld
region-73-83-93_server124127_22_Nov_2023_12_45_14.zip

let me know if there is anything else you need.

commented

So a few things. First, I tried making world with your seed and going to the coordinates. I even copied in the region files. But I cannot reproduce the crash at all.

Second, looking closer at the stacktrace you provided, it's saying PoolElementStructurePiece is trying to read some data from the chunk but the structure piece in the chunk is missing basically all the data that it should be having: {}

My mod defines the structure pieces for Template Pools through json here which vanilla will read, create PoolElementStructurePiece, and save into chunks itself without me being involved in any of that stuff:
https://github.com/TelepathicGrunt/RepurposedStructures/tree/1.19.0-Forge/src/main/resources/data/repurposed_structures/worldgen/template_pool

What this means is it is physically impossible (ideally) for my mod to ever have an empty Template Pool element. Like if I try to put {} or leave out the "element_type" field in any entry, the game will not start at all. Like clicking a world would throw the datapack error screen and not let you into the world at all.

So what this tells me, is this is highly, highly likely not an issue with my mod. I don't know who is the issue however as the log isn't very helpful. If you know the exact dead chunk that is failing to be parsed, you can open up the region file and try and see if the chunk there has structure refs and narrow down what mod is saving empty invalid Template Pool Entries into the chunk. You can also try deleting the problematic chunks to see if this was just some sort of corruption that happened to your save.

Curious though, what made you think this was an issue with Repurposed Structures?

commented

Thank you for your time.
I will dig around the chunks to see if I can find the issue

what pointed me here and to start to see if this was in fact your mod or not, is the first 2 lines of the error lists your mixin for repurposed_structures.json:structures.PoolElementStructurePieceAccessor
and the access transformer

at net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece.m_163129_(PoolElementStructurePiece.java:55) ~[server-1.19.2-20220805.130853-srg.jar%23989!/:?] **{re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:repurposed_structures.mixins.json:structures.PoolElementStructurePieceAccessor,pl:mixin:A}```
commented

Yeah so accessor mixins are so I can call private methods or fields in other code paths.

To help with reading stacktraces, the left side of the stacktrace is the code that is actually running. The right side after ~ is just forge saying the class itself has mixins/coremods applied to it but not that it is actually running. Right side can be misleading yeah. The left side is the important part and sadly, here it’s not very helpful

commented

yeah it's not sorry to have bothered you. thank you for your help. that makes more sense I'm not a java dev. but I understand what it is to get very little information from us users and that's why I try to be as point a to point b with all the things that I can, such as including region files where needed.