realm-js icon indicating copy to clipboard operation
realm-js copied to clipboard

[iOS][Expo SDK 46] SIGTRAP/SIGILL crash on Release Build Configuration

Open thespacemanatee opened this issue 1 year ago • 13 comments

Description

After upgrading to Expo SDK 46 beta-6, we started getting a fatal crash on launch on iOS Release Configuration builds with [email protected] and hermes enabled. We managed to reproduce this crash 100% of the time on all Apple devices and simulators that we have tried, and on iOS 14/15.

Stacktrace & log output

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Incident Identifier: 2CB231A5-1C1C-4F62-B740-917566BF7B41
CrashReporter Key:   958937CA-AE6A-3DEE-5690-64CE79CEB162
Hardware Model:      MacBookPro18,3
Process:             exporepro18317 [50036]
Path:                /Users/USER/Library/Developer/CoreSimulator/Devices/18E2A611-92EA-4CA2-9D5C-6EF8793B6E39/data/Containers/Bundle/Application/57D7F7C5-E9F0-40EA-82DE-ADC91BBA095C/exporepro18317.app/exporepro18317
Identifier:          com.exporepro18317.exporepro18317
Version:             1.0.0 (1)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd_sim [75757]
Coalition:           com.apple.CoreSimulator.SimDevice.18E2A611-92EA-4CA2-9D5C-6EF8793B6E39 [25352]
Responsible Process: SimulatorTrampoline [4038]

Date/Time:           2022-07-21 23:24:28.9015 +0800
Launch Time:         2022-07-21 23:24:28.7664 +0800
OS Version:          macOS 12.4 (21F79)
Release Type:        User
Report Version:      104

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001026b75dc
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: SIGNAL 5 Trace/BPT trap: 5
Terminating Process: exc handler [50036]

Triggered by Thread:  9

Thread 0::  Dispatch queue: com.apple.main-thread
0   UIKitCore                     	       0x1852ea448 +[UIView(Animation) performWithoutAnimation:] + 0
1   UIKitCore                     	       0x184bbb668 +[UIRemoteKeyboardWindow remoteKeyboardWindowForScreen:create:] + 264
2   UIKitCore                     	       0x184bc1b2c __44-[_UIRemoteKeyboards applicationWillResume:]_block_invoke + 172
3   libdispatch.dylib             	       0x18010ea98 _dispatch_client_callout + 16
4   libdispatch.dylib             	       0x180112268 _dispatch_block_invoke_direct + 244
5   FrontBoardServices            	       0x1861b8074 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 40
6   FrontBoardServices            	       0x1861b7f4c -[FBSSerialQueue _targetQueue_performNextIfPossible] + 176
7   FrontBoardServices            	       0x1861b80a4 -[FBSSerialQueue _performNextFromRunLoopSource] + 24
8   CoreFoundation                	       0x180362234 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
9   CoreFoundation                	       0x180362134 __CFRunLoopDoSource0 + 204
10  CoreFoundation                	       0x1803614c4 __CFRunLoopDoSources0 + 256
11  CoreFoundation                	       0x18035ba18 __CFRunLoopRun + 744
12  CoreFoundation                	       0x18035b218 CFRunLoopRunSpecific + 572
13  GraphicsServices              	       0x18c25f60c GSEventRunModal + 160
14  UIKitCore                     	       0x184d88a98 -[UIApplication _run] + 992
15  UIKitCore                     	       0x184d8d634 UIApplicationMain + 112
16  exporepro18317                	       0x1024dc2c0 main + 88 (main.m:7)
17  dyld_sim                      	       0x103639cd8 start_sim + 20
18  dyld                          	       0x1036d908c start + 520

Thread 1:
0   libsystem_pthread.dylib       	       0x1cc0ac8fc start_wqthread + 0

Thread 2::  Dispatch queue: com.facebook.react.ShadowQueue
0   libdispatch.dylib             	       0x18010fff8 dispatch_once + 0
1   exporepro18317                	       0x1025dd5f8 dispatch_once + 16 (once.h:84) [inlined]
2   exporepro18317                	       0x1025dd5f8 +[RCTI18nUtil sharedInstance] + 112 (RCTI18nUtil.m:18)
3   exporepro18317                	       0x1025f43f8 -[RCTRootShadowView init] + 72 (RCTRootShadowView.m:18)
4   exporepro18317                	       0x10260fe14 __33-[RCTUIManager registerRootView:]_block_invoke + 52 (RCTUIManager.m:326)
5   libdispatch.dylib             	       0x18010d244 _dispatch_call_block_and_release + 24
6   libdispatch.dylib             	       0x18010ea98 _dispatch_client_callout + 16
7   libdispatch.dylib             	       0x180115acc _dispatch_lane_serial_drain + 652
8   libdispatch.dylib             	       0x180116648 _dispatch_lane_invoke + 400
9   libdispatch.dylib             	       0x180120e10 _dispatch_workloop_worker_thread + 736
10  libsystem_pthread.dylib       	       0x1cc0adb40 _pthread_wqthread + 284
11  libsystem_pthread.dylib       	       0x1cc0ac904 start_wqthread + 8

Thread 3:
0   libsystem_pthread.dylib       	       0x1cc0ac8fc start_wqthread + 0

Thread 4:
0   libsystem_pthread.dylib       	       0x1cc0ac8fc start_wqthread + 0

Thread 5::  Dispatch queue: com.apple.root.user-interactive-qos
0   hermes                        	       0x10402de28 0x103f54000 + 892456
1   hermes                        	       0x103f758f4 0x103f54000 + 137460
2   hermes                        	       0x103f5ca14 0x103f54000 + 35348
3   exporepro18317                	       0x1026b61c0 facebook::jsi::RuntimeDecorator<facebook::jsi::Runtime, facebook::jsi::Runtime>::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) + 36 (decorator.h:300) [inlined]
4   exporepro18317                	       0x1026b61c0 facebook::jsi::WithRuntimeDecorator<facebook::react::(anonymous namespace)::ReentrancyCheck, facebook::jsi::Runtime, facebook::jsi::Runtime>::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) + 96 (decorator.h:703)
5   exporepro18317                	       0x102534478 facebook::jsi::Function::callWithThis(facebook::jsi::Runtime&, facebook::jsi::Object const&, facebook::jsi::Value const*, unsigned long) const + 68 (jsi-inl.h:249) [inlined]
6   exporepro18317                	       0x102534478 facebook::jsi::Function::callWithThis(facebook::jsi::Runtime&, facebook::jsi::Object const&, std::initializer_list<facebook::jsi::Value>) const + 68 (jsi-inl.h:256) [inlined]
7   exporepro18317                	       0x102534478 -[EXJavaScriptObject defineProperty:value:options:] + 480 (EXJavaScriptObject.mm:94)
8   exporepro18317                	       0x10253b444 +[EXJavaScriptRuntimeManager installExpoModulesHostObject:] + 300 (EXJSIInstaller.mm:49)
9   exporepro18317                	       0x102574e0c $s15ExpoModulesCore10AppContextC07installaB10HostObjectyyKF + 28 (AppContext.swift:290) [inlined]
10  exporepro18317                	       0x102574e0c $s15ExpoModulesCore10AppContextC7runtimeSo19EXJavaScriptRuntimeCSgvW + 32 (AppContext.swift:57) [inlined]
11  exporepro18317                	       0x102574e0c $s15ExpoModulesCore10AppContextC7runtimeSo19EXJavaScriptRuntimeCSgvs + 32 [inlined]
12  exporepro18317                	       0x102574e0c ExpoBridgeModule.javaScriptWillStartExecutingNotification(_:) + 564 (ExpoBridgeModule.swift:76)
13  exporepro18317                	       0x102575014 @objc ExpoBridgeModule.javaScriptWillStartExecutingNotification(_:) + 112
14  CoreFoundation                	       0x180332f90 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
15  CoreFoundation                	       0x180332f48 ___CFXRegistrationPost_block_invoke + 48
16  CoreFoundation                	       0x180332358 _CFXRegistrationPost + 416
17  CoreFoundation                	       0x180331d48 _CFXNotificationPost + 692
18  Foundation                    	       0x1807d9964 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92
19  exporepro18317                	       0x1025d29c0 __51-[RCTCxxBridge executeApplicationScript:url:async:]_block_invoke + 228 (RCTCxxBridge.mm:1504)
20  exporepro18317                	       0x1025d7ae0 std::__1::__function::__value_func<void ()>::operator()() const + 20 (function.h:505) [inlined]
21  exporepro18317                	       0x1025d7ae0 std::__1::function<void ()>::operator()() const + 20 (function.h:1182) [inlined]
22  exporepro18317                	       0x1025d7ae0 facebook::react::tryAndReturnError(std::__1::function<void ()> const&) + 32 (RCTCxxUtils.mm:74)
23  exporepro18317                	       0x1025cc604 -[RCTCxxBridge _tryAndHandleError:] + 100 (RCTCxxBridge.mm:344)
24  exporepro18317                	       0x1025d2878 -[RCTCxxBridge executeApplicationScript:url:async:] + 164 (RCTCxxBridge.mm:1502)
25  exporepro18317                	       0x1025d26d4 -[RCTCxxBridge enqueueApplicationScript:url:onComplete:] + 88 (RCTCxxBridge.mm:1479)
26  exporepro18317                	       0x1025d0398 -[RCTCxxBridge executeSourceCode:sync:] + 240 (RCTCxxBridge.mm:1079)
27  exporepro18317                	       0x1025cda04 __21-[RCTCxxBridge start]_block_invoke_2 + 96 (RCTCxxBridge.mm:505)
28  libdispatch.dylib             	       0x18010d244 _dispatch_call_block_and_release + 24
29  libdispatch.dylib             	       0x18010ea98 _dispatch_client_callout + 16
30  libdispatch.dylib             	       0x18011f8a0 _dispatch_root_queue_drain + 732
31  libdispatch.dylib             	       0x1801200f4 _dispatch_worker_thread2 + 160
32  libsystem_pthread.dylib       	       0x1cc0adb04 _pthread_wqthread + 224
33  libsystem_pthread.dylib       	       0x1cc0ac904 start_wqthread + 8

Thread 6:: com.apple.uikit.eventfetch-thread
0   libsystem_kernel.dylib        	       0x1cc055fcc mach_msg_trap + 8
1   libsystem_kernel.dylib        	       0x1cc056430 mach_msg + 72
2   CoreFoundation                	       0x18036176c __CFRunLoopServiceMachPort + 368
3   CoreFoundation                	       0x18035bb78 __CFRunLoopRun + 1096
4   CoreFoundation                	       0x18035b218 CFRunLoopRunSpecific + 572
5   Foundation                    	       0x180827828 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232
6   Foundation                    	       0x180827ae0 -[NSRunLoop(NSRunLoop) runUntilDate:] + 88
7   UIKitCore                     	       0x184e3f01c -[UIEventFetcher threadMain] + 472
8   Foundation                    	       0x180851578 __NSThread__start__ + 792
9   libsystem_pthread.dylib       	       0x1cc0b16c8 _pthread_start + 116
10  libsystem_pthread.dylib       	       0x1cc0ac910 thread_start + 8

Thread 7:
0   libsystem_pthread.dylib       	       0x1cc0ac8fc start_wqthread + 0

Thread 8:
0   libsystem_pthread.dylib       	       0x1cc0ac8fc start_wqthread + 0

Thread 9 Crashed:: com.facebook.react.JavaScript
0   exporepro18317                	       0x1026b75dc facebook::react::(anonymous namespace)::ReentrancyCheck::before() + 8 (HermesExecutorFactory.cpp:123) [inlined]
1   exporepro18317                	       0x1026b75dc facebook::jsi::detail::BeforeCaller<facebook::react::(anonymous namespace)::ReentrancyCheck, void>::before(facebook::react::(anonymous namespace)::ReentrancyCheck&) + 8 (decorator.h:418) [inlined]
2   exporepro18317                	       0x1026b75dc facebook::jsi::WithRuntimeDecorator<facebook::react::(anonymous namespace)::ReentrancyCheck, facebook::jsi::Runtime, facebook::jsi::Runtime>::Around::Around(facebook::react::(anonymous namespace)::ReentrancyCheck&) + 8 (decorator.h:743) [inlined]
3   exporepro18317                	       0x1026b75dc facebook::jsi::WithRuntimeDecorator<facebook::react::(anonymous namespace)::ReentrancyCheck, facebook::jsi::Runtime, facebook::jsi::Runtime>::Around::Around(facebook::react::(anonymous namespace)::ReentrancyCheck&) + 112 (decorator.h:742)
4   exporepro18317                	       0x1026b7588 std::__1::__libcpp_thread_get_current_id() + 4 (__threading_support:426) [inlined]
5   exporepro18317                	       0x1026b7588 std::__1::this_thread::get_id() + 4 (__threading_support:715) [inlined]
6   exporepro18317                	       0x1026b7588 facebook::react::(anonymous namespace)::ReentrancyCheck::before() + 4 (HermesExecutorFactory.cpp:87) [inlined]
7   exporepro18317                	       0x1026b7588 facebook::jsi::detail::BeforeCaller<facebook::react::(anonymous namespace)::ReentrancyCheck, void>::before(facebook::react::(anonymous namespace)::ReentrancyCheck&) + 4 (decorator.h:418) [inlined]
8   exporepro18317                	       0x1026b7588 facebook::jsi::WithRuntimeDecorator<facebook::react::(anonymous namespace)::ReentrancyCheck, facebook::jsi::Runtime, facebook::jsi::Runtime>::Around::Around(facebook::react::(anonymous namespace)::ReentrancyCheck&) + 8 (decorator.h:743) [inlined]
9   exporepro18317                	       0x1026b7588 facebook::jsi::WithRuntimeDecorator<facebook::react::(anonymous namespace)::ReentrancyCheck, facebook::jsi::Runtime, facebook::jsi::Runtime>::Around::Around(facebook::react::(anonymous namespace)::ReentrancyCheck&) + 28 (decorator.h:742)
10  exporepro18317                	       0x1026b5400 facebook::jsi::WithRuntimeDecorator<facebook::react::(anonymous namespace)::ReentrancyCheck, facebook::jsi::Runtime, facebook::jsi::Runtime>::createStringFromAscii(char const*, unsigned long) + 48 (decorator.h:574)
11  exporepro18317                	       0x10272f9e4 facebook::jsi::Value facebook::jsi::Function::call<char const (&) [11], std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(facebook::jsi::Runtime&, char const (&) [11], std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&) const + 96
12  exporepro18317                	       0x102720ecc realm::js::realmjsi::ObjectWrap<realm::js::ObservableClass<realm::js::realmjsi::Types> >::create_constructor(realm::js::JsiEnv) + 548
13  exporepro18317                	       0x10271eb70 realm::js::RealmClass<realm::js::realmjsi::Types>::create_constructor(realm::js::JsiEnv) + 44
14  exporepro18317                	       0x10271e9ac realm_jsi_init + 184
15  exporepro18317                	       0x102701700 __24-[RealmReact setBridge:]_block_invoke + 408 (RealmReact.mm:156)
16  exporepro18317                	       0x1025d7ae0 std::__1::__function::__value_func<void ()>::operator()() const + 20 (function.h:505) [inlined]
17  exporepro18317                	       0x1025d7ae0 std::__1::function<void ()>::operator()() const + 20 (function.h:1182) [inlined]
18  exporepro18317                	       0x1025d7ae0 facebook::react::tryAndReturnError(std::__1::function<void ()> const&) + 32 (RCTCxxUtils.mm:74)
19  exporepro18317                	       0x1025cc604 -[RCTCxxBridge _tryAndHandleError:] + 100 (RCTCxxBridge.mm:344)
20  Foundation                    	       0x180851928 __NSThreadPerformPerform + 164
21  CoreFoundation                	       0x180362234 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
22  CoreFoundation                	       0x180362134 __CFRunLoopDoSource0 + 204
23  CoreFoundation                	       0x1803614c4 __CFRunLoopDoSources0 + 256
24  CoreFoundation                	       0x18035ba18 __CFRunLoopRun + 744
25  CoreFoundation                	       0x18035b218 CFRunLoopRunSpecific + 572
26  exporepro18317                	       0x1025cc538 +[RCTCxxBridge runRunLoop] + 264 (RCTCxxBridge.mm:335)
27  Foundation                    	       0x180851578 __NSThread__start__ + 792
28  libsystem_pthread.dylib       	       0x1cc0b16c8 _pthread_start + 116
29  libsystem_pthread.dylib       	       0x1cc0ac910 thread_start + 8

Thread 10:: hades
0   libsystem_kernel.dylib        	       0x1cc059694 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x1cc0b1c88 _pthread_cond_wait + 1224
2   libc++.1.dylib                	       0x18026718c std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24
3   hermes                        	       0x104063934 0x103f54000 + 1112372
4   hermes                        	       0x1040636e8 0x103f54000 + 1111784
5   libsystem_pthread.dylib       	       0x1cc0b16c8 _pthread_start + 116
6   libsystem_pthread.dylib       	       0x1cc0ac910 thread_start + 8

Thread 11:: hermes-chrome-inspector-conn
0   libsystem_kernel.dylib        	       0x1cc059694 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x1cc0b1c88 _pthread_cond_wait + 1224
2   libc++.1.dylib                	       0x18026718c std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24
3   exporepro18317                	       0x1026de204 void std::__1::condition_variable::wait<facebook::hermes::inspector::detail::SerialExecutor::runLoop()::$_1>(std::__1::unique_lock<std::__1::mutex>&, facebook::hermes::inspector::detail::SerialExecutor::runLoop()::$_1) + 28 (__mutex_base:404) [inlined]
4   exporepro18317                	       0x1026de204 facebook::hermes::inspector::detail::SerialExecutor::runLoop() + 120 (SerialExecutor.cpp:41)
5   exporepro18317                	       0x1026a1adc decltype(static_cast<void (*>(fp)(static_cast<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >>(fp0), static_cast<std::__1::function<void ()>>(fp0))) std::__1::__invoke<void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> >(void (*&&)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::function<void ()>&&) + 52 (type_traits:3918) [inlined]
6   exporepro18317                	       0x1026a1adc void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>, 2ul, 3ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> >&, std::__1::__tuple_indices<2ul, 3ul>) + 56 (thread:287) [inlined]
7   exporepro18317                	       0x1026a1adc void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> > >(void*) + 116 (thread:298)
8   libsystem_pthread.dylib       	       0x1cc0b16c8 _pthread_start + 116
9   libsystem_pthread.dylib       	       0x1cc0ac910 thread_start + 8

Thread 12:: hermes-inspector
0   libsystem_kernel.dylib        	       0x1cc059694 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x1cc0b1c88 _pthread_cond_wait + 1224
2   libc++.1.dylib                	       0x18026718c std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24
3   exporepro18317                	       0x1026de204 void std::__1::condition_variable::wait<facebook::hermes::inspector::detail::SerialExecutor::runLoop()::$_1>(std::__1::unique_lock<std::__1::mutex>&, facebook::hermes::inspector::detail::SerialExecutor::runLoop()::$_1) + 28 (__mutex_base:404) [inlined]
4   exporepro18317                	       0x1026de204 facebook::hermes::inspector::detail::SerialExecutor::runLoop() + 120 (SerialExecutor.cpp:41)
5   exporepro18317                	       0x1026a1adc decltype(static_cast<void (*>(fp)(static_cast<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >>(fp0), static_cast<std::__1::function<void ()>>(fp0))) std::__1::__invoke<void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> >(void (*&&)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::function<void ()>&&) + 52 (type_traits:3918) [inlined]
6   exporepro18317                	       0x1026a1adc void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>, 2ul, 3ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> >&, std::__1::__tuple_indices<2ul, 3ul>) + 56 (thread:287) [inlined]
7   exporepro18317                	       0x1026a1adc void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()>), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::function<void ()> > >(void*) + 116 (thread:298)
8   libsystem_pthread.dylib       	       0x1cc0b16c8 _pthread_start + 116
9   libsystem_pthread.dylib       	       0x1cc0ac910 thread_start + 8


Thread 9 crashed with ARM Thread State (64-bit):
    x0: 0x000000016de0f000   x1: 0x0000600003cb1d88   x2: 0x000000000000000a   x3: 0x00000001cc0a2b0b
    x4: 0x0000000001000008   x5: 0x0000000000000030   x6: 0x0000000000000000   x7: 0x0000000107ffcccc
    x8: 0x000000016dbdf000   x9: 0xa3bcaf80f146c3c5  x10: 0x0000000000179f41  x11: 0x00000000000b37f0
   x12: 0x0000000149600000  x13: 0x0000000000000000  x14: 0x00000000006d17d5  x15: 0x0000000000e2c6c0
   x16: 0x00000001cc0ad2c8  x17: 0x000000000000e2c6  x18: 0x0000000000000000  x19: 0x000000016de0d778
   x20: 0x0000600003cb1d88  x21: 0x0000600003cb1d58  x22: 0x000000016de0d7b8  x23: 0x0000000102c6dab5
   x24: 0x0000600000d9ae40  x25: 0x000000014a83d048  x26: 0x000000002b3100d5  x27: 0x0000000102d80000
   x28: 0x00000001da9cf000   fp: 0x000000016de0d760   lr: 0x00000001026b7588
    sp: 0x000000016de0d750   pc: 0x00000001026b75dc cpsr: 0x20001000
   far: 0x000000010272f984  esr: 0xf2000001 (Breakpoint) brk 1

Binary Images:
       0x18417b000 -        0x18560dfff com.apple.UIKitCore (1.0) <7bbc9f13-df06-3c47-9a63-8483442bdfcb> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
       0x18010b000 -        0x18014dfff libdispatch.dylib (*) <a06c95dc-09e7-3a87-afb6-7e1b0bec1287> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libdispatch.dylib
       0x18615d000 -        0x1861e6fff com.apple.FrontBoardServices (765.10) <bc3a0db0-7ff7-38cb-bb7d-7986d5d239ef> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices
       0x1802dc000 -        0x18068bfff com.apple.CoreFoundation (6.9) <673c8a21-98bf-38f0-a038-55ab0de23142> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
       0x18c25c000 -        0x18c264fff com.apple.GraphicsServices (1.0) <9334a354-2177-30b1-b919-4fecf59fef22> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
       0x1024d8000 -        0x102ccffff com.exporepro18317.exporepro18317 (1.0.0) <ca210b1b-d549-38b1-9982-49a1a2baf6ed> /Users/USER/Library/Developer/CoreSimulator/Devices/18E2A611-92EA-4CA2-9D5C-6EF8793B6E39/data/Containers/Bundle/Application/57D7F7C5-E9F0-40EA-82DE-ADC91BBA095C/exporepro18317.app/exporepro18317
       0x103638000 -        0x103673fff dyld_sim (*) <67298116-bb18-3438-b22e-8d2b9d4618e9> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim
       0x1036d4000 -        0x103733fff dyld (*) <d9c2a46e-8dc4-3950-9d6a-f799e8ccb683> /usr/lib/dyld
       0x1cc0aa000 -        0x1cc0b6fff libsystem_pthread.dylib (*) <f354eadf-ba89-3191-bbdd-9f36eda1f6ca> /usr/lib/system/libsystem_pthread.dylib
       0x103f54000 -        0x1041e7fff dev.hermesengine.iphonesimulator (0.11.0) <2c03abcd-37c8-3282-9295-30ebb35366e4> /Users/USER/Library/Developer/CoreSimulator/Devices/18E2A611-92EA-4CA2-9D5C-6EF8793B6E39/data/Containers/Bundle/Application/57D7F7C5-E9F0-40EA-82DE-ADC91BBA095C/exporepro18317.app/Frameworks/hermes.framework/hermes
       0x180700000 -        0x1809c3fff com.apple.Foundation (6.9) <ded71e05-af0a-3172-b09e-7f070ec7d4aa> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation
       0x1cc055000 -        0x1cc08afff libsystem_kernel.dylib (*) <d7107c39-03e1-32e1-9488-821b52158a1e> /usr/lib/system/libsystem_kernel.dylib
       0x18025b000 -        0x1802b6fff libc++.1.dylib (*) <03a5f91e-2bc5-3d4f-b91f-729633a08579> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libc++.1.dylib

EOF

Can you reproduce a bug?

Yes, always

Reproduction Steps

Minimal repro can be found here.

Version

11.0.0-rc.1

What SDK flavour are you using?

Atlas App Services (auth, functions, etc.)

Are you using encryption?

No, not using encryption

Platform OS and version(s)

All iOS versions

thespacemanatee avatar Jul 21 '22 15:07 thespacemanatee

@thespacemanatee Thanks for reporting this. I tried to open a link to the reproduction repo, but it is leading to a 404 page. Can you ensure that it is publicly available?

takameyer avatar Jul 22 '22 09:07 takameyer

@takameyer sorry about that, it should be public now 😄

thespacemanatee avatar Jul 22 '22 09:07 thespacemanatee

@takameyer update the repro to remove expo-dev-client, the issue appears on Bare workflow as well. Lmk if you need any more information or if it's not reproducible, thanks!

thespacemanatee avatar Jul 26 '22 17:07 thespacemanatee

Hi @thespacemanatee, I'm struggling to build your project, I get these errors:

	CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'ExpoModulesCore' from project 'Pods')
	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'ExpoModulesCore' from project 'Pods')
	PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/tom.duncalf/Library/Developer/Xcode/DerivedData/exporealmrepro-eyijfdcsfscaavdedpzbpkeflfgc/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/FBReactNativeSpec.build/Script-46EB2E000111B0.sh (in target 'FBReactNativeSpec' from project 'Pods')

Could you confirm which Xcode and node versions you are using?

tomduncalf avatar Jul 27 '22 10:07 tomduncalf

@tomduncalf Would this help? I am using Macbook Pro 14 M1 chip.

expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 12.5
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v16.15.1/bin/yarn
      npm: 8.13.1 - ~/.nvm/versions/node/v16.15.1/bin/npm
      Watchman: 2022.07.04.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    IDEs:
      Android Studio: Electric Eel 2022.1.1 Canary 8 Electric Eel 2022.1.1 Canary 8
      Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^46.0.1 => 46.0.1 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.69.3 => 0.69.3 
      react-native-web: ~0.18.7 => 0.18.7 
    Expo Workflow: bare

thespacemanatee avatar Jul 27 '22 10:07 thespacemanatee

@thespacemanatee Ah thanks, perhaps it is related to the M1, I have an Intel Mac here but do have access to an M1 so will see if I can build it there

tomduncalf avatar Jul 27 '22 10:07 tomduncalf

Thanks for that, I wasn't able to build on my M1 but a few of my packages on my Intel Mac were outdated compared to yours. I upgraded them and it now builds (I also had to fix the path in https://github.com/thespacemanatee/realm-repro-4735/blob/with-realm/ios/.xcode.env.local)

I'm able to reproduce this issue in Release mode, I can't repro it in Debug mode annoyingly. We will investigate this issue and see if we can work out what is going on and update you once we have something.

tomduncalf avatar Jul 27 '22 11:07 tomduncalf

@tomduncalf No worries and thanks for the update! Will keep in mind config issues for future repros 😅

thespacemanatee avatar Jul 27 '22 11:07 thespacemanatee

@tomduncalf Just wanted to check if there's any progress made on this issue (don't see anyone assigned/needs attention label). We are releasing our app to the store soon and would be great to run hermes on both Android and iOS before that happens 😄

thespacemanatee avatar Aug 08 '22 10:08 thespacemanatee

