Repository navigation
feat: enhance crash handling - #906
Merged
Merged
Conversation
Replace the hand-rolled LogManager file handling, which rewrote the whole daily file on every appended line and trimmed the newest lines instead of the oldest, with tracing-appender's RollingFileAppender (daily rotation, 7-file retention). Writes go through a dedicated writer thread with an acknowledged Flush message (WorkerGuard exposes no public flush), and every export zip gains a 64 KiB in-memory log tail that survives a wedged or crashed writer. Setting up the logs directory can no longer fail game startup; file logging simply stays disabled. Co-Authored-By: Claude Code <noreply@anthropic.com>
- Uncaught update/render errors show a dismissible dialog again instead of always tearing down into the crash scene; only panics escalate, and record_error is gone with the fatal path. - Only a panic on the frame-loop thread records a crash; worker threads keep their local recovery paths (e.g. the library export thread's error dialog) and are still logged to file. - The crash scene exports logs on a background thread, matching the settings page, so deflating a week of logs cannot ANR the app. - Main::replace_scene drops any open dialog instead of letting it overlay the crash scene with listeners into destroyed scenes. - The crash-record poll runs after the paused wait, so a crash while backgrounded (surface destroyed on Android) only switches scenes after resume. Co-Authored-By: Claude Code <noreply@anthropic.com>
The export slot is shared by every export flow, and the Android and OHOS pickers deliver their fd asynchronously. Nothing blocked navigation during that window, so leaving settings let LibraryPage's unconditional take_export() swallow (and close) the pending config with no output file and no error. LibraryPage now only claims the slot while an export of its own is pending, and SettingsPage locks touch and back for the whole export (export_busy). The pickers report no cancellation, so a pending export is dropped when the page resumes with an empty slot (the fullscreen picker dismissed; Android delivers the fd before onResume), with a game-time deadline as backstop for pickers that never pause the app. Co-Authored-By: Claude Code <noreply@anthropic.com>
Mivik
approved these changes
Oct 23, 2026
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.
增加了崩溃时的异常界面以及日志导出相关功能