[iOS] Reload crashes the app while a view command is still queued
Los mantenedores suelen responder en 2 días
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
The crash stack points to RuntimeScheduler_Modern.cpp (updateRendering, runEventLoopTick) and Scheduler::uiManagerDidDispatchCommand. Start by building the provided reproducer on an iOS simulator, then read the scheduler code around line 400 to see how queued view commands interact with reload. Done means ./loop.sh reports 0 crashes in 20 reloads.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
On iOS, reloading the app while a view command is still queued crashes it on the JS thread with EXC_BAD_ACCESS.
scrollRef.current?.scrollTo({ y: 0, animated: false });
DevSettings.reload();
busyWait(100); // keeps the JS thread in this task for 100 ms
Likely the same crash was reported in #58601 and #53774 but without a repro.
Steps to reproduce
- Clone the reproducer and install it:
npm install cd ios && bundle install && bundle exec pod install && cd .. - Start Metro with
npx react-native start, then build and run on an iOS simulator withnpx react-native run-ios. - The app reloads itself about 1 s after every mount, and usually crashes on the first reload.
My setup: Debug build, prebuilt React.xcframework, iPhone 17 simulator, iOS 26.5
To count the crashes, quit the app and run ./loop.sh default 20. It relaunches the app for each trial and prints default: N crashes in 20 reloads.
React Native Version
0.88.1
Affected Platforms
Runtime - iOS
Areas
Fabric - The New Renderer
Output of npx @react-native-community/cli info
System:
OS: macOS 26.7.1
CPU: (14) arm64 Apple M4 Pro
Memory: 11.90 GB / 48.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 24.22.1
path: /opt/homebrew/bin/node
Yarn: Not Found
npm:
version: 11.19.1
path: /opt/homebrew/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.17.0
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 27.0
- iOS 27.1
- macOS 27.0
- tvOS 27.0
- visionOS 27.0
- watchOS 27.0
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode:
version: 27.1/27A9275
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.20.1
path: /usr/bin/javac
Ruby:
version: 4.0.9
path: /opt/homebrew/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 20.2.0
wanted: 20.2.0
react:
installed: 19.3.0
wanted: 19.3.0
react-native:
installed: 0.88.1
wanted: 0.88.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
Exception: EXC_BAD_ACCESS (SIGBUS) KERN_PROTECTION_FAILURE at 0x00000001090a659c
Crashed thread: com.facebook.react.runtime.JavaScript
0 ??? 0x1090a659c
1 ReproducerApp.debug.dylib std::__invoke<facebook::react::Scheduler::uiManagerDidDispatchCommand(...)::$_0&>(...) (invoke.h:90)
2 ReproducerApp.debug.dylib std::__invoke_void_return_wrapper<void, true>::__call<...uiManagerDidDispatchCommand(...)::$_0&>(...) (invoke.h:350)
3 ReproducerApp.debug.dylib std::__invoke_r<void, ...uiManagerDidDispatchCommand(...)::$_0&>(...) (invoke.h:356)
4 ReproducerApp.debug.dylib std::__function::__func<facebook::react::Scheduler::uiManagerDidDispatchCommand(...)::$_0, void ()>::operator()() (function.h:172)
5 ReproducerApp.debug.dylib std::__function::__value_func<void ()>::operator()() const (function.h:273)
6 ReproducerApp.debug.dylib std::function<void ()>::operator()() const (function.h:754)
7 ReproducerApp.debug.dylib facebook::react::RuntimeScheduler_Modern::updateRendering(facebook::jsi::Runtime&, facebook::react::HighResTimeStamp) (RuntimeScheduler_Modern.cpp:400)
8 ReproducerApp.debug.dylib facebook::react::RuntimeScheduler_Modern::runEventLoopTick(facebook::jsi::Runtime&, facebook::react::Task&) (RuntimeScheduler_Modern.cpp:343)
9 ReproducerApp.debug.dylib facebook::react::RuntimeScheduler_Modern::runEventLoop(facebook::jsi::Runtime&) (RuntimeScheduler_Modern.cpp:287)
10 ReproducerApp.debug.dylib facebook::react::RuntimeScheduler_Modern::scheduleEventLoop()::$_0::operator()(facebook::jsi::Runtime&) const (RuntimeScheduler_Modern.cpp:272)
MANDATORY Reproducer
https://github.com/Nezz/expo-repro/tree/repro/ReloadSchedulerCrash
Screenshots and Videos
- Lenguaje dominante
- C++
- Estrellas
- 127k
- Forks
- 25.4k
- Merge medio
- 2 d 9 h
- PR fusionados (30 d)
- 91
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de react/react-native
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
react/react-native#59722 ·
Los mantenedores suelen responder en 2 días
-
Android: new WebSocket() crashes the app for a URL that OkHttp or java.net.URI rejectsPosiblemente ocupada @sorinc03 la tomó hoy. Abierto🌐Networking Needs: Author Feedback Needs: Repro Platform: Android
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
react/react-native#59704 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
react/react-native#59694 ·
Los mantenedores suelen responder en 2 días
-
Android autolinking keeps a stale autolinking.json when only bun.lock changes, since bun.lock isn't in the default lockFilesPosiblemente ocupada @lazerg la tomó hace 3 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
react/react-native#59693 ·
Los mantenedores suelen responder en 2 días
-
Image.resolveAssetSource's TypeScript declaration drops the null it returns for an unknown assetPosiblemente ocupada @Hassan1305 la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
react/react-native#59648 · 1 comentario ·
Los mantenedores suelen responder en 2 días
Todos los issues de react/react-native
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
eclipse-score/lifecycle#929 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
colbymchenry/codegraph#3223 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
firefox-devtools/profiler#6436 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
The `ufw` decoder requires the kernel's monotonic timestamp, so UFW lines read from journald decode without any fieldPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día