Skip to content

[Forge 1.20.1] OOB crash on large chunk palette #135

Description

@slenderthey

I don't know anything about scripting, but from what i understand:

The game crashes with an ArrayIndexOutOfBoundsException inside RegistryPalette.find() every time the game loads a specific chunk in the overworld. The error started when the chunk was first visited (although it was pre-generated)

The world was previously perfectly stable, but now it crashes on start up. Removing Surveyor fixes it.
Logs:
latest.log: https://gnomebot.dev/paste/mclogs/QycIzMY

debug.log head: https://gnomebot.dev/paste/mclogs/KFLtoGJ / tail: https://gnomebot.dev/paste/mclogs/gUQG3AI

Crash report (server thread): https://gnomebot.dev/paste/mclogs/zKMparl

PrismLauncher log: https://gnomebot.dev/paste/mclogs/t4b4MZE

Mod list: https://gnomebot.dev/paste/mclogs/AybmWEV

Stack Trace:
java.lang.ArrayIndexOutOfBoundsException: Index 8200 out of bounds for length 8198
at folk.sisby.surveyor.util.RegistryPalette.find(RegistryPalette.java:32)
at folk.sisby.surveyor.util.RegistryPalette.findOrAdd(RegistryPalette.java:45)
at folk.sisby.surveyor.terrain.ChunkSummary.(ChunkSummary.java:89)
at folk.sisby.surveyor.terrain.RegionSummary.putChunk(RegionSummary.java:179)
at folk.sisby.surveyor.terrain.WorldTerrain.onChunkLoad(WorldTerrain.java:77)
...

How to reproduce:
Explore until a chunk generates that contains a block with a palette index > 8198.
This has happened twice in two different worlds in different modpacks, although both modpacks add a lot of blocks. Both times they happened after exploring a lot of terrain with a lot of variety, when entering something like a new biome or modded structure like from Cataclysm. After it starts happening, it will happen every time the world tries to load at least near that chunk.

Edit: if it helps, i tried to do the following: delete the problematic chunk from save file, then load in, pause as soon as i load in, let everything else (Like EMI) load, then unpause. Here are the logs from when EMI finishes loading, to the game crashing: https://mclo.gs/KTVAwXi

Edit 2: I tried using an older version of surveyor (1.1.2+1.20) and the same issue happened, but this time the palette index showed 7224.

Edit 3: Even when moving far away from render distance of the chunk causing the crash, the game still crashes as soon as it loads (https://mclo.gs/Su1aSMp)

This issue has caused me to lost 2 worlds before. I thought it was just a one off glitch but in hindsight it was probably the same thing. Pls allow us to have higher palete index or something idk whats actually going on🙏
I love mods like AA4 that rely on surveyor and it dont think I would be able to play without them

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions