EXC_BAD_ACCESS in production after upgrading to 0.79.6
Personne n'a encore pris cette issue.
- Langage dominant
- C++
- Étoiles
- 127k
- Forks
- 25.3k
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 4
Description
Description
We have got a lot a bunch of unhandled errors in sentry and some users are experiencing crashes after enabling new architecture and moving to RN 0.79.6:
https://lendo.sentry.io/share/issue/15101300672940039f9334b6a3dbd6cf/
Exception 1, Code 1, Subcode 2014344570531660876 >
KERN_INVALID_ADDRESS at 0x1bf463b6e5c6c44c.
Hermes engine in Podfile.lock is also updated to the latest version and it's locked to 0.79.6.
It's happening for 9 users since 2 weeks ago that we released.
Steps to reproduce
This is very hard to reproduce. I am not sure what has happened.
React Native Version
0.79.6
Affected Platforms
Runtime - iOS
Output of npx @react-native-community/cli info
info Fetching system and libraries information...
System:
OS: macOS 15.6.1
CPU: (10) arm64 Apple M1 Pro
Memory: 134.56 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.18.0
path: ~/.nvm/versions/node/v22.18.0/bin/node
Yarn:
version: 1.22.19
path: ~/.nvm/versions/node/v22.18.0/bin/yarn
npm:
version: 10.9.3
path: ~/.nvm/versions/node/v22.18.0/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.16.1
path: /Users/xxxx/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.5
- iOS 18.5
- macOS 15.5
- tvOS 18.5
- visionOS 2.5
- watchOS 11.5
Android SDK:
API Levels:
- "28"
- "29"
- "30"
- "31"
- "33"
- "34"
- "35"
- "36"
Build Tools:
- 28.0.3
- 29.0.2
- 30.0.3
- 33.0.1
- 34.0.0
- 35.0.0
- 36.0.0
System Images:
- android-33-ext4 | Google Play ARM 64 v8a
- android-34-ext12 | Google Play ARM 64 v8a
- android-34 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2024.3 AI-243.26053.27.2432.13536105
Xcode:
version: 16.4/16F6
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.11
path: /usr/bin/javac
Ruby:
version: 3.2.2
path: /Users/xxxx/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 18.0.0
wanted: 18.0.0
react:
installed: 19.0.0
wanted: 19.0.0
react-native:
installed: 0.79.6
wanted: 0.79.6
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
info React Native v0.81.4 is now available (your project is running on v0.79.6).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.81.4
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.79.6&to=0.81.4
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".
Stacktrace or Logs
OS Version: iOS 18.6.2 (22G100)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: SEGV_NOOP at 0x1bf463b6e5c6c44c
Crashed Thread: 8
Application Specific Information:
Exception 1, Code 1, Subcode 2014344570531660876 >
KERN_INVALID_ADDRESS at 0x1bf463b6e5c6c44c.
Thread 8 Crashed:
0 KreddyMobile 0x2039cd910 [inlined] facebook::react::Scheduler::uiManagerDidFinishTransaction::lambda::operator() (Scheduler.cpp:266)
1 KreddyMobile 0x2039cd910 [inlined] std::__1::__invoke[abi:ne180100]<T> (invoke.h:344)
2 KreddyMobile 0x2039cd910 [inlined] std::__1::__invoke_void_return_wrapper<T>::__call[abi:ne180100]<T> (invoke.h:419)
3 KreddyMobile 0x2039cd910 [inlined] std::__1::__function::__alloc_func<T>::operator()[abi:ne180100] (function.h:169)
4 KreddyMobile 0x2039cd910 std::__1::__function::__func<T>::operator() (function.h:311)
5 KreddyMobile 0x203a77f5c facebook::react::RuntimeScheduler_Modern::runEventLoopTick (RuntimeScheduler_Modern.cpp:340)
6 KreddyMobile 0x203a77c30 facebook::react::RuntimeScheduler_Modern::runEventLoop (RuntimeScheduler_Modern.cpp:271)
7 KreddyMobile 0x203a488cc [inlined] std::__1::__function::__value_func<T>::operator()[abi:ne180100] (function.h:428)
8 KreddyMobile 0x203a488cc [inlined] std::__1::function<T>::operator() (function.h:981)
9 KreddyMobile 0x203a488cc [inlined] const::lambda::operator() (ReactInstance.cpp:83)
10 KreddyMobile 0x203a488cc [inlined] std::__1::__invoke[abi:ne180100]<T> (invoke.h:344)
11 KreddyMobile 0x203a488cc [inlined] std::__1::__invoke_void_return_wrapper<T>::__call[abi:ne180100]<T> (invoke.h:419)
12 KreddyMobile 0x203a488cc [inlined] std::__1::__function::__alloc_func<T>::operator()[abi:ne180100] (function.h:169)
13 KreddyMobile 0x203a488cc std::__1::__function::__func<T>::operator() (function.h:311)
14 KreddyMobile 0x2038edbe8 [inlined] std::__1::__function::__value_func<T>::operator()[abi:ne180100] (function.h:428)
15 KreddyMobile 0x2038edbe8 [inlined] std::__1::function<T>::operator() (function.h:981)
16 KreddyMobile 0x2038edbe8 facebook::react::tryAndReturnError (RCTCxxUtils.mm:73)
17 KreddyMobile 0x2038fc084 facebook::react::RCTMessageThread::tryFunc (RCTMessageThread.mm:68)
18 KreddyMobile 0x2038fbe88 [inlined] std::__1::__function::__value_func<T>::operator()[abi:ne180100] (function.h:428)
19 KreddyMobile 0x2038fbe88 [inlined] std::__1::function<T>::operator() (function.h:981)
20 KreddyMobile 0x2038fbe88 facebook::react::RCTMessageThread::runAsync (RCTMessageThread.mm:44)
21 CoreFoundation 0x31f0a884c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__
22 CoreFoundation 0x31f04b024 __CFRunLoopDoBlocks
23 CoreFoundation 0x31f04c524 __CFRunLoopRun
24 CoreFoundation 0x31f04dad8 CFRunLoopRunSpecific
25 KreddyMobile 0x203a445a4 +[RCTJSThreadManager runRunLoop] (RCTJSThreadManager.mm:102)
26 Foundation 0x31c9a3800 __NSThread__start__
27 libsystem_pthread.dylib 0x4339ab340 _pthread_start
MANDATORY Reproducer
N/A
Screenshots and Videos
No response
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par Scheduler.cpp autour de la ligne 266, puis suivez l’appel à travers RuntimeScheduler_Modern.cpp, ReactInstance.cpp et RCTMessageThread.mm comme indiqué dans la stack trace. Comparez la configuration iOS de la nouvelle architecture et de Hermes pour 0.79.6 avec les rapports de crash. Le travail est terminé lorsque la cause de EXC_BAD_ACCESS est identifiée et que le fix est vérifié sur ce chemin de crash.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- ios, react-native
- Domaine
- mobile-dev
- Type d'issue
- Bug
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- Active
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100