Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes on RN0.74 when launching #6818

Closed
anniewey opened this issue Jul 26, 2024 · 4 comments
Closed

App crashes on RN0.74 when launching #6818

anniewey opened this issue Jul 26, 2024 · 4 comments

Comments

@anniewey
Copy link

How frequently does the bug occur?

Always

Description

After installing realm, the app crashes / quit unexpectedly when launching. Only tested on iOS, yet to try on Android.
Issue looks similar to #6008

Stacktrace & log output

Logs from terminal:
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Incident Identifier: 8E9B44E4-2F96-4E60-952B-4EAF1ECABFDA
CrashReporter Key:   695A1DE1-2F8C-B873-4064-1148AEE509C0
Hardware Model:      MacBookPro17,1
Process:             AwesomeProject [78061]
Path:                /Users/USER/Library/Developer/CoreSimulator/Devices/73C50298-BE57-465E-A78C-EEAFF2A24624/data/Containers/Bundle/Application/45B5F0BD-409B-422F-9187-2FFEA62E7F30/AwesomeProject.app/AwesomeProject
Identifier:          org.reactjs.native.example.AwesomeProject
Version:             1.0 (1)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd_sim [60064]
Coalition:           com.apple.CoreSimulator.SimDevice.73C50298-BE57-465E-A78C-EEAFF2A24624 [3812]
Responsible Process: SimulatorTrampoline [2259]

Date/Time:           2024-07-26 13:19:32.7943 +0800
Launch Time:         2024-07-26 13:19:31.2668 +0800
OS Version:          macOS 14.5 (23F79)
Release Type:        User
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x6e4973656d726558 -> 0x000073656d726558 (possible pointer authentication failure)
Exception Codes: 0x0000000000000001, 0x6e4973656d726558
VM Region Info: 0x73656d726558 is not in any region.  Bytes after previous region: 21325811967321  
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      MALLOC_NANO              600000000000-600020000000 [512.0M] rw-/rwx SM=PRV  
--->  
      UNUSED SPACE AT END
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [78061]

Triggered by Thread:  9

Thread 0::  Dispatch queue: com.apple.main-thread
0   libdispatch.dylib             	       0x18018063c 0x18016e000 + 75324
1   libdispatch.dylib             	       0x1801802bc 0x18016e000 + 74428
2   CoreFoundation                	       0x18040e9a0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
3   CoreFoundation                	       0x1804090b8 __CFRunLoopRun + 1936
4   CoreFoundation                	       0x180408514 CFRunLoopRunSpecific + 572
5   GraphicsServices              	       0x18ef06ae4 GSEventRunModal + 160
6   UIKitCore                     	       0x1853e8040 -[UIApplication _run] + 868
7   UIKitCore                     	       0x1853ebcc8 UIApplicationMain + 124
8   AwesomeProject                	       0x10079a30c main + 96 (main.m:8)
9   dyld_sim                      	       0x10355d544 start_sim + 20
10  dyld                          	       0x1037920e0 0x10378c000 + 24800

Thread 1::  Dispatch queue: com.facebook.react.ShadowQueue
0   AwesomeProject                	       0x100896998 +[RCTI18nUtil sharedInstance] + 0 (RCTI18nUtil.m:14)
1   AwesomeProject                	       0x1008e97ac -[RCTRootShadowView init] + 128 (RCTRootShadowView.m:18)
2   AwesomeProject                	       0x10090cd44 __33-[RCTUIManager registerRootView:]_block_invoke + 72 (RCTUIManager.m:337)
3   AwesomeProject                	       0x10091ba94 __RCTExecuteOnUIManagerQueue_block_invoke + 40 (RCTUIManagerUtils.m:60)
4   libdispatch.dylib             	       0x180170104 0x18016e000 + 8452
5   libdispatch.dylib             	       0x180171978 0x18016e000 + 14712
6   libdispatch.dylib             	       0x180179b10 0x18016e000 + 47888
7   libdispatch.dylib             	       0x18017a688 0x18016e000 + 50824
8   libdispatch.dylib             	       0x180185a84 0x18016e000 + 96900
9   libdispatch.dylib             	       0x1801850d0 0x18016e000 + 94416
10  libsystem_pthread.dylib       	       0x10350f814 0x10350c000 + 14356
11  libsystem_pthread.dylib       	       0x10350e5d4 0x10350c000 + 9684