Thanks for that, I wasn't able to build on my M1 but a few of my packages on my Intel Mac were outdated compared to yours. I upgraded them and it now builds (I also had to fix the path in https://github.com/thespacemanatee/realm-repro-4735/blob/with-realm/ios/.xcode.env.local)

I'm able to reproduce this issue in Release mode, I can't repro it in Debug mode annoyingly. We will investigate this issue and see if we can work out what is going on and update you once we have something.

@tomduncalf any updates? We're waiting out for this issue before making our first app store release.

thespacemanatee avatar Aug 26 '22 14:08 thespacemanatee

@tomduncalf @takameyer @kneth now that RN 0.70.0 is out and hermes is enabled by default, and with our release delayed a couple of months, can someone give us a response so that we can have a better expectation of the timeline? We are paying Realm customers as well.

thespacemanatee avatar Sep 05 '22 17:09 thespacemanatee

@thespacemanatee We can't give an exact timeline but we are currently working on the next release candidate.

Moreover, we have outlined what will come in v11: https://github.com/realm/realm-js/discussions/4839

kneth avatar Sep 06 '22 08:09 kneth

Just noting here that I'm facing the same issue with Expo 0.46 (with hermes enabled) and Realm 11.0.0-rc.1. Everything works flawlessly in debug mode, but as soon as the app is build in release mode locally (using --configuration Release flag) or via EAS build the app crashes on start. It actually behaves weirdly: it always starts correctly on the first try after fresh install, but most of the subsequent app launches fail (very rarely it still succeeds).

After some digging around, the only way for me was do disable hermes and downgrade to v10, which causes crashes on reload in debug mode (because of Reanimated perhaps), not an ideal tradeoff :)

Let me know if any other reproduction repo will help in debugging this.

haikov avatar Sep 14 '22 16:09 haikov

I believe I am running into this as well. Did anyone have any luck? It's super hard to debug because it's only happening on releases....

marcfrankel avatar Sep 30 '22 18:09 marcfrankel

try downgrade to [email protected]

sunnylqm avatar Oct 01 '22 01:10 sunnylqm

Downgrading to [email protected] produces a crash for me even on a local (debug) version of the build. With the following crash frame. Running Expo 46.0.13 and React Native 0.69.6

Thread 21 Crashed:: com.facebook.react.JavaScript
0   APPNAME                 	       0x105d88be0 facebook::jsc::JSCRuntime::cloneSymbol(facebook::jsi::Runtime::PointerValue const*) + 64
1   APPNAME                 	       0x105d895a6 facebook::jsi::Value::Value(facebook::jsi::Runtime&, facebook::jsi::Symbol const&) + 70
2   APPNAME                 	       0x105d894d8 facebook::jsc::JSCRuntime::symbolToString(facebook::jsi::Symbol const&) + 56
3   APPNAME                 	       0x103cdf1be facebook::jsi::Value facebook::jsi::Function::call<char const (&) [11], std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(facebook::jsi::Runtime&, char const (&) [11], std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&) const + 78
4   APPNAME                 	       0x103ccf627 realm::js::realmjsi::ObjectWrap<realm::js::ObservableClass<realm::js::realmjsi::Types> >::create_constructor(realm::js::JsiEnv) + 599
5   APPNAME                 	       0x103ccc974 realm::js::RealmClass<realm::js::realmjsi::Types>::create_constructor(realm::js::JsiEnv) + 36
6   APPNAME                 	       0x103ccc7ee realm_jsi_init + 142
7   APPNAME                 	       0x10541bc59 __24-[RealmReact setBridge:]_block_invoke + 761
8   APPNAME                 	       0x1052bebf9 decltype(static_cast<void () block_pointer __strong&>(fp)()) std::__1::__invoke<void () block_pointer __strong&>(&&, decltype(static_cast<void () block_pointer __strong&>(fp)())&&...) + 25
9   APPNAME                 	       0x1052bebad void std::__1::__invoke_void_return_wrapper<void, true>::__call<void () block_pointer __strong&>(void () block_pointer __strong&) + 29
10  APPNAME                 	       0x1052beb7d std::__1::__function::__alloc_func<void () block_pointer __strong, std::__1::allocator<std::__1::allocator>, void ()>::operator()() + 29
11  APPNAME                 	       0x1052bd7a9 std::__1::__function::__func<void () block_pointer __strong, std::__1::allocator<std::__1::allocator>, void ()>::operator()() + 25
12  APPNAME                 	       0x1053c5c42 std::__1::__function::__value_func<void ()>::operator()() const + 50
13  APPNAME                 	       0x1053c5b75 std::__1::function<void ()>::operator()() const + 21
14  APPNAME                 	       0x1052d5925 facebook::react::tryAndReturnError(std::__1::function<void ()> const&) + 21
15  APPNAME                 	       0x1052a6f28 -[RCTCxxBridge _tryAndHandleError:] + 88
16  Foundation                    	    0x7fff20845992 __NSThreadPerformPerform + 179
17  CoreFoundation                	    0x7fff2036ce15 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
18  CoreFoundation                	    0x7fff2036cd0d __CFRunLoopDoSource0 + 180
19  CoreFoundation                	    0x7fff2036c1e2 __CFRunLoopDoSources0 + 242
20  CoreFoundation                	    0x7fff20366941 __CFRunLoopRun + 875
21  CoreFoundation                	    0x7fff203660f3 CFRunLoopRunSpecific + 567
22  APPNAME                 	       0x1052a6d25 +[RCTCxxBridge runRunLoop] + 949
23  Foundation                    	    0x7fff20845550 __NSThread__start__ + 1025
24  libsystem_pthread.dylib       	    0x7fff6da334e1 _pthread_start + 125
25  libsystem_pthread.dylib       	    0x7fff6da2ef6b thread_start + 15

To reiterate. Version rc-0 crashes locally for me with this crash report. Whereas rc-1 crashes only in release mode but works perfectly fine for me locally. Very strange... Any help is super appreciated.

marcfrankel avatar Oct 03 '22 14:10 marcfrankel

I'll add in I have been able to get a build of our app working by rolling back our React Native Firebase version to 14.X. I don't think the issue was with Firebase itself, but rather with the 15.X version requirement to use "Static Frameworks". I think building using static frameworks is what is actually causing the issue.

marcfrankel avatar Oct 03 '22 18:10 marcfrankel

@marcfrankel can you confirm that your project conforms to this compatibility matrix?

takameyer avatar Oct 04 '22 06:10 takameyer

@marcfrankel I didn't manage to get that to work even after downgrading RNFB :/ @takameyer seems like a lot of people are facing this. Shouldn't this issue be on high priority?

thespacemanatee avatar Oct 05 '22 09:10 thespacemanatee

@thespacemanatee Can you tell us -

  • the version of Realm JS
  • the version of React Native
  • the version of Expo
  • whether you have Hermes enabled or not

That would help us figure out what is going on

ianpward avatar Oct 06 '22 19:10 ianpward

@thespacemanatee Can you tell us -

  • the version of Realm JS
  • the version of React Native
  • the version of Expo
  • whether you have Hermes enabled or not

That would help us figure out what is going on

@ianpward Hello, please read the thread. I've provided a repro here.

@tomduncalf has also confirmed that it could be reproduced.

thespacemanatee avatar Oct 07 '22 02:10 thespacemanatee

@thespacemanatee I am not able to build your repro - neither branches.

kneth avatar Oct 07 '22 13:10 kneth

Thanks for that, I wasn't able to build on my M1 but a few of my packages on my Intel Mac were outdated compared to yours. I upgraded them and it now builds (I also had to fix the path in https://github.com/thespacemanatee/realm-repro-4735/blob/with-realm/ios/.xcode.env.local)

I'm able to reproduce this issue in Release mode, I can't repro it in Debug mode annoyingly. We will investigate this issue and see if we can work out what is going on and update you once we have something.

@kneth I'm using an M1 device so you should be able to build it on M1, otherwise you can just follow my package.json and create an Intel project.

thespacemanatee avatar Oct 07 '22 14:10 thespacemanatee

I am actually on M1. Which xcode version do you use?

kneth avatar Oct 07 '22 14:10 kneth

I am actually on M1. Which xcode version do you use?

Was using Xcode 13 for this repro. Maybe try fixing the path in .xcode.env.local as mentioned above? Not sure how it got there, sorry.

thespacemanatee avatar Oct 07 '22 16:10 thespacemanatee

Oh, don't have GNU coreutils in PATH: https://github.com/facebook/react-native/issues/32432#issuecomment-1198310931

kneth avatar Oct 11 '22 08:10 kneth

@kneth Did you manage to build it? Any action on my part?

thespacemanatee avatar Oct 11 '22 08:10 thespacemanatee

@thespacemanatee Yes, I can build. And I see the crash too.

kneth avatar Oct 11 '22 11:10 kneth

I wanted to build my app in release mode today, and I also got the crash.

Expo SDK: 46 RN version: 0.69.4 Realm version: 11.0.0-rc.1

I confirm that according to the compatibility matrix, it should work, and it does work in dev builds. Unfortunately, building in release mode creates a crash. (It seems to crash 4 times out of 5 launches)

ksushiva avatar Oct 12 '22 20:10 ksushiva

@ksushiva @thespacemanatee Could be related to https://github.com/expo/expo/issues/19517?

kneth avatar Oct 25 '22 11:10 kneth