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

iOS reanimated::Shareable Crash #6784

Open
Prislashate opened this issue Dec 3, 2024 · 2 comments
Open

iOS reanimated::Shareable Crash #6784

Prislashate opened this issue Dec 3, 2024 · 2 comments
Labels
Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario Platform: iOS This issue is specific to iOS

Comments

@Prislashate
Copy link

Prislashate commented Dec 3, 2024

Description

This Crash is from Xcode -> Organizer -> Crashes.

Use New Arch, Fabric, Bridgeless, Hermes

退出销毁 RN View 后,销毁 RCTHost。

RCTHost 执行 - (void)dealloc 时调用了 RCTInstance 的 invalidate,然后异步到 JS 线程执行了 该 Block:__25-[RCTInstance invalidate]_block_invoke。

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000010
Exception Codes: 0x0000000000000001, 0x0000000000000010
VM Region Info: 0x10 is not in any region.  Bytes before following region: 68719476720
      REGION TYPE                 START - END      [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      commpage (reserved)     1000000000-7000000000 [384.0G] ---/--- SM=NUL  ...(unallocated)
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [61876]

Triggered by Thread:  23


Crash Stack:
Thread 23 Crashed:
0   App                     	0x000000010516bc44 std::__1::__shared_weak_count::__release_shared[abi:ne180100]() + 56
1   App                     	0x000000010727a43c std::__1::shared_ptr<reanimated::Shareable>::~shared_ptr[abi:ne180100]() + 28
2   App                     	0x00000001072972d0 std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<reanimated::Shareable>>::~pair() + 24
3   App                     	0x0000000107297588 std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<reanimated::Shareable>>, std::__1::allocator<std::__1::pai... + 40
4   App                     	0x0000000107297538 std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<reanimated::Shareable>>, std::__1::allocator<std::__1::pai... + 32
5   App                     	0x0000000107297504 std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<reanimated::Shareable>>, std::__1::allocator<std::__1::pai... + 32

6   App                     	0x0000000107295f28 reanimated::ShareableObject::~ShareableObject() + 48
7   App                     	0x000000010516bc50 std::__1::__shared_weak_count::__release_shared[abi:ne180100]() + 68
8   App                     	0x000000010727a43c std::__1::shared_ptr<reanimated::Shareable>::~shared_ptr[abi:ne180100]() + 28
9   App                     	0x0000000107296ff0 std::__1::vector<std::__1::shared_ptr<reanimated::Shareable>, std::__1::allocator<std::__1::shared_ptr<reanimated::Shareable>>>::__base_destruct_at_end[abi:ne180100](std::__1::shared_ptr<reanimated... + 40
10  App                     	0x0000000107296fa0 std::__1::vector<std::__1::shared_ptr<reanimated::Shareable>, std::__1::allocator<std::__1::shared_ptr<reanimated::Shareable>>>::__destroy_vector::operator()[abi:ne180100]() + 32
11  App                     	0x0000000107296f6c std::__1::vector<std::__1::shared_ptr<reanimated::Shareable>, std::__1::allocator<std::__1::shared_ptr<reanimated::Shareable>>>::~vector[abi:ne180100]() + 32

12  App                     	0x000000010729786c reanimated::ShareableArray::~ShareableArray() + 32
13  App                     	0x000000010516bc50 std::__1::__shared_weak_count::__release_shared[abi:ne180100]() + 68
14  App                     	0x000000010727a43c std::__1::shared_ptr<reanimated::Shareable>::~shared_ptr[abi:ne180100]() + 28
15  App                     	0x0000000107296ff0 std::__1::vector<std::__1::shared_ptr<reanimated::Shareable>, std::__1::allocator<std::__1::shared_ptr<reanimated::Shareable>>>::__base_destruct_at_end[abi:ne180100](std::__1::shared_ptr<reanimated... + 40
16  App                     	0x0000000107296fa0 std::__1::vector<std::__1::shared_ptr<reanimated::Shareable>, std::__1::allocator<std::__1::shared_ptr<reanimated::Shareable>>>::__destroy_vector::operator()[abi:ne180100]() + 32
17  App                     	0x0000000107296f6c std::__1::vector<std::__1::shared_ptr<reanimated::Shareable>, std::__1::allocator<std::__1::shared_ptr<reanimated::Shareable>>>::~vector[abi:ne180100]() + 32

18  App                     	0x000000010729786c reanimated::ShareableArray::~ShareableArray() + 32
19  App                     	0x000000010516bc50 std::__1::__shared_weak_count::__release_shared[abi:ne180100]() + 68
20  App                     	0x000000010727a43c std::__1::shared_ptr<reanimated::Shareable>::~shared_ptr[abi:ne180100]() + 28
21  App                     	0x00000001072972d0 std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<reanimated::Shareable>>::~pair() + 24
22  App                     	0x0000000107297588 std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<reanimated::Shareable>>, std::__1::allocator<std::__1::pai... + 40
23  App                     	0x0000000107297538 std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<reanimated::Shareable>>, std::__1::allocator<std::__1::pai... + 32
24  App                     	0x0000000107297504 std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<reanimated::Shareable>>, std::__1::allocator<std::__1::pai... + 32

25  App                     	0x0000000107295f28 reanimated::ShareableObject::~ShareableObject() + 48
26  App                     	0x000000010516bc50 std::__1::__shared_weak_count::__release_shared[abi:ne180100]() + 68
27  App                     	0x000000010727a43c std::__1::shared_ptr<reanimated::Shareable>::~shared_ptr[abi:ne180100]() + 28
28  App                     	0x00000001072972d0 std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<reanimated::Shareable>>::~pair() + 24
29  App                     	0x0000000107297588 std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<reanimated::Shareable>>, std::__1::allocator<std::__1::pai... + 40
30  App                     	0x0000000107297538 std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<reanimated::Shareable>>, std::__1::allocator<std::__1::pai... + 32
31  App                     	0x0000000107297504 std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::shared_ptr<reanimated::Shareable>>, std::__1::allocator<std::__1::pai... + 32

32  App                     	0x0000000107295f28 reanimated::ShareableObject::~ShareableObject() + 48
33  App                     	0x000000010516bc50 std::__1::__shared_weak_count::__release_shared[abi:ne180100]() + 68
34  App                     	0x000000010727a43c std::__1::shared_ptr<reanimated::Shareable>::~shared_ptr[abi:ne180100]() + 28
35  App                     	0x0000000107295624 reanimated::ShareableJSRef::~ShareableJSRef() + 32
36  hermes                        	0x000000010d7b655c 0x10d7a0000 + 91484
37  hermes                        	0x000000010d90a5d0 0x10d7a0000 + 1484240
38  hermes                        	0x000000010d88234c 0x10d7a0000 + 926540
39  hermes                        	0x000000010d8827dc 0x10d7a0000 + 927708
40  hermes                        	0x000000010d7b3b08 0x10d7a0000 + 80648
41  hermes                        	0x000000010d7b02cc 0x10d7a0000 + 66252
42  App                     	0x000000010516bc50 std::__1::__shared_weak_count::__release_shared[abi:ne180100]() + 68
43  App                     	0x0000000107512610 std::__1::shared_ptr<facebook::hermes::HermesRuntime>::~shared_ptr[abi:ne180100]() + 28
44  App                     	0x00000001074fe844 facebook::react::HermesJSRuntime::~HermesJSRuntime() + 48
45  App                     	0x00000001074fe570 facebook::react::HermesJSRuntime::~HermesJSRuntime() + 12
46  App                     	0x000000010516bc50 std::__1::__shared_weak_count::__release_shared[abi:ne180100]() + 68
47  App                     	0x00000001074f2818 std::__1::shared_ptr<facebook::react::JSRuntime>::~shared_ptr[abi:ne180100]() + 28
48  App                     	0x00000001074f269c facebook::react::ReactInstance::~ReactInstance() + 80
49  App                     	0x00000001074f2644 std::__1::default_delete<facebook::react::ReactInstance>::operator()[abi:ne180100](facebook::react::ReactInstance*) const + 20
50  App                     	0x00000001074efd70 __25-[RCTInstance invalidate]_block_invoke + 48
51  App                     	0x00000001073841ac facebook::react::tryAndReturnError(std::__1::function<void ()> const&) + 16
52  App                     	0x00000001074f4a28 -[RCTJSThreadManager _tryAndHandleError:] + 56
53  App                     	0x00000001074f4c00 std::__1::__function::__func<-[RCTJSThreadManager dispatchToJSThread:]::$_0, std::__1::allocator<-[RCTJSThreadManager dispatchToJSThread:]::$_0>, void ()>::operator()() + 36
54  App                     	0x00000001073841ac facebook::react::tryAndReturnError(std::__1::function<void ()> const&) + 16
55  App                     	0x00000001073901ec facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&) + 24
56  App                     	0x0000000107390070 invocation function for block in facebook::react::RCTMessageThread::runAsync(std::__1::function<void ()>) + 32
57  CoreFoundation                	0x00000001b4cb1138 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28 (CFRunLoop.c:1805)
58  CoreFoundation                	0x00000001b4caf92c __CFRunLoopDoBlocks + 356 (CFRunLoop.c:1847)
59  CoreFoundation                	0x00000001b4cad808 __CFRunLoopRun + 812 (CFRunLoop.c:2953)
60  CoreFoundation                	0x00000001b4cad3f8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
61  App                     	0x00000001074f4990 +[RCTJSThreadManager runRunLoop] + 204
62  Foundation                    	0x00000001b3cc3d40 __NSThread__start__ + 732 (NSThread.m:991)
63  libsystem_pthread.dylib       	0x000000021ed744d4 _pthread_start + 136 (pthread.c:904)
64  libsystem_pthread.dylib       	0x000000021ed73a10 thread_start + 8 (:-1)

Thread 23 crashed with ARM Thread State (64-bit):
    x0: 0x0000000281b8d300   x1: 0x00000002826b7980   x2: 0x0000000000000000   x3: 0x000000028117d980
    x4: 0x00000002829c9940   x5: 0x000000011c1f84a0   x6: 0x0000000000000365   x7: 0x0000000000ffff7f
    x8: 0x0000000000000000   x9: 0x0000000000000000  x10: 0xffffffffffffffff  x11: 0x0000000000000000
   x12: 0x00000000000007fb  x13: 0x00000000000007fd  x14: 0x0000000097c11866  x15: 0x0000000000000066
   x16: 0x0000000097a1103d  x17: 0x0000000000011800  x18: 0x0000000000000000  x19: 0x0000000281b8d300
   x20: 0x00000002829c97e8  x21: 0x000000014b5c20d0  x22: 0x000000014b5c20e0  x23: 0x000000010dabb0a0
   x24: 0x00000000141300cd  x25: 0x0000000000000000  x26: 0x000000011a31d040  x27: 0x00000002811b9dc0
   x28: 0x0000000000000000   fp: 0x000000016bd456a0   lr: 0x000000010727a43c
    sp: 0x000000016bd45690   pc: 0x000000010516bc44 cpsr: 0x20000000
   esr: 0x92000006 (Data Abort) byte read Translation fault

Steps to reproduce

Not stable reproduce.

Snack or a link to a repository

no

Reanimated version

3.15.0

React Native version

0.74.3

Platforms

iOS

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added the Missing info The user didn't precise the problem enough label Dec 3, 2024
Copy link

github-actions bot commented Dec 3, 2024

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Snack or a link to a repository section.

@github-actions github-actions bot added the Missing repro This issue need minimum repro scenario label Dec 3, 2024
Copy link

github-actions bot commented Dec 3, 2024

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@github-actions github-actions bot added the Platform: iOS This issue is specific to iOS label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario Platform: iOS This issue is specific to iOS
Projects
None yet
Development

No branches or pull requests

1 participant