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

Crashes on iOS: SIGSEV: RNICleanableViewSenderType: retain > Attempted to dereference null pointer #99

Open
nandorojo opened this issue Mar 29, 2024 · 9 comments

Comments

@nandorojo
Copy link
Collaborator

nandorojo commented Mar 29, 2024

Getting crashes on Expo SDK 50. Here are the versions:

    "react-native-ios-adaptive-modal": "^0.7.0",
    "react-native-ios-context-menu": "^2.5.1",
    "react-native-ios-utilities": "^4.4.2",

Here's the raw stack trace:

Click me to view stack trace
OS Version: iOS 17.3.1 (21D61)
Report Version: 104

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: SEGV_ACCERR
Crashed Thread: 0

Application Specific Information:
retain >
Attempted to dereference null pointer.

Thread 0 Crashed:
0   libobjc.A.dylib                 0x3093518a4         lookUpImpOrForward
1   libobjc.A.dylib                 0x30934ccc0         [inlined] _objc_msgSend_uncached
2   libobjc.A.dylib                 0x30934ccc0         _objc_msgSend_uncached
3   SandGig                         0x202cc5ba4         RNICleanableViewSenderType
4   SandGig                         0x202cc4670         RNICleanableViewSenderType
5   SandGig                         0x202cc3c98         RNICleanableViewRegistry.notifyCleanup (RNICleanableViewRegistry.swift:174)
6   SandGig                         0x202cc4218         thunk for closure
7   SandGig                         0x202c28da8         __44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke (RCTUIManager.m:1208)
8   SandGig                         0x202c28e98         __44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke_2 (RCTUIManager.m:1228)
9   libdispatch.dylib               0x328c766a4         _dispatch_call_block_and_release
10  libdispatch.dylib               0x328c782fc         _dispatch_client_callout
11  libdispatch.dylib               0x328c86994         _dispatch_main_queue_drain
12  libdispatch.dylib               0x328c865ac         _dispatch_main_queue_callback_4CF
13  CoreFoundation                  0x318cb2f98         __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
14  CoreFoundation                  0x318cafca4         __CFRunLoopRun
15  CoreFoundation                  0x318caf3f4         CFRunLoopRunSpecific
16  GraphicsServices                0x39f84b4f4         GSEventRunModal
17  UIKitCore                       0x31d30289c         -[UIApplication _run]
18  UIKitCore                       0x31d301ed8         UIApplicationMain
19  SandGig                         0x2020f8410         main (main.m:7)
20  <unknown>                       0x1b3c96dcc         <redacted>

Thread 0 Crashed:
0   libobjc.A.dylib                 0x3093518a4         lookUpImpOrForward
1   libobjc.A.dylib                 0x30934ccc0         [inlined] _objc_msgSend_uncached
2   libobjc.A.dylib                 0x30934ccc0         _objc_msgSend_uncached
3   SandGig                         0x202cc5ba4         RNICleanableViewSenderType
4   SandGig                         0x202cc4670         RNICleanableViewSenderType
5   SandGig                         0x202cc3c98         RNICleanableViewRegistry.notifyCleanup (RNICleanableViewRegistry.swift:174)
6   SandGig                         0x202cc4218         thunk for closure
7   SandGig                         0x202c28da8         __44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke (RCTUIManager.m:1208)
8   SandGig                         0x202c28e98         __44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke_2 (RCTUIManager.m:1228)
9   libdispatch.dylib               0x328c766a4         _dispatch_call_block_and_release
10  libdispatch.dylib               0x328c782fc         _dispatch_client_callout
11  libdispatch.dylib               0x328c86994         _dispatch_main_queue_drain
12  libdispatch.dylib               0x328c865ac         _dispatch_main_queue_callback_4CF
13  CoreFoundation                  0x318cb2f98         __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
14  CoreFoundation                  0x318cafca4         __CFRunLoopRun
15  CoreFoundation                  0x318caf3f4         CFRunLoopRunSpecific
16  GraphicsServices                0x39f84b4f4         GSEventRunModal
17  UIKitCore                       0x31d30289c         -[UIApplication _run]
18  UIKitCore                       0x31d301ed8         UIApplicationMain
19  SandGig                         0x2020f8410         main (main.m:7)
20  <unknown>                       0x1b3c96dcc         <redacted>

