Skip to content

Lithium crashes client on corrupted chunk palette instead of safely skipping invalid entries (1.21.1 + Sodium + BetterEnd + C2ME) #717

Open

Description

@kjh1022abc

Hi.

I’m running a heavily modded Fabric 1.21.1 environment (server + client), and I’m repeatedly hitting hard client crashes caused by Lithium when a chunk contains invalid palette entries.

Crash message:

LithiumHashPalette.missingPaletteEntryCrash
Missing Palette entry for index X

This happens during rendering (usually water), often triggered when:

• dying (camera briefly moves through blocks)
• looking through walls for a split second
• Sodium attempts fluid rendering
• BetterEnd applies biome water color

Lithium immediately throws and kills the entire client.

Important detail:
The chunk is already corrupted (null palette slots).
Lithium is not the original cause, but it is the component that hard crashes instead of handling the situation gracefully.

In my case this is most likely introduced by C2ME (Concurrent Chunk Management Engine) running on the server, which can occasionally generate corrupted chunk palettes due to aggressive multithreading.

However, regardless of the origin, the current Lithium behavior turns a recoverable world corruption into an unavoidable client crash.

This leads to situations where:

• players randomly crash when dying
• looking at water instantly closes the game
• affected chunks become impossible to approach
• long term worlds become unplayable

What I’m asking:

Instead of throwing a fatal exception on missing palette entries, could Lithium:

• replace invalid entries with air
• skip the broken section
• log a warning and continue
• or provide a config option to disable hard crashes

Right now Lithium acts as a kill switch for any corrupted chunk, even though the client could technically continue running.

For long term survival servers, this behavior is extremely destructive.

Environment:

Minecraft 1.21.1
Fabric Loader 0.18.x
Sodium present
BetterEnd present
C2ME present on server (removed on client for testing)
Large modpack (200+ mods)
Long running survival world

Removing client side C2ME reduces crash frequency, but the underlying issue remains because Lithium always aborts on palette mismatch.

Please consider making this failure mode non fatal.

Thanks.

crash-2026-02-12_21.19.40-client.txt

Activity

  1. 2No2Name commented on Feb 18, 2026

    @2No2Name
    Member

    Lithium should try being lenient on receiving invalid data. However, the issue is misdiagnosed, as the index 7 that is missing is present during the debug printout, so there's a data race on the client, which is not caused by an invalid packet.

  2. added
    E-external
    A-mods
    on Feb 23, 2026
  3. luigistyle commented on Apr 29, 2026

    @luigistyle

    I'm currently facing this same issue with the same combination of mods. @kjh1022abc, did you end up finding any fixes or workarounds for this? Thanks in advance :)

  4. 2No2Name commented on Apr 30, 2026

    @2No2Name
    Member

    Usually the workaround is removing betterend

  5. luigistyle commented on Apr 30, 2026

    @luigistyle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-modsE-external

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions