Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

"Missing palette entry for index..." crash when loading chunks #2869

Open
xannieqt opened this issue Nov 7, 2024 · 12 comments
Open

"Missing palette entry for index..." crash when loading chunks #2869

xannieqt opened this issue Nov 7, 2024 · 12 comments
Assignees
Labels
A-mods Area: Mod compatibility P-high Priority: High S-info-needed Status: Info needed T-crash Type: Crash or hang
Milestone

Comments

@xannieqt
Copy link

xannieqt commented Nov 7, 2024

Bug Description

The game is constantly crashing, however during somewhat random events. According to the logs, it does mention water blocks, but the game spits the same error(s) regardless of the area, whether there is water there or not.

I'm running Sodium for Minecraft 1.21, but more specifically on a modpack (https://modrinth.com/modpack/cxties-vanilla+).

Reproduction Steps

There isn't really anything I have to do in order to reproduce the issue, as it keeps happening regardless of the actions I do.

Log File

latest.log
2024-11-07-2.log.gz

Crash Report

crash-2024-11-07_06.02.57-client.txt
crash-2024-11-06_21.06.27-client.txt

@xannieqt xannieqt added the S-needs-triage Status: Needs triage label Nov 7, 2024
@jellysquid3
Copy link
Member

jellysquid3 commented Nov 7, 2024

It seems there are chunks in your save file which have blocks without any mapping. This is often the case of world corruption.

Have you verified whether the issue happens without Sodium and Lithium present? Probably this crash would continue to happen, since Minecraft doesn't handle the problem very well either.

@xannieqt
Copy link
Author

xannieqt commented Nov 7, 2024

I have played ~1 hour without having Sodium installed, lithium was however still present. This caused no crashes.
2024-11-07-5.log.gz

I later installed Sodium once again, and the game crashed in about a minute.
crash-2024-11-07_16.18.01-client.txt
2024-11-07-6.log.gz

@pajicadvance
Copy link
Member

pajicadvance commented Nov 7, 2024

Likely caused by a mixin to BiomeColors from BetterEnd:

https://github.com/quiqueck/BetterEnd/blob/1.21/src/main/java/org/betterx/betterend/mixin/client/BiomeColorsMixin.java#L32-L47

Not exactly sure why it would cause this crash, but the method is mentioned in the crash log and there seems to be Sodium exclusive handling in there.

@pajicadvance pajicadvance added A-mods Area: Mod compatibility and removed S-needs-triage Status: Needs triage labels Nov 7, 2024
@jellysquid3
Copy link
Member

I don't see why that mixin would cause the crash. The problem is happening way earlier when the world is sliced and sent to meshing threads. However, that hack they're using is terrible... presumably they're trying to get around the fact that Sodium only copies so many blocks into a slice, but accessing the client world from the meshing threads will completely violate memory safety!

@jellysquid3 jellysquid3 added T-crash Type: Crash or hang and removed A-mods Area: Mod compatibility labels Nov 8, 2024
@jellysquid3 jellysquid3 changed the title 1.21 Crashes Crash with "Missing palette entry for index..." in certain chunks Nov 8, 2024
@jacobmoerch
Copy link

I have the same issue using the Better minecraft Fabric modpack for 1.21: https://www.curseforge.com/minecraft/modpacks/better-mc-fabric-bmc3/files/5886831

"net.minecraft.world.chunk.EntryMissingException: Missing Palette entry for index 20."

crash-2024-11-11_17.18.20-client.txt

My crash log also mentions the same mixin:
"at knot//MC//net.minecraft.client.color.world.BiomeColors.handler$bja000$betterend$be_getWaterColor(BiomeColors.java:1041)"

It is likely that this crash is caused by BetterEnd, however it is hard to reproduce as it happens kind of randomly. Should I perhaps contact the creator behind BetterEnd, or what do you propose?

@jellysquid3
Copy link
Member

My suggestion is that you check whether BetterEnd is actually conflicting by removing the mod, since it's not obvious from reading the code (though anything is possible when you're corrupting memory.)

If removing it does resolve the issue, then please open an issue with the BetterEnd developers. Though I suspect they won't be able to get rid of that mixin unless we modify the way chunk data is copied to include some additional blocks around a chunk, since that appears to be the whole reason they're doing this in the first place.

@jellysquid3 jellysquid3 added the A-mods Area: Mod compatibility label Nov 12, 2024
@jacobmoerch
Copy link

Alright, I will try to find a way to reproduce the crash in a more consistent way. At the moment I have no idea how to reproduce the crash, and I find that it just happens pretty randomly. If you have any ideas on how this crash could possibly be reproduced, it would definitely be of help.

@jellysquid3 jellysquid3 self-assigned this Nov 12, 2024
@douira douira added this to the Sodium 0.6 milestone Nov 12, 2024
@xannieqt
Copy link
Author

Just an update on this. I have been running the modpack without BetterEnd and it have been working flawlessly, there have not been a single crash since the mod was fully removed.

@jacobmoerch
Copy link

@jellysquid3 I have contacted the BetterX developers and they said this about the issue:

billede
billede
billede

They confirmed that this is a conlfict between BetterEnd and Sodium, and that the latest beta releases of Sodium caused this incompatibility.

@jellysquid3 jellysquid3 changed the title Crash with "Missing palette entry for index..." in certain chunks Crash with "Missing palette entry for index..." in certain chunks when using BetterEnd Nov 14, 2024
@jellysquid3 jellysquid3 added the P-high Priority: High label Nov 14, 2024
@jellysquid3
Copy link
Member

jellysquid3 commented Nov 14, 2024

If you are using Lithium, can you please try removing it? There might be a problematic interaction only between the combination of Sodium + Lithium + BetterEnd. Right now it is very difficult to tell where the problem is occuring.

If you do find that removing Lithium solves the problem, then modify the lithium-mixins.properties configuration file to include the following line...

mixin.chunk.palette=false

... and let us know if that fixes the crash.

@jellysquid3 jellysquid3 added the S-info-needed Status: Info needed label Nov 14, 2024
@jellysquid3 jellysquid3 modified the milestones: Sodium 0.6, Sodium 0.6.1 Nov 17, 2024
@legomaniac89
Copy link

legomaniac89 commented Nov 27, 2024

Any updates here? I'm having the same issue, but I'm in a server, so removing BetterEnd isn't really an option.

I've removed Lithium completely, and am still getting the exact same client-side crashes.

@jellysquid3 jellysquid3 modified the milestones: Sodium 0.6.1, Sodium 0.6.2 Dec 2, 2024
@jellysquid3 jellysquid3 pinned this issue Dec 9, 2024
@jellysquid3 jellysquid3 changed the title Crash with "Missing palette entry for index..." in certain chunks when using BetterEnd "Missing palette entry for index..." crash when loading chunks Dec 9, 2024
@GeneralWaffle
Copy link

I am also experiencing crashes. Having Sodium, Lithium and BetterEnd installed.
https://mclo.gs/k58mOJS

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-mods Area: Mod compatibility P-high Priority: High S-info-needed Status: Info needed T-crash Type: Crash or hang
Projects
None yet
Development

No branches or pull requests

7 participants