Thread 1 name: com.apple.uikit.eventfetch-thread
0   libsystem_kernel.dylib          0x3a7ba9178         mach_msg2_trap
1   libsystem_kernel.dylib          0x3a7ba8f0c         mach_msg2_internal
2   libsystem_kernel.dylib          0x3a7ba8e24         mach_msg_overwrite
3   libsystem_kernel.dylib          0x3a7ba8c64         mach_msg
4   CoreFoundation                  0x318cb1a98         __CFRunLoopServiceMachPort
5   CoreFoundation                  0x318caf990         __CFRunLoopRun
6   CoreFoundation                  0x318caf3f4         CFRunLoopRunSpecific
7   Foundation                      0x316bdc3e8         -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
8   Foundation                      0x316c096a8         -[NSRunLoop(NSRunLoop) runUntilDate:]
9   UIKitCore                       0x31d26470c         -[UIEventFetcher threadMain]
10  Foundation                      0x316c5fd3c         __NSThread__start__
11  libsystem_pthread.dylib         0x3eceee4d0         _pthread_start

Thread 2
0   libsystem_kernel.dylib          0x3a7ba9978         __semwait_signal
1   libsystem_c.dylib               0x328d0bf1c         nanosleep
2   libsystem_c.dylib               0x328d0be34         usleep
3   SandGig                         0x202db0fd4         __45-[RSCloudModeManager startCloudModeProcessor]_block_invoke
4   libdispatch.dylib               0x328c766a4         _dispatch_call_block_and_release
5   libdispatch.dylib               0x328c782fc         _dispatch_client_callout
6   libdispatch.dylib               0x328c7f890         _dispatch_lane_serial_drain
7   libdispatch.dylib               0x328c803c0         _dispatch_lane_invoke
8   libdispatch.dylib               0x328c8b000         _dispatch_root_queue_drain_deferred_wlh
9   libdispatch.dylib               0x328c8a874         _dispatch_workloop_worker_thread
10  libsystem_pthread.dylib         0x3eceed960         _pthread_wqthread

Thread 3 name: com.facebook.react.JavaScript
0   libsystem_kernel.dylib          0x3a7ba9178         mach_msg2_trap
1   libsystem_kernel.dylib          0x3a7ba8f0c         mach_msg2_internal
2   libsystem_kernel.dylib          0x3a7ba8e24         mach_msg_overwrite
3   libsystem_kernel.dylib          0x3a7ba8c64         mach_msg
4   CoreFoundation                  0x318cb1a98         __CFRunLoopServiceMachPort
5   CoreFoundation                  0x318caf990         __CFRunLoopRun
6   CoreFoundation                  0x318caf3f4         CFRunLoopRunSpecific
7   SandGig                         0x202bec294         +[RCTCxxBridge runRunLoop] (RCTCxxBridge.mm:332)
8   Foundation                      0x316c5fd3c         __NSThread__start__
9   libsystem_pthread.dylib         0x3eceee4d0         _pthread_start

Thread 4 name: hades
0   libsystem_kernel.dylib          0x3a7ba9b1c         __psynch_cvwait
1   libsystem_pthread.dylib         0x3eceecfd0         _pthread_cond_wait
2   libc++.1.dylib                  0x3390ecec8         std::__1::condition_variable::wait
3   hermes                          0x10518c104         hermes::vm::HadesGC::Executor::worker
4   hermes                          0x10518bfa4         std::__1::__thread_proxy[abi:v15006]<T>
5   libsystem_pthread.dylib         0x3eceee4d0         _pthread_start

Thread 5 name: hades
0   libsystem_kernel.dylib          0x3a7ba9b1c         __psynch_cvwait
1   libsystem_pthread.dylib         0x3eceecfd0         _pthread_cond_wait
2   libc++.1.dylib                  0x3390ecec8         std::__1::condition_variable::wait
3   hermes                          0x10518c104         hermes::vm::HadesGC::Executor::worker
4   hermes                          0x10518bfa4         std::__1::__thread_proxy[abi:v15006]<T>
5   libsystem_pthread.dylib         0x3eceee4d0         _pthread_start

Thread 6 name: com.apple.NSURLConnectionLoader
0   libsystem_kernel.dylib          0x3a7ba9178         mach_msg2_trap
1   libsystem_kernel.dylib          0x3a7ba8f0c         mach_msg2_internal
2   libsystem_kernel.dylib          0x3a7ba8e24         mach_msg_overwrite
3   libsystem_kernel.dylib          0x3a7ba8c64         mach_msg
4   CoreFoundation                  0x318cb1a98         __CFRunLoopServiceMachPort
5   CoreFoundation                  0x318caf990         __CFRunLoopRun
6   CoreFoundation                  0x318caf3f4         CFRunLoopRunSpecific
7   CFNetwork                       0x31b08404c         estimatedPropertyListSize
8   Foundation                      0x316c5fd3c         __NSThread__start__
9   libsystem_pthread.dylib         0x3eceee4d0         _pthread_start

