Skip to content

Abort GitHub release check on empty/invalid JSON#7098

Merged
lemondrops merged 1 commit into
86Box:masterfrom
Terr:fix-github-update-check-crash-on-empty-list
Apr 28, 2026
Merged

Abort GitHub release check on empty/invalid JSON#7098
lemondrops merged 1 commit into
86Box:masterfrom
Terr:fix-github-update-check-crash-on-empty-list

Conversation

@Terr

@Terr Terr commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Yesterday, during a GitHub outage (an increasingly common occurrence), I had 86Box (v5.3) crash just after startup, right after it reported the following:

void Downloader::onResult() Downloaded complete: file written to  "/tmp/github_releases.json"
Update check failed with the following error: "Unable to determine release information"

I forgot to check what were the actual contents of the JSON file, but I managed to reproduce the crash and traced the issue to UpdateCheck::githubDownloadComplete.

When the JSON is not really JSON, it crashed at auto githubReleaseList = githubReleaseListResult.value();.

When the JSON array is empty, the crash occurs at first() in: latestVersion = githubReleaseList.first().tag_name.replace("v", "");

Now it will just return from the function after emitting the error message.

(I have no experience with QT but it didn't look like there was anything to clean up or notify)

Checklist

References

N/A

@lemondrops lemondrops merged commit 613dd04 into 86Box:master Apr 28, 2026
44 checks passed
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.

2 participants