Reloading a dev app rapidly crashes the app
Description
When repeatedly reloading the app pressing "r" in the metro bundler the app crashes
Steps to reproduce
- Run the example application on iOS [Note: I think this should be reproducible with the react-native example app]
1.1
cd ReproducerApp1.2yarn1.3yarn pods1.4 Open the iOS project and buildxed ios - Make sure its on new arch & bridgleless
- In the metro bundler spam the "r" button for reload (you might need to spam it many many times)
- You'll get a crash
Note: The effect is amplified in a real world app with more elements.
React Native Version
0.74.1
Affected Platforms
Runtime - iOS
Areas
Fabric - The New Renderer
Output of npx react-native info
Note: This command is broken and doesn't work asof RN 0.74.1
OS: macOS Sonoma 14.4.1
Node Version: v20.13.0
react-native version: 0.74.1
Stacktrace or Logs
com.facebook.react.runtime.JavaScript (22)
#0 0x00000001048dc304 in facebook::react::Scheduler::uiManagerDidFinishTransaction(std::__1::shared_ptr<facebook::react::MountingCoordinator const>, bool)::$_7::operator()() const at /Users/hannomargelo/Documents/Github/react-native-worklets-core/package/example/node_modules/react-native/ReactCommon/react/renderer/scheduler/Scheduler.cpp:290
#1 0x00000001048dc2dc in decltype(std::declval<facebook::react::Scheduler::uiManagerDidFinishTransaction(std::__1::shared_ptr<facebook::react::MountingCoordinator const>, bool)::$_7&>()()) std::__1::__invoke[abi:ue170006]<facebook::react::Scheduler::uiManagerDidFinishTransaction(std::__1::shared_ptr<facebook::react::MountingCoordinator const>, bool)::$_7&>(facebook::react::Scheduler::uiManagerDidFinishTransaction(std::__1::shared_ptr<facebook::react::MountingCoordinator const>, bool)::$_7&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__type_traits/invoke.h:340
#2 0x00000001048dc294 in void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ue170006]<facebook::react::Scheduler::uiManagerDidFinishTransaction(std::__1::shared_ptr<facebook::react::MountingCoordinator const>, bool)::$_7&>(facebook::react::Scheduler::uiManagerDidFinishTransaction(std::__1::shared_ptr<facebook::react::MountingCoordinator const>, bool)::$_7&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__type_traits/invoke.h:415
#3 0x00000001048dc270 in std::__1::__function::__alloc_func<facebook::react::Scheduler::uiManagerDidFinishTransaction(std::__1::shared_ptr<facebook::react::MountingCoordinator const>, bool)::$_7, std::__1::allocator<facebook::react::Scheduler::uiManagerDidFinishTransaction(std::__1::shared_ptr<facebook::react::MountingCoordinator const>, bool)::$_7>, void ()>::operator()[abi:ue170006]() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__functional/function.h:193
#4 0x00000001048daf84 in std::__1::__function::__func<facebook::react::Scheduler::uiManagerDidFinishTransaction(std::__1::shared_ptr<facebook::react::MountingCoordinator const>, bool)::$_7, std::__1::allocator<facebook::react::Scheduler::uiManagerDidFinishTransaction(std::__1::shared_ptr<facebook::react::MountingCoordinator const>, bool)::$_7>, void ()>::operator()() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__functional/function.h:364
#5 0x0000000104613a48 in std::__1::__function::__value_func<void ()>::operator()[abi:ue170006]() const at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__functional/function.h:518
#6 0x0000000104613968 in std::__1::function<void ()>::operator()() const at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__functional/function.h:1169
#7 0x0000000104d8f58c in facebook::react::RuntimeScheduler_Modern::updateRendering() at /Users/hannomargelo/Documents/Github/react-native-worklets-core/package/example/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp:321
#8 0x0000000104d8edb4 in facebook::react::RuntimeScheduler_Modern::executeTask(facebook::jsi::Runtime&, std::__1::shared_ptr<facebook::react::Task> const&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>>) at /Users/hannomargelo/Documents/Github/react-native-worklets-core/package/example/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp:306
#9 0x0000000104d8e868 in facebook::react::RuntimeScheduler_Modern::startWorkLoop(facebook::jsi::Runtime&, bool) at /Users/hannomargelo/Documents/Github/react-native-worklets-core/package/example/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp:245
#10 0x0000000104d978cc in facebook::react::RuntimeScheduler_Modern::scheduleWorkLoop()::$_1::operator()(facebook::jsi::Runtime&) const at /Users/hannomargelo/Documents/Github/react-native-worklets-core/package/example/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp:224
#11 0x0000000104d97894 in decltype(std::declval<facebook::react::RuntimeScheduler_Modern::scheduleWorkLoop()::$_1&>()(std::declval<facebook::jsi::Runtime&>())) std::__1::__invoke[abi:ue170006]<facebook::react::RuntimeScheduler_Modern::scheduleWorkLoop()::$_1&, facebook::jsi::Runtime&>(facebook::react::RuntimeScheduler_Modern::scheduleWorkLoop()::$_1&, facebook::jsi::Runtime&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__type_traits/invoke.h:340
#12 0x0000000104d97844 in void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ue170006]<facebook::react::RuntimeScheduler_Modern::scheduleWorkLoop()::$_1&, facebook::jsi::Runtime&>(facebook::react::RuntimeScheduler_Modern::scheduleWorkLoop()::$_1&, facebook::jsi::Runtime&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__type_traits/invoke.h:415
#13 0x0000000104d97818 in std::__1::__function::__alloc_func<facebook::react::RuntimeScheduler_Modern::scheduleWorkLoop()::$_1, std::__1::allocator<facebook::react::RuntimeScheduler_Modern::scheduleWorkLoop()::$_1>, void (facebook::jsi::Runtime&)>::operator()[abi:ue170006](facebook::jsi::Runtime&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__functional/function.h:193
#14 0x0000000104d96694 in std::__1::__function::__func<facebook::react::RuntimeScheduler_Modern::scheduleWorkLoop()::$_1, std::__1::allocator<facebook::react::RuntimeScheduler_Modern::scheduleWorkLoop()::$_1>, void (facebook::jsi::Runtime&)>::operator()(facebook::jsi::Runtime&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__functional/function.h:364
#15 0x0000000104684000 in std::__1::__function::__value_func<void (facebook::jsi::Runtime&)>::operator()[abi:ue170006](facebook::jsi::Runtime&) const at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__functional/function.h:518
#16 0x000000010468243c in std::__1::function<void (facebook::jsi::Runtime&)>::operator()(facebook::jsi::Runtime&) const at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__functional/function.h:1169
#17 0x0000000104c32284 in facebook::react::ReactInstance::ReactInstance(std::__1::unique_ptr<facebook::react::JSRuntime, std::__1::default_delete<facebook::react::JSRuntime>>, std::__1::shared_ptr<facebook::react::MessageQueueThread>, std::__1::shared_ptr<facebook::react::TimerManager>, std::__1::function<void (facebook::react::MapBuffer)>, facebook::react::jsinspector_modern::PageTarget*)::$_0::operator()(std::__1::function<void (facebook::jsi::Runtime&)>&&) const::'lambda'()::operator()() const at /Users/hannomargelo/Documents/Github/react-native-worklets-core/package/example/node_modules/react-native/ReactCommon/react/runtime/ReactInstance.cpp:70
#18 0x0000000104c32208 in decltype(std::declval<facebook::react::ReactInstance::ReactInstance(std::__1::unique_ptr<facebook::react::JSRuntime, std::__1::default_delete<facebook::react::JSRuntime>>, std::__1::shared_ptr<facebook::react::MessageQueueThread>, std::__1::shared_ptr<facebook::react::TimerManager>, std::__1::function<void (facebook::react::MapBuffer)>, facebook::react::jsinspector_modern::PageTarget*)::$_0::operator()(std::__1::function<void (facebook::jsi::Runtime&)>&&) const::'lambda'()&>()()) std::__1::__invoke[abi:ue170006]<facebook::react::ReactInstance::ReactInstance(std::__1::unique_ptr<facebook::react::JSRuntime, std::__1::default_delete<facebook::react::JSRuntime>>, std::__1::shared_ptr<facebook::react::MessageQueueThread>, std::__1::shared_ptr<facebook::react::TimerManager>, std::__1::function<void (facebook::react::MapBuffer)>, facebook::react::jsinspector_modern::PageTarget*)::$_0::operator()(std::__1::function<void (facebook::jsi::Runtime&)>&&) const::'lambda'()&>(facebook::react::ReactInstance::ReactInstance(std::__1::unique_ptr<facebook::react::JSRuntime, std::__1::default_delete<facebook::react::JSRuntime>>, std::__1::shared_ptr<facebook::react::MessageQueueThread>, std::__1::shared_ptr<facebook::react::TimerManager>, std::__1::function<void (facebook::react::MapBuffer)>, facebook::react::jsinspector_modern::PageTarget*)::$_0::operator()(std::__1::function<void (facebook::jsi::Runtime&)>&&) const::'lambda'()&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__type_traits/invoke.h:340
#19 0x0000000104c321c0 in void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ue170006]<facebook::react::ReactInstance::ReactInstance(std::__1::unique_ptr<facebook::react::JSRuntime, std::__1::default_delete<facebook::react::JSRuntime>>, std::__1::shared_ptr<facebook::react::MessageQueueThread>, std::__1::shared_ptr<facebook::react::TimerManager>, std::__1::function<void (facebook::react::MapBuffer)>, facebook::react::jsinspector_modern::PageTarget*)::$_0::operator()(std::__1::function<void (facebook::jsi::Runtime&)>&&) const::'lambda'()&>(facebook::react::ReactInstance::ReactInstance(std::__1::unique_ptr<facebook::react::JSRuntime, std::__1::default_delete<facebook::react::JSRuntime>>, std::__1::shared_ptr<facebook::react::MessageQueueThread>, std::__1::shared_ptr<facebook::react::TimerManager>, std::__1::function<void (facebook::react::MapBuffer)>, facebook::react::jsinspector_modern::PageTarget*)::$_0::operator()(std::__1::function<void (facebook::jsi::Runtime&)>&&) const::'lambda'()&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__type_traits/invoke.h:415
#20 0x0000000104c3219c in std::__1::__function::__alloc_func<facebook::react::ReactInstance::ReactInstance(std::__1::unique_ptr<facebook::react::JSRuntime, std::__1::default_delete<facebook::react::JSRuntime>>, std::__1::shared_ptr<facebook::react::MessageQueueThread>, std::__1::shared_ptr<facebook::react::TimerManager>, std::__1::function<void (facebook::react::MapBuffer)>, facebook::react::jsinspector_modern::PageTarget*)::$_0::operator()(std::__1::function<void (facebook::jsi::Runtime&)>&&) const::'lambda'(), std::__1::allocator<facebook::react::ReactInstance::ReactInstance(std::__1::unique_ptr<facebook::react::JSRuntime, std::__1::default_delete<facebook::react::JSRuntime>>, std::__1::shared_ptr<facebook::react::MessageQueueThread>, std::__1::shared_ptr<facebook::react::TimerManager>, std::__1::function<void (facebook::react::MapBuffer)>, facebook::react::jsinspector_modern::PageTarget*)::$_0::operator()(std::__1::function<void (facebook::jsi::Runtime&)>&&) const::'lambda'()>, void ()>::operator()[abi:ue170006]() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__functional/function.h:193
#21 0x0000000104c30ef4 in std::__1::__function::__func<facebook::react::ReactInstance::ReactInstance(std::__1::unique_ptr<facebook::react::JSRuntime, std::__1::default_delete<facebook::react::JSRuntime>>, std::__1::shared_ptr<facebook::react::MessageQueueThread>, std::__1::shared_ptr<facebook::react::TimerManager>, std::__1::function<void (facebook::react::MapBuffer)>, facebook::react::jsinspector_modern::PageTarget*)::$_0::operator()(std::__1::function<void (facebook::jsi::Runtime&)>&&) const::'lambda'(), std::__1::allocator<facebook::react::ReactInstance::ReactInstance(std::__1::unique_ptr<facebook::react::JSRuntime, std::__1::default_delete<facebook::react::JSRuntime>>, std::__1::shared_ptr<facebook::react::MessageQueueThread>, std::__1::shared_ptr<facebook::react::TimerManager>, std::__1::function<void (facebook::react::MapBuffer)>, facebook::react::jsinspector_modern::PageTarget*)::$_0::operator()(std::__1::function<void (facebook::jsi::Runtime&)>&&) const::'lambda'()>, void ()>::operator()() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__functional/function.h:364
#22 0x0000000104613a48 in std::__1::__function::__value_func<void ()>::operator()[abi:ue170006]() const at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__functional/function.h:518
#23 0x0000000104613968 in std::__1::function<void ()>::operator()() const at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__functional/function.h:1169
#24 0x0000000104664ad4 in facebook::react::tryAndReturnError(std::__1::function<void ()> const&) at /Users/hannomargelo/Documents/Github/react-native-worklets-core/package/example/node_modules/react-native/React/CxxModule/RCTCxxUtils.mm:73
#25 0x000000010468cfb0 in facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&) at /Users/hannomargelo/Documents/Github/react-native-worklets-core/package/example/node_modules/react-native/React/CxxBridge/RCTMessageThread.mm:68
#26 0x0000000104691e40 in facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1::operator()() const at /Users/hannomargelo/Documents/Github/react-native-worklets-core/package/example/node_modules/react-native/React/CxxBridge/RCTMessageThread.mm:81
#27 0x0000000104691de4 in decltype(std::declval<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&>()()) std::__1::__invoke[abi:ue170006]<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&>(facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__type_traits/invoke.h:340
#28 0x0000000104691d9c in void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ue170006]<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&>(facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__type_traits/invoke.h:415
#29 0x0000000104691d78 in std::__1::__function::__alloc_func<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1, std::__1::allocator<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1>, void ()>::operator()[abi:ue170006]() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__functional/function.h:193
#30 0x0000000104690a88 in std::__1::__function::__func<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1, std::__1::allocator<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1>, void ()>::operator()() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__functional/function.h:364
#31 0x0000000104613a48 in std::__1::__function::__value_func<void ()>::operator()[abi:ue170006]() const at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__functional/function.h:518
#32 0x0000000104613968 in std::__1::function<void ()>::operator()() const at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__functional/function.h:1169
#33 0x000000010468cd74 in invocation function for block in facebook::react::RCTMessageThread::runAsync(std::__1::function<void ()>) at /Users/hannomargelo/Documents/Github/react-native-worklets-core/package/example/node_modules/react-native/React/CxxBridge/RCTMessageThread.mm:44
#34 0x000000018040ec50 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ ()
#35 0x000000018040e398 in __CFRunLoopDoBlocks ()
#36 0x0000000180409264 in __CFRunLoopRun ()
#37 0x0000000180408514 in CFRunLoopRunSpecific ()
#38 0x0000000104c1a228 in +[RCTJSThreadManager runRunLoop] at /Users/hannomargelo/Documents/Github/react-native-worklets-core/package/example/node_modules/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTJSThreadManager.mm:102
#39 0x0000000180e10be4 in __NSThread__start__ ()
#40 0x0000000106fab414 in _pthread_start ()
Reproducer
https://github.com/hannojg/crash-on-reload
Screenshots and Videos
https://github.com/facebook/react-native/assets/16821682/c3f66127-6ddd-4f76-bfeb-72ec87cfdfdc
@hannojg Thanks for the issue. I just tried myself with an app on 0.74.1 and I could not reproduce the issue:
https://github.com/facebook/react-native/assets/11162307/7a518ccb-57dd-4e80-9b51-fca3eff0030d
I created a new app with 0.74.1 to reproduce your same scenario and environment. I can't repro the issue there either.
https://github.com/facebook/react-native/assets/11162307/ee96e177-02ba-4da4-b05c-7df0a417976e
Hmm, this is odd, I can reliably reproduce this issue 🤔 Can you try the reproduction app? I just pushed a new commit that renders react components that are similar to our app where we experience the crash:
https://github.com/facebook/react-native/assets/16821682/2a549a3c-257c-494d-983a-a4bcc8a34162
// Note: I wasn't able to reproduce the issue on a real device; not sure what could make the difference
uhm, you sure you pushed? I only see these commits:
Perhaps you committed but not pushed to remote?
I just tried with the reproducer (which spins up a new app with 0.74.1) and can't repro it... :/
So sorry, forgot to push, its up now!
😞 😞 😞 😞 😞 😞 😞 😞
...no crashes...
https://github.com/facebook/react-native/assets/11162307/2556c328-e5fc-41d4-a152-87a497071998
Thanks for testing, so weird it's not reproducible on your end. I see that you use iOS 17.5, where I am using 17.4 (although I wouldn't know what difference that could make). Will upgrade tonight and try to reproduce tmrw on iOS 17.5 (any other ideas what could cause the difference?)
that could be something, actually. I'm using Xcode 15.4 and Apple made several changes in Xcode 15 for C++, in every version basically... So perhaps that fixes? Today I don't have any extra time to install iOS 17.4 and try with that, but I can give it a shot tomorrow.
I upgraded to Xcode 15.4 and tested with iOS 17.5 and I am still able to reproduce it 😅
😭 I'm very sad and sorry. But I can't reproduce it. And it is a completely new app, with the reproducer. :(
@hannojg @cipolleschi Hey! I cloned the above repo and I was able to reproduce this issue for iOS
https://github.com/facebook/react-native/assets/17410343/18bec051-5798-4776-a1c0-db2f437266eb
I was able to reproduce it, so I will try to investigate this one.
https://github.com/user-attachments/assets/70cb75ba-73bd-4ed4-a26a-b7787b77adb9
@cipolleschi For now I can tell that the problem occurs, because of the race condition that happens when there are two reloads one after the other. When the reload starts the RCTSurfacePresenter is suspended which deallocates the scheduler with its delegate on the UI thread. In unfortunate situation it may happen right after the delegate_ != nullptr check, but before delegate->schedulerShouldRenderTransactions(mountingCoordinator) in Scheduler::uiManagerDidFinishTransaction on the JS thread when the previous reload is committing.
I am thinking about the possible solution as it would require checking during the commit to see if there is another reload that just happened and potentially dropping the commit. It would require some locks to stop deallocation from the UI thread during a commit on the JS thread or drop stale commits if there is a new reload and deallocation has already happened.
We could also debounce reloads as it would be the easiest and the least invasive solution.
I like the debounce solution. We can isolate it in a single location in the codebase and mitigate the issue to the point that it does not present itself anymore.
I can still reproduce this issue, and I can confirm that I already have both "fixes" for it:
node_modules/@react-native/community-cli-plugin/dist/commands/start/attachKeyHandlers.jswraps the reload in athrottlefrom herenode_modules/expo-modules-core/ios/Core/Modules/CoreModule.swiftcontainsDispatchQueue.main.asyncfrom here
I've included a recording so you can see how I'm not spamming r (keypresses are shown in the bottom left) and just simply refreshing while components are being loaded onto the screen is enough to cause a similar crash.
https://github.com/user-attachments/assets/fe81829b-1335-4fe6-9e77-207ed5aef506
I'm using React Native 0.77.1 and I have Expo 52.0.28