Thread 7
0   libsystem_kernel.dylib          0x3a7ba9978         __semwait_signal
1   libsystem_c.dylib               0x328d0bf1c         nanosleep
2   libsystem_c.dylib               0x328d1a1d8         sleep
3   SandGig                         0x202e28420         monitorCachedData (SentryCrashCachedData.c:145)
4   libsystem_pthread.dylib         0x3eceee4d0         _pthread_start

Thread 8 name: SentryCrash Exception Handler (Secondary)
0   libsystem_kernel.dylib          0x3a7ba9178         mach_msg2_trap
1   libsystem_kernel.dylib          0x3a7ba8f0c         mach_msg2_internal
2   libsystem_kernel.dylib          0x3a7bad714         thread_suspend
3   SandGig                         0x202e3413c         handleExceptions (SentryCrashMonitor_MachException.c:306)
4   libsystem_pthread.dylib         0x3eceee4d0         _pthread_start

Thread 9 name: SentryCrash Exception Handler (Primary)
0   libsystem_kernel.dylib          0x3a7ba9178         mach_msg2_trap
1   libsystem_kernel.dylib          0x3a7ba8f0c         mach_msg2_internal
2   libsystem_kernel.dylib          0x3a7ba8e24         mach_msg_overwrite
3   libsystem_kernel.dylib          0x3a7ba8c64         mach_msg
4   SandGig                         0x202e34168         handleExceptions (SentryCrashMonitor_MachException.c:314)
5   libsystem_pthread.dylib         0x3eceee4d0         _pthread_start

Thread 10 name: io.sentry.app-hang-tracker
0   libsystem_kernel.dylib          0x3a7ba9978         __semwait_signal
1   libsystem_c.dylib               0x328d0bf1c         nanosleep
2   Foundation                      0x3172f66c8         +[NSThread sleepForTimeInterval:]
3   SandGig                         0x202e16ecc         -[SentryANRTracker detectANRs] (SentryANRTracker.m:105)
4   Foundation                      0x316c5fd3c         __NSThread__start__
5   libsystem_pthread.dylib         0x3eceee4d0         _pthread_start

Thread 11 name: KSCrash Exception Handler (Secondary)
0   libsystem_kernel.dylib          0x3a7ba9178         mach_msg2_trap
1   libsystem_kernel.dylib          0x3a7ba8f0c         mach_msg2_internal
2   libsystem_kernel.dylib          0x3a7ba8e24         mach_msg_overwrite
3   libsystem_kernel.dylib          0x3a7ba8c64         mach_msg
4   SandGig                         0x202ba9dd8         rsc_ksmachexc_i_handleExceptions (RSC_KSCrashSentry_MachException.c:229)
5   libsystem_pthread.dylib         0x3eceee4d0         _pthread_start

Thread 12 name: com.bugsnag.app-hang-detector
0   libsystem_kernel.dylib          0x3a7ba910c         semaphore_timedwait_trap
1   libdispatch.dylib               0x328c78914         _dispatch_sema4_timedwait
2   libdispatch.dylib               0x328c78f10         _dispatch_semaphore_wait_slow
3   SandGig                         0x202baf37c         -[RSCAppHangDetector detectAppHangs] (RSCAppHangDetector.m:133)
4   SandGig                         0x202baf2e8         DetectAppHangs (RSCAppHangDetector.m:216)
5   libsystem_pthread.dylib         0x3eceee4d0         _pthread_start

Thread 13 name: com.facebook.SocketRocket.NetworkThread
0   libsystem_kernel.dylib          0x3a7ba9178         mach_msg2_trap
1   libsystem_kernel.dylib          0x3a7ba8f0c         mach_msg2_internal
2   libsystem_kernel.dylib          0x3a7ba8e24         mach_msg_overwrite
3   libsystem_kernel.dylib          0x3a7ba8c64         mach_msg
4   CoreFoundation                  0x318cb1a98         __CFRunLoopServiceMachPort
5   CoreFoundation                  0x318caf990         __CFRunLoopRun
6   CoreFoundation                  0x318caf3f4         CFRunLoopRunSpecific
7   Foundation                      0x316bdc3e8         -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
8   SandGig                         0x202ea1b68         -[SRRunLoopThread main] (SRRunLoopThread.m:70)
9   Foundation                      0x316c5fd3c         __NSThread__start__
10  libsystem_pthread.dylib         0x3eceee4d0         _pthread_start

Thread 14 name: com.apple.CFSocket.private
0   libsystem_kernel.dylib          0x3a7bb5860         __select
1   CoreFoundation                  0x318d5b774         __CFSocketManager
2   libsystem_pthread.dylib         0x3eceee4d0         _pthread_start

Thread 15
0   libsystem_kernel.dylib          0x3a7bb16d0         __workq_kernreturn
1   libsystem_pthread.dylib         0x3eceed9ac         _pthread_wqthread

Thread 16
0   libsystem_kernel.dylib          0x3a7bb16d0         __workq_kernreturn
1   libsystem_pthread.dylib         0x3eceed9ac         _pthread_wqthread

Thread 17
0   libsystem_kernel.dylib          0x3a7bb16d0         __workq_kernreturn
1   libsystem_pthread.dylib         0x3eceed9ac         _pthread_wqthread

Thread 18
0   libsystem_pthread.dylib         0x3eceed9fc         start_wqthread

Thread 19
0   libsystem_kernel.dylib          0x3a7bb16d0         __workq_kernreturn
1   libsystem_pthread.dylib         0x3eceed9ac         _pthread_wqthread

Thread 20
0   libsystem_pthread.dylib         0x3eceed9fc         start_wqthread

Thread 21
0   libsystem_kernel.dylib          0x3a7bb16d0         __workq_kernreturn
1   libsystem_pthread.dylib         0x3eceed9ac         _pthread_wqthread

Thread 22
0   libsystem_kernel.dylib          0x3a7bb16d0         __workq_kernreturn
1   libsystem_pthread.dylib         0x3eceed9ac         _pthread_wqthread

Thread 23
0   libsystem_kernel.dylib          0x3a7bb16d0         __workq_kernreturn
1   libsystem_pthread.dylib         0x3eceed9ac         _pthread_wqthread

Thread 24
0   libsystem_kernel.dylib          0x3a7ba9b1c         __psynch_cvwait
1   libsystem_pthread.dylib         0x3eceecfd0         _pthread_cond_wait
2   JavaScriptCore                  0x345753164         scavenger_thread_main
3   libsystem_pthread.dylib         0x3eceee4d0         _pthread_start

Thread 25
0   libsystem_kernel.dylib          0x3a7bb16d0         __workq_kernreturn
1   libsystem_pthread.dylib         0x3eceed9ac         _pthread_wqthread

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x00000001091d2600   x1: 0x000000018b874ded   x2: 0x0000000109533c00   x3: 0x0000000000000003
    x4: 0x0000000000000001   x5: 0x0000000000000000   x6: 0x000000016dd0d498   x7: 0x0000000000000000
    x8: 0x0000000000000000   x9: 0x0000000000000026  x10: 0x00000001091d2600  x11: 0x00000001091d2600
   x12: 0x00000001091d2600  x13: 0x00000001091d25f0  x14: 0x0000000109533c00  x15: 0x0000000109533c00
   x16: 0x0000000109533c00  x17: 0x0000000109533c00  x18: 0x0000000000000000  x19: 0x00000001091d2600
   x20: 0x000000018b874ded  x21: 0x0000000109533c00  x22: 0x0f00007ffffffff8  x23: 0x0000000109533c20
   x24: 0x00000001e2260480  x25: 0x0000000281ffed30  x26: 0x0000000000000000  x27: 0x0000000000000001
   x28: 0x0000000280e39ad8   fp: 0x000000016dd0e410   lr: 0x015abc0189264cc4   sp: 0x000000016dd0e3b0
    pc: 0x00000001892698a4 cpsr: 0x0000000080001000
@focux
Copy link

focux commented Mar 30, 2024

I'm not sure if it's the same issue but I'm experiencing something very similiar, these are two different crash reports:

Versions:

"react-native-ios-context-menu": "^2.5.1",
"react-native-ios-utilities": "^4.4.4",
image image image

@nandorojo
Copy link
Collaborator Author

I wonder if this release helps:

https://github.com/dominicstop/react-native-ios-utilities/releases/tag/v4.4.6-0

Or maybe a fix is in progress. I'll test it once it's past pre-release

@nandorojo
Copy link
Collaborator Author

@focux your particular issue might be fixed by upgrading all your versions

@focux
Copy link

focux commented Apr 3, 2024

Awesome, I'll give it a try. Thanks for the heads up.

@fobos531
Copy link

@nandorojo Are you still experiencing this? If yes, have you found a way to remedy this in case the significant portion of the user base is affected?

@karam1ashqar
Copy link

this happens with me too, when the component unmounts

@pfcodes
Copy link

pfcodes commented May 1, 2024

+1

@danielgynn
Copy link

danielgynn commented Oct 14, 2024

Any update on this one? Affecting a relatively large amount of users on:

"react-native-ios-context-menu": "^2.5.1",
"react-native-ios-utilities": "^4.4.5",

@julian-gargicevich
Copy link

Same issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants