Repository navigation
Record the desktop app's fatal exception to app-crash.log - #1333
Conversation
Avalonia.Native rethrows a UI-callback exception from RunLoop without raising Dispatcher.UnhandledException, so the catch has to wrap the run in Main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
PR Summary by QodoRecord fatal desktop exceptions in app-crash.log
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1.
|
| .Run(); | ||
|
|
||
| BuildAvaloniaApp().StartWithClassicDesktopLifetime(args); | ||
| var crashLog = new AppCrashLog(ConfigRoot.FromEnvironment(), TimeProvider.System); |
There was a problem hiding this comment.
2. The pr reference line lacks linear context 📘 Rule violation ⚙ Maintainability
The PR description's first reference line says Closes #1332 but explicitly provides no Linear issue key. Because the required GitHub and Linear references are not on that same line, reviewers cannot correlate the change with its Linear record.
…1332) A failed trim no longer drops the entry: the log can refuse a delete and still take an append. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #1332 — AI-3523
What & why
A UI-thread exception ends the desktop app with a SIGABRT whose report shows only the rethrow site, and the exception itself is recorded nowhere. The app now appends the fatal exception, with its original stack and the app version, to an owner-only
app-crash.logunder the config root. The process still terminates afterwards.Where to look
The catch wraps
StartWithClassicDesktopLifetimeinMainrather than usingDispatcher.UIThread.UnhandledException: Avalonia.Native catches exceptions from native callbacks (input, render, dispatcher signal) itself and rethrows them fromRunLoop, bypassing that event. TheAppDomainhandler sees the same rethrown object, soAppCrashLogwrites it once.Verification
dotnet run --project test/Capacitor.App.Tests.Unit -- --treenode-filter "/*/*/AppCrashLogTests/*"→ 8/8 passed on macOS (the four Unix-mode/symlink cases skip on Windows). Not exercised in a running app.🤖 Generated with Claude Code