Thread 2::  Dispatch queue: com.apple.NSURLSession-delegate
0   libsystem_kernel.dylib        	       0x103481570 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x103492b80 mach_msg2_internal + 76
2   libsystem_kernel.dylib        	       0x103489798 mach_msg_overwrite + 532
3   libsystem_kernel.dylib        	       0x1034818e8 mach_msg + 20
4   CoreFoundation                	       0x18040e6c4 __CFRunLoopServiceMachPort + 156
5   CoreFoundation                	       0x180408da4 __CFRunLoopRun + 1148
6   CoreFoundation                	       0x180408514 CFRunLoopRunSpecific + 572
7   CoreFoundation                	       0x18042e0ac boundPairRead + 304
8   CoreFoundation                	       0x180429a1c CFReadStreamRead + 300
9   AwesomeProject                	       0x1008c6e60 -[RCTMultipartStreamReader readAllPartsWithCompletionCallback:progressCallback:] + 1112 (RCTMultipartStreamReader.m:135)
10  AwesomeProject                	       0x1008c5d74 -[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:] + 300 (RCTMultipartDataTask.m:119)
11  CFNetwork                     	       0x1843394f4 0x184328000 + 70900
12  libdispatch.dylib             	       0x180170104 0x18016e000 + 8452
13  libdispatch.dylib             	       0x180171978 0x18016e000 + 14712
14  libdispatch.dylib             	       0x180179b10 0x18016e000 + 47888
15  libdispatch.dylib             	       0x18017a688 0x18016e000 + 50824
16  libdispatch.dylib             	       0x180185a84 0x18016e000 + 96900
17  libdispatch.dylib             	       0x1801850d0 0x18016e000 + 94416
18  libsystem_pthread.dylib       	       0x10350f814 0x10350c000 + 14356
19  libsystem_pthread.dylib       	       0x10350e5d4 0x10350c000 + 9684

Thread 3:
0   libsystem_pthread.dylib       	       0x10350e5cc 0x10350c000 + 9676

...

Logs from Xcode:
Build paused at Thread 10
com.facebook.react.JavaScript (10): EXC_BAD_ACCESS (code=1, address=0x6e4973656d726558)

#0	0x0000000105927f48 in facebook::hermes::HermesRuntimeImpl::bigintToString(facebook::jsi::BigInt const&, int) ()
#1	0x000000010169c4d0 in facebook::jsi::RuntimeDecorator<facebook::jsi::Runtime, facebook::jsi::Runtime>::bigintToString(facebook::jsi::BigInt const&, int) at /Users/shinwey/dev/AwesomeProject/ios/Pods/Headers/Public/React-jsi/jsi/decorator.h:215
#2	0x000000010183bf2c in realm::js::JSI::(anonymous namespace)::RealmAddon::RealmAddon(facebook::jsi::Runtime&, facebook::jsi::Object&) ()
#3	0x000000010183a2c0 in realm_jsi_init ()

Can you reproduce the bug?

Always

Reproduction Steps

Creating new bare RN project

  1. npx @react-native-community/cli@latest init AwesomeProject
  2. cd ios && pod install
  3. npm run ios - App is launched successfully

Adding realm to new project based on compatibility doc

  1. yarn add [email protected]
  2. yarn add @realm/[email protected]
  3. cd ios && pod install
  4. npm run ios - App crashes at launch with errors

Version

12.5.1

What services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

iOS 17.4

Build environment

"@realm/react": "0.5.0",
"react": "18.2.0",
"react-native": "0.74.3",
"realm": "12.5.1"

Cocoapods version

1.15.2

Copy link

sync-by-unito bot commented Jul 26, 2024

➤ PM Bot commented:

Jira ticket: RJS-2875

@kraenhansen
Copy link
Member

kraenhansen commented Jul 26, 2024

The version that you're referencing is ~ 7 months old and a lot has happened since. Most notably, we implemented a new scheduler, relying more on the React Native CallInvoker primitive with the Realm JS 12.12.0. Please upgrade to the latest version (v12.12.1 at the time of writing this) and report back if the issue persists 👍

@kraenhansen kraenhansen added More-information-needed More information is needed to progress. The issue will close automatically in 2 weeks. Waiting-For-Reporter Waiting for more information from the reporter before we can proceed T-Bug-Crash and removed T-Bug labels Jul 26, 2024
@anniewey
Copy link
Author

@kraenhansen thanks for the info, able to get it launch successfully after upgrading to v12.12.1.
Previously was looking at the compatibility docs for the versions to install based on my node/npm version, hence uses v12.5.1

@github-actions github-actions bot added Needs-Attention Reporter has responded. Review comment. and removed More-information-needed More information is needed to progress. The issue will close automatically in 2 weeks. Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Jul 26, 2024
@sync-by-unito sync-by-unito bot removed the Needs-Attention Reporter has responded. Review comment. label Jul 26, 2024
@kneth
Copy link
Contributor

kneth commented Aug 5, 2024

@anniewey From v12.11.0 our releases are not tied so closely to RN releases and we should make it more clear in the documentation.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants