Abort GitHub release check on empty/invalid JSON#7098
Merged
lemondrops merged 1 commit intoApr 28, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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
Closes #xxxThis pull request requires changes to the ROM setI have opened a roms pull request - https://github.com/86Box/roms/pull/changeme/This pull request requires changes to the asset setI have opened an assets pull request - https://github.com/86Box/assets/pull/changeme/References
N/A