Skip to content

Conversation

@pilot34
Copy link
Collaborator

@pilot34 pilot34 commented Oct 6, 2025

  • Fix: Add UserDefaults.synchronize() to force immediate disk persistence This ensures hang info is saved before app termination during fatal hangs

  • Add .startupFatalHang message type to distinguish from regular fatal hangs in UI tests

  • Add UI test testStartupFatalHang() that validates the fix works in Release mode

  • Add support for simulating startup fatal hangs in test environment

- Fix: Add UserDefaults.synchronize() to force immediate disk persistence
  This ensures hang info is saved before app termination during fatal hangs

- Add .startupFatalHang message type to distinguish from regular fatal hangs

- Add UI test testStartupFatalHang() that validates the fix works in Release mode

- Add support for simulating startup fatal hangs in test environment

The root cause was that UserDefaults doesn't immediately persist to disk,
so when the system killed the app during a fatal hang, the hang information
was lost. Now synchronize() forces immediate disk writes.
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