Repository navigation
Skip empty logs when picking a game's crash log - #588
Open
thehobbit85 wants to merge 1 commit into
Open
thehobbit85 wants to merge 1 commit into
thehobbit85 wants to merge 1 commit into
Conversation
A game that makes its log at start and crashes before writing to it left an empty .log file, and that file was picked as the crash log over what the game printed. The crash window, reports and logs then showed nothing. Empty logs are now passed over, as the game's printed output already was.
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.
What this changes
Refs #356.
To show why a game closed, the launcher picks the newest log from the game's folder, and falls back to what the game printed, then to ReShade's log. The folder walk took any
.logtouched since the game started, including an empty one. A game that makes its log at start and crashes before writing to it leaves an empty file, and that file won over what the game printed. The crash window, Report on GitHub, website reports and Export Logs then showed an empty log, as in the "Last 1 lines of game.log" with nothing under it in #356.Empty files are now passed over in the folder walk and the ReShade fallback, as they already were for the game's printed output.
Limits: a log that only has blank lines in it still counts. I can't confirm this is what happened in #356, only that its report matches it.
How you tested it
Run on macOS against
eaf7ca2, with synthetic logs.New test: an empty
game.logbeside printed output. Onmainthe empty log was picked; with this change the printed output is.Control test: a
game.logwith lines in it is still picked over the printed output.Rust: 1,217 passed, 1 ignored. UI: 1,019 passed, 11 skipped.
git diff --checkclean.npm testpassesnode --test tests/*.test.cjspassesTried it in the launcher (
npm run dev)Checklist
recomplauncher.json