Commit 4eda300
fix: Don't crash on iOS double reload when surface presenter has no scheduler (#9672)
## Summary
On a double reload (e.g. during an OTA update, when the app is reloaded
right after evaluating the bundle) React Native can momentarily leave
the surface presenter without a scheduler. `installTurboModule` then hit
a `react_native_assert` on the nil scheduler and aborted with `SIGABRT`.
This nil scheduler is just another symptom of the same non-fatal reload
race already handled by `hasReactNativeFailedReload`, so we detect it
there and bail out with `@NO` instead of asserting.
## Test plan
- Run the fabric-example app on iOS (debug build).
- Trigger a double reload — two fast reloads in a row, or reload
immediately after launch (mimicking the OTA-update timing).
- Before: `SIGABRT` at the `scheduler != nil` assert in
`ReanimatedModule.mm`. After: the app reloads cleanly.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 30e0492 commit 4eda300
1 file changed
Lines changed: 12 additions & 1 deletion
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
167 | 178 | | |
168 | 179 | | |
169 | 180 | | |
| |||
0 commit comments