Skip to content

Fix/resourcepack download robustness - #347

Open
wlkek wants to merge 2 commits into
bedrock-tool:masterfrom
wlkek:fix/resourcepack-download-robustness
Open

Fix/resourcepack download robustness#347
wlkek wants to merge 2 commits into
bedrock-tool:masterfrom
wlkek:fix/resourcepack-download-robustness

Conversation

@wlkek

@wlkek wlkek commented Jul 21, 2026

Copy link
Copy Markdown

No description provided.

wlkek added 2 commits July 21, 2026 16:56
When png.Decode returns an error it also returns a nil image. The
surrounding code unconditionally dereferenced the nil image to compute
its bounds, causing a panic in the pack-processing goroutine that
aborted the entire resource pack download session - including any
packs queued after the one with the broken icon.

Skip the icon post-processing when decoding fails; the warning log
already records the failure.
The Minecraft protocol documents ResourcePackDataInfo.UUID as a bare
UUID, but some server implementations send "<uuid>_<version>" (the same
string the client uses in ResourcePackClientResponse.PacksToDownload)
in this field. The previous code returned a hard error for any UUID
that failed to parse, which aborted the entire resource pack download
session for those servers.

When parsing fails, strip the suffix after the last '_' and retry. If
that still does not yield a valid UUID, return the original error so
the caller still sees a clear failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant