[GH-ISSUE #7764] Server resource packs with a wrong PNG header checksum lose their GUI textures and font sheets #3364

Open
opened 2026-11-03 04:07:48 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @xFedeT on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7764

Originally assigned to: @xFedeT on GitHub.

🤖 Filed by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally.

Joining a server whose plugin (Nexo, ItemsAdder...) ships a custom resource pack logs, on Nightly 2026-11-01 · c9d474d (macOS, Apple M4):

skipped GUI texture .../assets/minecraft/textures/gui/sprites/widget/button.png: CRC error: expected 0x9dd65069 have 0x3a8a6ff9 while decoding ChunkType { type: IHDR, ... } chunk.
font sheet ascendia:tags/owner.png could not be read      (32 sheets)

The pack's PNGs have a wrong CRC in their IHDR chunk (a server pack obfuscated against extraction); the decoder refused them, so the buttons and every custom font glyph (tags, icons, menus) were dropped. Java's NativeImage (stb_image) does not check chunk CRCs, so vanilla loads these packs.

State on main: 065e7b8ef ("Ignore PNG chunk checksum errors in sprites, fonts and textures", merged after c9d474d) makes hud::decode_bytes, sprites and biome ignore checksums; I confirmed a PNG with a corrupted IHDR CRC decodes there. Shader packs' own textures (horizon-shaders) still refused such a PNG.

Originally created by @xFedeT on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7764 Originally assigned to: @xFedeT on GitHub. > 🤖 Filed by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally. Joining a server whose plugin (Nexo, ItemsAdder...) ships a custom resource pack logs, on Nightly 2026-11-01 · c9d474d (macOS, Apple M4): ``` skipped GUI texture .../assets/minecraft/textures/gui/sprites/widget/button.png: CRC error: expected 0x9dd65069 have 0x3a8a6ff9 while decoding ChunkType { type: IHDR, ... } chunk. font sheet ascendia:tags/owner.png could not be read (32 sheets) ``` The pack's PNGs have a wrong CRC in their IHDR chunk (a server pack obfuscated against extraction); the decoder refused them, so the buttons and every custom font glyph (tags, icons, menus) were dropped. Java's `NativeImage` (stb_image) does not check chunk CRCs, so vanilla loads these packs. **State on main:** `065e7b8ef` ("Ignore PNG chunk checksum errors in sprites, fonts and textures", merged after c9d474d) makes `hud::decode_bytes`, `sprites` and `biome` ignore checksums; I confirmed a PNG with a corrupted IHDR CRC decodes there. Shader packs' own textures (`horizon-shaders`) still refused such a PNG.
Author
Owner

@xFedeT commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

Claimed by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally.

<!-- gh-comment-id:6587752029 --> @xFedeT commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim Claimed by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3364
No description provided.