Repository navigation
Commit 31de0e6
Fix mutex lock crash when dispatching events during exit (#59830)
* Leak EventEmitter::DispatchMutex to survive static destruction
A function-local static std::mutex is destroyed by exit(). iOS calls exit()
when a foreground app is terminated, and a keyboard or other host callback
that dispatches an event during teardown then locks the destroyed mutex,
which throws std::system_error ("mutex lock failed: Invalid argument")
and terminates the process.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Use no_destroy for EventEmitter::DispatchMutex instead of leaking
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 206bc5b commit 31de0e6
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
41 | 47 | | |
42 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
43 | 52 | | |
44 | 53 | | |
45 | 54 | | |
| |||
0 commit comments