synonymdev / bitkit

Self-custodial Bitcoin and Lightning Wallet for Android and iOS.
https://bitkit.to
MIT License
118 stars 21 forks source link

[Bug]: Crash after resetting wallet #1922

Open mattcrv opened 5 months ago

mattcrv commented 5 months ago

Describe the bug

The wallet always resets successfully, but the app always crashes when after confirming the reset. This has been happening since build 93. Crash reports sent via Testflight.

Reproduce

  1. Settings
  2. Back Up Or Restore
  3. Reset and restore wallet
  4. Reset Wallet
  5. Yes, Reset

Screenshots / Recording

No response

Operating system

iOS 17.5.1 (21F90)

Bitkit version

49d1359

Log output

Incident Identifier: 25A1E9E3-8B53-4872-95C9-F7B014AE8CA3
Distributor ID:      com.apple.TestFlight
Hardware Model:      iPhone16,1
Process:             bitkit [6848]
Path:                /private/var/containers/Bundle/Application/CFEBE985-285D-4776-A220-3E024F2064BD/bitkit.app/bitkit
Identifier:          to.bitkit
Version:             1.0 (119)
AppStoreTools:       15F31e
AppVariant:          1:iPhone16,1:17.4
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           to.bitkit [2179]

Date/Time:           2024-05-30 10:53:05.6277 -0300
Launch Time:         2024-05-29 20:28:47.8699 -0300
OS Version:          iPhone OS 17.5.1 (21F90)
Release Type:        User
Baseband Version:    1.60.02
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGKILL)
Exception Subtype: KERN_PROTECTION_FAILURE at 0x000000030206ff80
Exception Codes: 0x0000000000000002, 0x000000030206ff80
VM Region Info: 0x30206ff80 is in 0x300000000-0x320000000;  bytes after start: 34013056  bytes before end: 502857855
      REGION TYPE                 START - END      [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      unused __TEXT            279ecc000-279ed0000 [   16K] r--/r-- SM=COW  unused  unknown system shared lib __TEXT
      GAP OF 0x86130000 BYTES
--->  MALLOC_NANO              300000000-320000000 [512.0M] rw-/rwx SM=PRV  
      GAP OF 0xca0000000 BYTES
      commpage (reserved)      fc0000000-1000000000 [  1.0G] ---/--- SM=NUL  reserved VM address space (unallocated)
Termination Reason: CODESIGNING 2 Invalid Page

Triggered by Thread:  2

Kernel Triage:
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter

Thread 0 name:
Thread 0:
0   libsystem_kernel.dylib          0x00000001ee120808 mach_msg2_trap + 8 (:-1)
1   libsystem_kernel.dylib          0x00000001ee124008 mach_msg2_internal + 80 (mach_msg.c:201)
2   libsystem_kernel.dylib          0x00000001ee123f20 mach_msg_overwrite + 436 (mach_msg.c:0)
3   libsystem_kernel.dylib          0x00000001ee123d60 mach_msg + 24 (mach_msg.c:323)
4   CoreFoundation                  0x00000001a5040f5c __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2624)
5   CoreFoundation                  0x00000001a5040600 __CFRunLoopRun + 1208 (CFRunLoop.c:3007)
6   CoreFoundation                  0x00000001a503fcd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
7   GraphicsServices                0x00000001e9ef01a8 GSEventRunModal + 164 (GSEvent.c:2196)
8   UIKitCore                       0x00000001a767890c -[UIApplication _run] + 888 (UIApplication.m:3713)
9   UIKitCore                       0x00000001a772c9d0 UIApplicationMain + 340 (UIApplication.m:5303)
10  bitkit                          0x0000000102f082f4 main + 80 (main.m:8)
11  dyld                            0x00000001c86f1e4c start + 2240 (dyldMain.cpp:1298)

Thread 1 name:
Thread 1:
0   libsystem_kernel.dylib          0x00000001ee120808 mach_msg2_trap + 8 (:-1)
1   libsystem_kernel.dylib          0x00000001ee124008 mach_msg2_internal + 80 (mach_msg.c:201)
2   libsystem_kernel.dylib          0x00000001ee123f20 mach_msg_overwrite + 436 (mach_msg.c:0)
3   libsystem_kernel.dylib          0x00000001ee123d60 mach_msg + 24 (mach_msg.c:323)
4   CoreFoundation                  0x00000001a5040f5c __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2624)
5   CoreFoundation                  0x00000001a5040600 __CFRunLoopRun + 1208 (CFRunLoop.c:3007)
6   CoreFoundation                  0x00000001a503fcd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
7   Foundation                      0x00000001a3f60e4c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 (NSRunLoop.m:373)
8   Foundation                      0x00000001a3f60c9c -[NSRunLoop(NSRunLoop) runUntilDate:] + 64 (NSRunLoop.m:420)
9   UIKitCore                       0x00000001a768c640 -[UIEventFetcher threadMain] + 420 (UIEventFetcher.m:1207)
10  Foundation                      0x00000001a3f77718 __NSThread__start__ + 732 (NSThread.m:991)
11  libsystem_pthread.dylib         0x0000000201ec906c _pthread_start + 136 (pthread.c:931)
12  libsystem_pthread.dylib         0x0000000201ec40d8 thread_start + 8 (:-1)

Thread 2 name:
Thread 2 Crashed:
0   ???                             0x000000030206ff80 0x0 + 12918914944
1   bitkit                          0x00000001034d5298 std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID>>::reset[abi:ue170006](facebook::jsi::PropNameID*) + 20 (unique_ptr.h:300)
2   bitkit                          0x00000001034d5298 std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID>>::~unique_ptr[abi:ue170006]() + 20 (unique_ptr.h:266)
3   bitkit                          0x00000001034d5298 std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID>>::~unique_ptr[abi:ue170006]() + 20 (unique_ptr.h:266)
4   bitkit                          0x00000001034d5298 std::__1::pair<Prop const, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID>>>::~pair() + 20 (pair.h:81)
5   bitkit                          0x00000001034d5298 std::__1::pair<Prop const, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID>>>::~pair() + 20 (pair.h:81)
6   bitkit                          0x00000001034d5298 void std::__1::__destroy_at[abi:ue170006]<std::__1::pair<Prop const, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID>>>, 0>(std::__1::pair<Prop co... + 20 (construct_at.h:69)
7   bitkit                          0x00000001034d5298 void std::__1::destroy_at[abi:ue170006]<std::__1::pair<Prop const, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID>>>, 0>(std::__1::pair<Prop cons... + 20 (construct_at.h:104)
8   bitkit                          0x00000001034d5298 void std::__1::allocator_traits<std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<Prop, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::P... + 20 (allocator_traits.h:323)
9   bitkit                          0x00000001034d5298 std::__1::__hash_node_destructor<std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<Prop, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::... + 44 (__hash_table:674)
10  bitkit                          0x00000001034f51dc std::__1::unique_ptr<std::__1::__hash_node<std::__1::__hash_value_type<Prop, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID>>>, void*>, std::__1:... + 20 (unique_ptr.h:300)
11  bitkit                          0x00000001034f51dc std::__1::unique_ptr<std::__1::__hash_node<std::__1::__hash_value_type<Prop, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID>>>, void*>, std::__1:... + 20 (unique_ptr.h:266)
12  bitkit                          0x00000001034f51dc std::__1::unique_ptr<std::__1::__hash_node<std::__1::__hash_value_type<Prop, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID>>>, void*>, std::__1:... + 20 (unique_ptr.h:266)
13  bitkit                          0x00000001034f51dc std::__1::__hash_table<std::__1::__hash_value_type<Prop, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID>>>, std::__1::__unordered_map_hasher<Prop... + 52 (__hash_table:2230)
14  bitkit                          0x00000001034f4a04 std::__1::__hash_table<std::__1::__hash_value_type<Prop, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID>>>, std::__1::__unordered_map_hasher<Prop... + 24 (__hash_table:2242)
15  bitkit                          0x00000001034f4a04 std::__1::unordered_map<Prop, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID>>, std::__1::hash<Prop>, std::__1::equal_to<Prop>, std::__1::allocat... + 24 (unordered_map:1452)
16  bitkit                          0x00000001034f4a04 PropNameIDCache::invalidate() + 32 (MGLTypedArray.cpp:53)
17  bitkit                          0x00000001034f4a04 invalidateJsiPropNameIDCache() + 44 (MGLTypedArray.cpp:63)
18  bitkit                          0x00000001034eecac margelo::MGLQuickCryptoHostObject::~MGLQuickCryptoHostObject() + 40 (MGLQuickCryptoHostObject.h:25)
19  bitkit                          0x0000000102f866c8 std::__1::__shared_count::__release_shared[abi:ue170006]() + 40 (shared_ptr.h:173)
20  bitkit                          0x0000000102f866c8 std::__1::__shared_weak_count::__release_shared[abi:ue170006]() + 40 (shared_ptr.h:214)
21  bitkit                          0x0000000102f866c8 std::__1::shared_ptr<facebook::jsi::HostObject>::~shared_ptr[abi:ue170006]() + 64 (shared_ptr.h:773)
22  bitkit                          0x0000000102f9e2e8 std::__1::shared_ptr<facebook::jsi::HostObject>::~shared_ptr[abi:ue170006]() + 4 (shared_ptr.h:771)
23  bitkit                          0x0000000102f9e2e8 facebook::jsi::DecoratedHostObject::~DecoratedHostObject() + 20 (decorator.h:57)
24  bitkit                          0x0000000102f9e2e8 facebook::jsi::DecoratedHostObject::~DecoratedHostObject() + 36 (decorator.h:57)
25  hermes                          0x0000000105bba960 std::__1::shared_ptr<facebook::jsi::HostObject>::~shared_ptr[abi:v15006]() + 64
26  hermes                          0x0000000105bb9d78 facebook::hermes::HermesRuntimeImpl::JsiProxy::~JsiProxy() + 24
27  hermes                          0x0000000105c70fc8 hermes::vm::HadesGC::finalizeAll() + 372
28  hermes                          0x0000000105c0528c hermes::vm::Runtime::~Runtime() + 84
29  hermes                          0x0000000105c054b0 hermes::vm::Runtime::~Runtime() + 12
30  hermes                          0x0000000105bb6fa8 std::__1::shared_ptr<hermes::vm::Runtime>::~shared_ptr[abi:v15006]() + 64
31  hermes                          0x0000000105bb6f48 facebook::hermes::HermesRuntimeImpl::~HermesRuntimeImpl() + 36
32  hermes                          0x0000000105bb43cc facebook::hermes::HermesRuntimeImpl::~HermesRuntimeImpl() + 12
33  bitkit                          0x0000000102fb71f8 std::__1::__shared_count::__release_shared[abi:ue170006]() + 40 (shared_ptr.h:173)
34  bitkit                          0x0000000102fb71f8 std::__1::__shared_weak_count::__release_shared[abi:ue170006]() + 40 (shared_ptr.h:214)
35  bitkit                          0x0000000102fb71f8 std::__1::shared_ptr<facebook::jsi::Runtime>::~shared_ptr[abi:ue170006]() + 64 (shared_ptr.h:773)
36  bitkit                          0x00000001031e1878 std::__1::shared_ptr<facebook::jsi::Runtime>::~shared_ptr[abi:ue170006]() + 4 (shared_ptr.h:771)
37  bitkit                          0x00000001031e1878 facebook::react::(anonymous namespace)::DecoratedRuntime::~DecoratedRuntime() + 20 (HermesExecutorFactory.cpp:167)
38  bitkit                          0x00000001031e1878 facebook::react::(anonymous namespace)::DecoratedRuntime::~DecoratedRuntime() + 36 (HermesExecutorFactory.cpp:161)
39  bitkit                          0x0000000102fb71f8 std::__1::__shared_count::__release_shared[abi:ue170006]() + 40 (shared_ptr.h:173)
40  bitkit                          0x0000000102fb71f8 std::__1::__shared_weak_count::__release_shared[abi:ue170006]() + 40 (shared_ptr.h:214)
41  bitkit                          0x0000000102fb71f8 std::__1::shared_ptr<facebook::jsi::Runtime>::~shared_ptr[abi:ue170006]() + 64 (shared_ptr.h:773)
42  bitkit                          0x00000001031e1160 std::__1::shared_ptr<facebook::jsi::Runtime>::~shared_ptr[abi:ue170006]() + 4 (shared_ptr.h:771)
43  bitkit                          0x00000001031e1160 facebook::react::JSIExecutor::~JSIExecutor() + 204 (JSIExecutor.h:71)
44  bitkit                          0x00000001031e1370 facebook::react::HermesExecutor::~HermesExecutor() + 72 (HermesExecutorFactory.h:48)
45  bitkit                          0x00000001031e1370 facebook::react::HermesExecutor::~HermesExecutor() + 72 (HermesExecutorFactory.h:48)
46  bitkit                          0x00000001031e1370 facebook::react::HermesExecutor::~HermesExecutor() + 88 (HermesExecutorFactory.h:48)
47  bitkit                          0x000000010302d9ec std::__1::__function::__value_func<void ()>::operator()[abi:ue170006]() const + 20 (function.h:518)
48  bitkit                          0x000000010302d9ec std::__1::function<void ()>::operator()() const + 20 (function.h:1169)
49  bitkit                          0x000000010302d9ec facebook::react::tryAndReturnError(std::__1::function<void ()> const&) + 32 (RCTCxxUtils.mm:73)
50  bitkit                          0x00000001030396f8 facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&) + 24 (RCTMessageThread.mm:68)
51  bitkit                          0x00000001030399c8 facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&) + 160 (RCTMessageThread.mm:91)
52  bitkit                          0x00000001031da650 facebook::react::NativeToJsBridge::destroy() + 88 (NativeToJsBridge.cpp:283)
53  bitkit                          0x00000001031d2008 facebook::react::Instance::~Instance() + 32 (Instance.cpp:38)
54  bitkit                          0x000000010302a6f4 std::__1::default_delete<facebook::react::Instance>::operator()[abi:ue170006](facebook::react::Instance*) const + 8 (unique_ptr.h:68)
55  bitkit                          0x000000010302a6f4 std::__1::__shared_ptr_pointer<facebook::react::Instance*, std::__1::shared_ptr<facebook::react::Instance>::__shared_ptr_default_delete<facebook::react::Instance, facebook::react::Instance>, std::_... + 20 (shared_ptr.h:262)
56  bitkit                          0x0000000103027178 std::__1::__shared_count::__release_shared[abi:ue170006]() + 16 (shared_ptr.h:173)
57  bitkit                          0x0000000103027178 std::__1::__shared_weak_count::__release_shared[abi:ue170006]() + 16 (shared_ptr.h:214)
58  bitkit                          0x0000000103027178 std::__1::shared_ptr<facebook::react::Instance>::~shared_ptr[abi:ue170006]() + 16 (shared_ptr.h:773)
59  bitkit                          0x0000000103027178 std::__1::shared_ptr<facebook::react::Instance>::~shared_ptr[abi:ue170006]() + 16 (shared_ptr.h:771)
60  bitkit                          0x0000000103027178 std::__1::shared_ptr<facebook::react::Instance>::reset[abi:ue170006]() + 76 (shared_ptr.h:840)
61  bitkit                          0x0000000103027a3c __26-[RCTCxxBridge invalidate]_block_invoke + 856 (RCTCxxBridge.mm:1245)
62  bitkit                          0x000000010302d9ec std::__1::__function::__value_func<void ()>::operator()[abi:ue170006]() const + 20 (function.h:518)
63  bitkit                          0x000000010302d9ec std::__1::function<void ()>::operator()() const + 20 (function.h:1169)
64  bitkit                          0x000000010302d9ec facebook::react::tryAndReturnError(std::__1::function<void ()> const&) + 32 (RCTCxxUtils.mm:73)
65  bitkit                          0x0000000103023570 -[RCTCxxBridge _tryAndHandleError:] + 108 (RCTCxxBridge.mm:341)
66  Foundation                      0x00000001a3f4daa4 __NSThreadPerformPerform + 264 (NSThread.m:1084)
67  CoreFoundation                  0x00000001a5043834 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1957)
68  CoreFoundation                  0x00000001a50437c8 __CFRunLoopDoSource0 + 176 (CFRunLoop.c:2001)
69  CoreFoundation                  0x00000001a5041298 __CFRunLoopDoSources0 + 244 (CFRunLoop.c:2038)
70  CoreFoundation                  0x00000001a5040484 __CFRunLoopRun + 828 (CFRunLoop.c:2955)
71  CoreFoundation                  0x00000001a503fcd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
72  bitkit                          0x00000001030234a0 +[RCTCxxBridge runRunLoop] + 212 (RCTCxxBridge.mm:332)
73  Foundation                      0x00000001a3f77718 __NSThread__start__ + 732 (NSThread.m:991)
74  libsystem_pthread.dylib         0x0000000201ec906c _pthread_start + 136 (pthread.c:931)
75  libsystem_pthread.dylib         0x0000000201ec40d8 thread_start + 8 (:-1)

Thread 3 name:
Thread 3:
0   libsystem_kernel.dylib          0x00000001ee1261cc __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib         0x0000000201ec66e4 _pthread_cond_wait + 1228 (pthread_cond.c:862)
2   libc++.1.dylib                  0x00000001b5426504 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28 (condition_variable.cpp:45)
3   hermes                          0x0000000105c74d04 hermes::vm::HadesGC::Executor::worker() + 316 (:-1)
4   hermes                          0x0000000105c74ba4 void* std::__1::__thread_proxy[abi:v15006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, hermes::vm::HadesGC::Executor::Execu... + 44 (:-1)
5   libsystem_pthread.dylib         0x0000000201ec906c _pthread_start + 136 (pthread.c:931)
6   libsystem_pthread.dylib         0x0000000201ec40d8 thread_start + 8 (:-1)

Thread 4:
0   libsystem_kernel.dylib          0x00000001ee1261cc __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib         0x0000000201ec66e4 _pthread_cond_wait + 1228 (pthread_cond.c:862)
2   libc++.1.dylib                  0x00000001b5426504 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28 (condition_variable.cpp:45)
3   bitkit                          0x00000001034ddd98 void std::__1::condition_variable::wait<margelo::DispatchQueue::dispatch_queue::dispatch_thread_handler()::$_0>(std::__1::unique_lock<std::__1::mutex>&, margelo::DispatchQueue::dispatch_queue::disp... + 28 (condition_variable.h:148)
4   bitkit                          0x00000001034ddd98 margelo::DispatchQueue::dispatch_queue::dispatch_thread_handler() + 96 (MGLDispatchQueue.cpp:58)
5   bitkit                          0x00000001034de32c decltype(*std::declval<margelo::DispatchQueue::dispatch_queue*>().*std::declval<void (margelo::DispatchQueue::dispatch_queue::*)()>()()) std::__1::__invoke[abi:ue170006]<void (margelo::DispatchQueu... + 28 (invoke.h:308)
6   bitkit                          0x00000001034de32c void std::__1::__thread_execute[abi:ue170006]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (margelo::DispatchQueue::dispatch_queue::*)(... + 28 (thread.h:227)
7   bitkit                          0x00000001034de32c void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (margelo::DispatchQueue::disp... + 72 (thread.h:238)
8   libsystem_pthread.dylib         0x0000000201ec906c _pthread_start + 136 (pthread.c:931)
9   libsystem_pthread.dylib         0x0000000201ec40d8 thread_start + 8 (:-1)

Thread 5 name:
Thread 5:
0   libsystem_kernel.dylib          0x00000001ee1261cc __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib         0x0000000201ec66e4 _pthread_cond_wait + 1228 (pthread_cond.c:862)
2   libc++.1.dylib                  0x00000001b5426504 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28 (condition_variable.cpp:45)
3   hermes                          0x0000000105c74d04 hermes::vm::HadesGC::Executor::worker() + 316 (:-1)
4   hermes                          0x0000000105c74ba4 void* std::__1::__thread_proxy[abi:v15006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, hermes::vm::HadesGC::Executor::Execu... + 44 (:-1)
5   libsystem_pthread.dylib         0x0000000201ec906c _pthread_start + 136 (pthread.c:931)
6   libsystem_pthread.dylib         0x0000000201ec40d8 thread_start + 8 (:-1)

Thread 6:
0   libsystem_kernel.dylib          0x00000001ee1261cc __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib         0x0000000201ec66e4 _pthread_cond_wait + 1228 (pthread_cond.c:862)
2   libc++.1.dylib                  0x00000001b5426504 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28 (condition_variable.cpp:45)
3   bitkit                          0x000000010350e264 void std::__1::condition_variable::wait<RNSkia::RNSkDispatchQueue::dispatch_thread_handler()::$_0>(std::__1::unique_lock<std::__1::mutex>&, RNSkia::RNSkDispatchQueue::dispatch_thread_handler()::$_0) + 28 (condition_variable.h:148)
4   bitkit                          0x000000010350e264 RNSkia::RNSkDispatchQueue::dispatch_thread_handler() + 96 (RNSkDispatchQueue.cpp:57)
5   bitkit                          0x000000010350e4a8 decltype(*std::declval<RNSkia::RNSkDispatchQueue*>().*std::declval<void (RNSkia::RNSkDispatchQueue::*)()>()()) std::__1::__invoke[abi:ue170006]<void (RNSkia::RNSkDispatchQueue::*)(), RNSkia::RNSkDi... + 28 (invoke.h:308)
6   bitkit                          0x000000010350e4a8 void std::__1::__thread_execute[abi:ue170006]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (RNSkia::RNSkDispatchQueue::*)(), RNSkia::RN... + 28 (thread.h:227)
7   bitkit                          0x000000010350e4a8 void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (RNSkia::RNSkDispatchQueue::*... + 72 (thread.h:238)
8   libsystem_pthread.dylib         0x0000000201ec906c _pthread_start + 136 (pthread.c:931)
9   libsystem_pthread.dylib         0x0000000201ec40d8 thread_start + 8 (:-1)

Thread 7 name:
Thread 7:
0   libsystem_kernel.dylib          0x00000001ee120808 mach_msg2_trap + 8 (:-1)
1   libsystem_kernel.dylib          0x00000001ee124008 mach_msg2_internal + 80 (mach_msg.c:201)
2   libsystem_kernel.dylib          0x00000001ee123f20 mach_msg_overwrite + 436 (mach_msg.c:0)
3   libsystem_kernel.dylib          0x00000001ee123d60 mach_msg + 24 (mach_msg.c:323)
4   CoreFoundation                  0x00000001a5040f5c __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2624)
5   CoreFoundation                  0x00000001a5040600 __CFRunLoopRun + 1208 (CFRunLoop.c:3007)
6   CoreFoundation                  0x00000001a503fcd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
7   Foundation                      0x00000001a3f60e4c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 (NSRunLoop.m:373)
8   bitkit                          0x0000000102f15330 +[GCDAsyncSocket cfstreamThread:] + 276 (GCDAsyncSocket.m:7686)
9   Foundation                      0x00000001a3f77718 __NSThread__start__ + 732 (NSThread.m:991)
10  libsystem_pthread.dylib         0x0000000201ec906c _pthread_start + 136 (pthread.c:931)
11  libsystem_pthread.dylib         0x0000000201ec40d8 thread_start + 8 (:-1)

Thread 8 name:
Thread 8:
0   libsystem_kernel.dylib          0x00000001ee120808 mach_msg2_trap + 8 (:-1)
1   libsystem_kernel.dylib          0x00000001ee124008 mach_msg2_internal + 80 (mach_msg.c:201)
2   libsystem_kernel.dylib          0x00000001ee123f20 mach_msg_overwrite + 436 (mach_msg.c:0)
3   libsystem_kernel.dylib          0x00000001ee123d60 mach_msg + 24 (mach_msg.c:323)
4   CoreFoundation                  0x00000001a5040f5c __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2624)
5   CoreFoundation                  0x00000001a5040600 __CFRunLoopRun + 1208 (CFRunLoop.c:3007)
6   CoreFoundation                  0x00000001a503fcd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
7   CFNetwork                       0x00000001a6220c90 +[__CFN_CoreSchedulingSetRunnable _run:] + 384 (CoreSchedulingSet.mm:1473)
8   Foundation                      0x00000001a3f77718 __NSThread__start__ + 732 (NSThread.m:991)
9   libsystem_pthread.dylib         0x0000000201ec906c _pthread_start + 136 (pthread.c:931)
10  libsystem_pthread.dylib         0x0000000201ec40d8 thread_start + 8 (:-1)

Thread 9 name:
Thread 9:
0   libsystem_kernel.dylib          0x00000001ee128474 __select + 8 (:-1)
1   CoreFoundation                  0x00000001a50abb7c __CFSocketManager + 640 (CFSocket.c:1340)
2   libsystem_pthread.dylib         0x0000000201ec906c _pthread_start + 136 (pthread.c:931)
3   libsystem_pthread.dylib         0x0000000201ec40d8 thread_start + 8 (:-1)

Thread 10:
0   libsystem_pthread.dylib         0x0000000201ec40c4 start_wqthread + 0 (:-1)

Thread 11:
0   libsystem_pthread.dylib         0x0000000201ec40c4 start_wqthread + 0 (:-1)

Thread 12:
0   libsystem_pthread.dylib         0x0000000201ec40c4 start_wqthread + 0 (:-1)

Thread 13:
0   libsystem_pthread.dylib         0x0000000201ec40c4 start_wqthread + 0 (:-1)

Thread 14 name:
Thread 14:
0   libsystem_kernel.dylib          0x00000001ee120808 mach_msg2_trap + 8 (:-1)
1   libsystem_kernel.dylib          0x00000001ee124008 mach_msg2_internal + 80 (mach_msg.c:201)
2   libsystem_kernel.dylib          0x00000001ee122a20 vm_copy + 120 (vm_mapUser.c:917)
3   Foundation                      0x00000001a401e234 NSCopyMemoryPages + 56 (NSPlatform.m:1882)
4   Foundation                      0x00000001a3eaa25c -[NSConcreteMutableData appendBytes:length:] + 512 (NSData.m:2109)
5   Foundation                      0x00000001a3fbc79c __49-[_NSDispatchData enumerateByteRangesUsingBlock:]_block_invoke + 68 (OS_dispatch_data+NSDispatchData.m:47)
6   Foundation                      0x00000001a3fbc730 -[_NSDispatchData enumerateByteRangesUsingBlock:] + 112 (OS_dispatch_data+NSDispatchData.m:50)
7   Foundation                      0x00000001a3eba2f0 -[NSData(NSData) mutableCopyWithZone:] + 180 (NSData.m:465)
8   bitkit                          0x000000010300ec44 facebook::react::ensureNullTerminated(NSData*) + 60 (NSDataBigString.mm:28)
9   bitkit                          0x000000010300ec44 facebook::react::NSDataBigString::NSDataBigString(NSData*) + 132 (NSDataBigString.mm:38)
10  bitkit                          0x0000000103028dc8 std::__1::__unique_if<facebook::react::NSDataBigString>::__unique_single std::__1::make_unique[abi:ue170006]<facebook::react::NSDataBigString, NSData* const __strong&>(NSData* const __strong&) + 20 (unique_ptr.h:689)
11  bitkit                          0x0000000103028dc8 __51-[RCTCxxBridge executeApplicationScript:url:async:]_block_invoke + 532 (RCTCxxBridge.mm:1465)
12  bitkit                          0x000000010302d9ec std::__1::__function::__value_func<void ()>::operator()[abi:ue170006]() const + 20 (function.h:518)
13  bitkit                          0x000000010302d9ec std::__1::function<void ()>::operator()() const + 20 (function.h:1169)
14  bitkit                          0x000000010302d9ec facebook::react::tryAndReturnError(std::__1::function<void ()> const&) + 32 (RCTCxxUtils.mm:73)
15  bitkit                          0x0000000103023570 -[RCTCxxBridge _tryAndHandleError:] + 108 (RCTCxxBridge.mm:341)
16  bitkit                          0x0000000103028b50 -[RCTCxxBridge executeApplicationScript:url:async:] + 152 (RCTCxxBridge.mm:1440)
17  bitkit                          0x00000001030289bc -[RCTCxxBridge enqueueApplicationScript:url:onComplete:] + 80 (RCTCxxBridge.mm:1422)
18  bitkit                          0x0000000103026950 -[RCTCxxBridge executeSourceCode:withSourceURL:sync:] + 176 (RCTCxxBridge.mm:1057)
19  bitkit                          0x0000000103024650 __21-[RCTCxxBridge start]_block_invoke_2 + 88 (RCTCxxBridge.mm:485)
20  libdispatch.dylib               0x00000001acf1413c _dispatch_call_block_and_release + 32 (init.c:1530)
21  libdispatch.dylib               0x00000001acf15dd4 _dispatch_client_callout + 20 (object.m:576)
22  libdispatch.dylib               0x00000001acf27a6c _dispatch_root_queue_drain + 864 (queue.c:7136)
23  libdispatch.dylib               0x00000001acf2809c _dispatch_worker_thread2 + 156 (queue.c:7204)
24  libsystem_pthread.dylib         0x0000000201ec78f8 _pthread_wqthread + 228 (pthread.c:2709)
25  libsystem_pthread.dylib         0x0000000201ec40cc start_wqthread + 8 (:-1)

Thread 15 name:
Thread 15:
0   libsystem_kernel.dylib          0x00000001ee120808 mach_msg2_trap + 8 (:-1)
1   libsystem_kernel.dylib          0x00000001ee124008 mach_msg2_internal + 80 (mach_msg.c:201)
2   libsystem_kernel.dylib          0x00000001ee123f20 mach_msg_overwrite + 436 (mach_msg.c:0)
3   libsystem_kernel.dylib          0x00000001ee123d60 mach_msg + 24 (mach_msg.c:323)
4   CoreFoundation                  0x00000001a5040f5c __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2624)
5   CoreFoundation                  0x00000001a5040600 __CFRunLoopRun + 1208 (CFRunLoop.c:3007)
6   CoreFoundation                  0x00000001a503fcd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
7   bitkit                          0x00000001030234a0 +[RCTCxxBridge runRunLoop] + 212 (RCTCxxBridge.mm:332)
8   Foundation                      0x00000001a3f77718 __NSThread__start__ + 732 (NSThread.m:991)
9   libsystem_pthread.dylib         0x0000000201ec906c _pthread_start + 136 (pthread.c:931)
10  libsystem_pthread.dylib         0x0000000201ec40d8 thread_start + 8 (:-1)

Thread 16 name:
Thread 16:
0   libsystem_kernel.dylib          0x00000001ee1261cc __psynch_cvwait + 8 (:-1)
1   libsystem_pthread.dylib         0x0000000201ec66e4 _pthread_cond_wait + 1228 (pthread_cond.c:862)
2   libc++.1.dylib                  0x00000001b5426504 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28 (condition_variable.cpp:45)
3   hermes                          0x0000000105c74d04 hermes::vm::HadesGC::Executor::worker() + 316 (:-1)
4   hermes                          0x0000000105c74ba4 void* std::__1::__thread_proxy[abi:v15006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, hermes::vm::HadesGC::Executor::Execu... + 44 (:-1)
5   libsystem_pthread.dylib         0x0000000201ec906c _pthread_start + 136 (pthread.c:931)
6   libsystem_pthread.dylib         0x0000000201ec40d8 thread_start + 8 (:-1)

Thread 2 crashed with ARM Thread State (64-bit):
    x0: 0x000000030206fe60   x1: 0x0000000302f21bc0   x2: 0x0000000106b00000   x3: 0x0000000106b1fde0
    x4: 0x0000000000000190   x5: 0x0000000106b1fd90   x6: 0x000000000000001e   x7: 0x0000000000000000
    x8: 0x000000030206ff80   x9: 0x0000000000000001  x10: 0x0000000000000002  x11: 0x00000001040b0010
   x12: 0x00000001040b0010  x13: 0x0000000000000001  x14: 0x0000000000000000  x15: 0x0000000000000000
   x16: 0xd7960001042c8080  x17: 0x0000000106b4ccc0  x18: 0x0000000000000000  x19: 0x0000000302f21bc0
   x20: 0x000000016d3557b8  x21: 0x000000010dad8f80  x22: 0x00000003022c9350  x23: 0x000000010703a200
   x24: 0x000000010703a340  x25: 0x0000000105d85c78  x26: 0x000000010dc00000  x27: 0x0000000103f056e0
   x28: 0x0000008900000004   fp: 0x000000016d355780   lr: 0x00000001034d4740
    sp: 0x000000016d355770   pc: 0x000000030206ff80 cpsr: 0x60001800
   esr: 0x8200000f (Instruction Abort) Permission fault

Binary Images:
        0x102f04000 -         0x103ef7fff bitkit arm64  <c099d0f2a2db36a489b95bcd094837b6> /private/var/containers/Bundle/Application/CFEBE985-285D-4776-A220-3E024F2064BD/bitkit.app/bitkit
        0x1043e4000 -         0x1043effff libobjc-trampolines.dylib arm64e  <2e2c05f8377a30899ad91926d284dd03> /private/preboot/Cryptexes/OS/usr/lib/libobjc-trampolines.dylib
        0x1047a0000 -         0x10543bfff LightningDevKit arm64  <6e49dd867e7a39d18876f8b979764b5a> /private/var/containers/Bundle/Application/CFEBE985-285D-4776-A220-3E024F2064BD/bitkit.app/Frameworks/LightningDevKit.framework/LightningDevKit
        0x105930000 -         0x105aebfff OpenSSL arm64  <8a5f47e48dd83ebe88058434fbfb6bfb> /private/var/containers/Bundle/Application/CFEBE985-285D-4776-A220-3E024F2064BD/bitkit.app/Frameworks/OpenSSL.framework/OpenSSL
        0x105ba8000 -         0x105d77fff hermes arm64  <8a13f69d6c1130da99593d1bc0365ce1> /private/var/containers/Bundle/Application/CFEBE985-285D-4776-A220-3E024F2064BD/bitkit.app/Frameworks/hermes.framework/hermes
        0x1a3e99000 -         0x1a4a0efff Foundation arm64e  <3d3a12e3f5e9361fb00a4a5e8861aa55> /System/Library/Frameworks/Foundation.framework/Foundation
        0x1a4fed000 -         0x1a551afff CoreFoundation arm64e  <00e76a98210c3cb5930bf236807ff24c> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
        0x1a6123000 -         0x1a64fffff CFNetwork arm64e  <a5124019e235371686c7e75cf0163945> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
        0x1a726e000 -         0x1a8d8efff UIKitCore arm64e  <1741fa374e53371e8daed611aab0043d> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
        0x1acf12000 -         0x1acf58fff libdispatch.dylib arm64e  <81d355df266a3010bab8113b76a206c1> /usr/lib/system/libdispatch.dylib
        0x1acf59000 -         0x1acfd6ff3 libsystem_c.dylib arm64e  <b122f07fa15637f3a22d64627c0c4b24> /usr/lib/system/libsystem_c.dylib
        0x1b5203000 -         0x1b5238fff libsystem_malloc.dylib arm64e  <770b91e3056b3e7eb731234fe649d088> /usr/lib/system/libsystem_malloc.dylib
        0x1b5419000 -         0x1b54a2fff libc++.1.dylib arm64e  <badf6383449432f297ef716ea17420f6> /usr/lib/libc++.1.dylib
        0x1c86b5000 -         0x1c8741ef7 dyld arm64e  <71846eacee653697bf7d790b6a07dcdb> /usr/lib/dyld
        0x1e9eef000 -         0x1e9ef7fff GraphicsServices arm64e  <c19b2aeb6aa83f998a53f76c7a0d98fe> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
        0x1ee11f000 -         0x1ee158fef libsystem_kernel.dylib arm64e  <13b5134e819c3baab3004856112114cb> /usr/lib/system/libsystem_kernel.dylib
        0x201ec3000 -         0x201ecfff3 libsystem_pthread.dylib arm64e  <1196b6c3333d3450818ff3663484b8eb> /usr/lib/system/libsystem_pthread.dylib

EOF
pwltr commented 5 months ago

This is a known issue with react-native-restart. Could be we don't have to restart anymore, this was a precaution to make sure no data is lingering after reset. We should do some testing and see.

JeanlChristophe commented 4 months ago

@catch-21 when you have time this week, can you test it and tell us if you can replicate it please?

catch-21 commented 4 months ago

Can confirm this is still an issue on a recent iPhone running iOS 17

https://github.com/user-attachments/assets/f4a8b1c9-fdfd-4b2e-8bbe-0b73a5b086a4