Skip to content

ArrayIndexOutOfBoundsException in Sodium's LevelSlice.getBlockState, triggered via Continuity's StandardOverlayQuadProcessor.getEmitter — possible bit-shift bug with negative section Y #823

Description

@Marcy-02

Environment

  • Minecraft 1.21.1, NeoForge 21.1.248
  • Sodium 0.8.12+mc1.21.1
  • Continuity 3.0.0+1.21.neoforge
  • Iris 1.8.14-beta.1

I've hit this crash three times so far, always during chunk mesh building, always on minecraft:deepslate level.

Possible pattern in the corrupted index (unconfirmed, just a hypothesis)
The three crashes I've collected all produced indices that look like clean multiples of 2^21 (2097152) plus a small remainder that would otherwise be a valid array index (0–26, since the LevelSlice cache is a 3×3×3 = 27 array):

Crash Index ≈ Fit
1 -2097139 -(1 × 2^21) + 13
2 -2097140 -(1 × 2^21) + 12
3 -6291443 -(3 × 2^21) + 13

I don't know exacly what this means but it seems like during the neighbor serch a cordinate is being shifted by 21 bits. Since section Y can be negative near bedrock/deep-slate layers, that could produce these large negative indices instead I want to stress this is just a hypothesis from pattern-matching three data points.

Repro conditions (best guess)

  • Happens specifically while rendering deepslate sections
  • All three crashes were around y=-64 to y=-17

crash-2026-08-27_13.52.03-client.txt
crash-2026-08-27_19.12.40-client.txt
crash-2026-08-27_19.20.09-client.txt

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions