pendo-io / pendo-mobile-sdk

Pendo captures product usage data, gathers user feedback, and lets you communicate in-app to onboard, educate, and guide users to value
https://www.pendo.io
Other
57 stars 2 forks source link

💥 Crash on `__53+[PNDHookFunctions ret_BOOL_args_SelIdIdId_WithHook:]_block_invoke` #153

Closed msrutek-paylocity closed 1 month ago

msrutek-paylocity commented 1 month ago

Platform + Version

iOS 17.5.1, iPhone XR

SDK Version

3.2.2

Framework

Native, SwiftUI

Describe the bug

Crash of the app.

To Reproduce

Yet unknown.

Expected behavior

No crash.

Stack Trace

Fatal Exception: NSInternalInconsistencyException
Invalid parameter not satisfying: pos 

0  CoreFoundation                 0x83f20 __exceptionPreprocess
1  libobjc.A.dylib                0x16018 objc_exception_throw
2  Foundation                     0x6de868 _userInfoForFileAndLine
3  UIKitCore                      0x1163180 -[_UITextKitTextPosition compare:]
4  UIKitCore                      0xd906c -[UITextInputController comparePosition:toPosition:]
5  UIKitCore                      0x116ffac -[UITextView comparePosition:toPosition:]
6  UIKitCore                      0xa78fa8 -[_UITextChoiceAccelerationAssistant rangeForTextChoicesAtPosition:]
7  UIKitCore                      0x10eed0c -[UITextSelectionInteraction tappedToPositionCursorWithGesture:atPoint:granularity:completionHandler:]
8  UIKitCore                      0x10ee800 -[UITextSelectionInteraction _checkForRepeatedTap:gestureLocationOut:]
9  UIKitCore                      0x10ef30c -[UITextSelectionInteraction _handleMultiTapGesture:]
10 UIKitCore                      0x3fb31c -[UIApplication sendAction:to:from:forEvent:]
11 Pendo                          0x627d8 __53+[PNDHookFunctions ret_BOOL_args_SelIdIdId_WithHook:]_block_invoke
12 UIKitCore                      0xa53ee4 -[UITextMultiTapRecognizer onStateUpdate:]
13 UIKitCore                      0x42ae7c -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:]
14 UIKitCore                      0x42acec _UIGestureRecognizerSendTargetActions
15 UIKitCore                      0x42aaac _UIGestureRecognizerSendActions
16 UIKitCore                      0xbc9d0 -[UIGestureRecognizer _updateGestureForActiveEvents]
17 UIKitCore                      0x8a11c _UIGestureEnvironmentUpdate
18 UIKitCore                      0x185bc0 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:]
19 UIKitCore                      0x33c680 -[UIGestureEnvironment _updateForEvent:window:]
20 UIKitCore                      0x33b944 -[UIWindow sendEvent:]
21 UIKitCore                      0x1bc9e0 -[UIApplication sendEvent:]
22 UIKit                          0x7ee8 -[UIApplicationAccessibility sendEvent:]
23 UIKitCore                      0x1be1d4 __dispatchPreprocessedEventFromEventQueue
24 UIKitCore                      0x1c6ecc __processEventQueue
25 UIKitCore                      0x1c5740 __eventFetcherSourceCallback
26 CoreFoundation                 0x56834 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
27 CoreFoundation                 0x567c8 __CFRunLoopDoSource0
28 CoreFoundation                 0x54298 __CFRunLoopDoSources0
29 CoreFoundation                 0x53484 __CFRunLoopRun
30 CoreFoundation                 0x52cd8 CFRunLoopRunSpecific
31 GraphicsServices               0x11a8 GSEventRunModal
32 UIKitCore                      0x40a90c -[UIApplication _run]
33 UIKitCore                      0x4be9d0 UIApplicationMain
34 REDACTED                       0x986c main + 9 (AppDelegate.swift:9)
35 ???                            0x1c3d85e4c (Missing)   

Full Crash Log

Full crash log >>> ``` # Date: Tue Jul 16 2024 05:45:18 GMT+0200 (Central European Summer Time) Fatal Exception: NSInternalInconsistencyException 0 CoreFoundation 0x83f20 __exceptionPreprocess 1 libobjc.A.dylib 0x16018 objc_exception_throw 2 Foundation 0x6de868 _userInfoForFileAndLine 3 UIKitCore 0x1163180 -[_UITextKitTextPosition compare:] 4 UIKitCore 0xd906c -[UITextInputController comparePosition:toPosition:] 5 UIKitCore 0x116ffac -[UITextView comparePosition:toPosition:] 6 UIKitCore 0xa78fa8 -[_UITextChoiceAccelerationAssistant rangeForTextChoicesAtPosition:] 7 UIKitCore 0x10eed0c -[UITextSelectionInteraction tappedToPositionCursorWithGesture:atPoint:granularity:completionHandler:] 8 UIKitCore 0x10ee800 -[UITextSelectionInteraction _checkForRepeatedTap:gestureLocationOut:] 9 UIKitCore 0x10ef30c -[UITextSelectionInteraction _handleMultiTapGesture:] 10 UIKitCore 0x3fb31c -[UIApplication sendAction:to:from:forEvent:] 11 Pendo 0x627d8 __53+[PNDHookFunctions ret_BOOL_args_SelIdIdId_WithHook:]_block_invoke 12 UIKitCore 0xa53ee4 -[UITextMultiTapRecognizer onStateUpdate:] 13 UIKitCore 0x42ae7c -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] 14 UIKitCore 0x42acec _UIGestureRecognizerSendTargetActions 15 UIKitCore 0x42aaac _UIGestureRecognizerSendActions 16 UIKitCore 0xbc9d0 -[UIGestureRecognizer _updateGestureForActiveEvents] 17 UIKitCore 0x8a11c _UIGestureEnvironmentUpdate 18 UIKitCore 0x185bc0 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] 19 UIKitCore 0x33c680 -[UIGestureEnvironment _updateForEvent:window:] 20 UIKitCore 0x33b944 -[UIWindow sendEvent:] 21 UIKitCore 0x1bc9e0 -[UIApplication sendEvent:] 22 UIKit 0x7ee8 -[UIApplicationAccessibility sendEvent:] 23 UIKitCore 0x1be1d4 __dispatchPreprocessedEventFromEventQueue 24 UIKitCore 0x1c6ecc __processEventQueue 25 UIKitCore 0x1c5740 __eventFetcherSourceCallback 26 CoreFoundation 0x56834 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ 27 CoreFoundation 0x567c8 __CFRunLoopDoSource0 28 CoreFoundation 0x54298 __CFRunLoopDoSources0 29 CoreFoundation 0x53484 __CFRunLoopRun 30 CoreFoundation 0x52cd8 CFRunLoopRunSpecific 31 GraphicsServices 0x11a8 GSEventRunModal 32 UIKitCore 0x40a90c -[UIApplication _run] 33 UIKitCore 0x4be9d0 UIApplicationMain 34 REDACTED 0x986c main + 9 (AppDelegate.swift:9) 35 ??? 0x1c3d85e4c (Missing) Crashed: com.google.firebase.crashlytics.ios.exception 0 REDACTED 0x756b8 FIRCLSProcessRecordAllThreads + 392 (FIRCLSProcess.c:392) 1 REDACTED 0x75a98 FIRCLSProcessRecordAllThreads + 423 (FIRCLSProcess.c:423) 2 REDACTED 0x83bcc FIRCLSHandler + 34 (FIRCLSHandler.m:34) 3 REDACTED 0x839d0 __FIRCLSExceptionRecord_block_invoke + 240 (FIRCLSException.mm:240) 4 libdispatch.dylib 0x3dd4 _dispatch_client_callout + 20 5 libdispatch.dylib 0x132c4 _dispatch_lane_barrier_sync_invoke_and_complete + 56 6 REDACTED 0x8294c FIRCLSExceptionRecord + 242 (FIRCLSException.mm:242) 7 REDACTED 0x83494 FIRCLSExceptionRecordNSException + 126 (FIRCLSException.mm:126) 8 REDACTED 0x82554 FIRCLSTerminateHandler() + 407 (FIRCLSException.mm:407) 9 libc++abi.dylib 0x14068 std::__terminate(void (*)()) + 16 10 libc++abi.dylib 0x1760c __cxa_increment_exception_refcount + 202 11 libobjc.A.dylib 0x2dea4 objc_exception_rethrow + 44 12 CoreFoundation 0x52d88 CFRunLoopRunSpecific + 784 13 GraphicsServices 0x11a8 GSEventRunModal + 164 14 UIKitCore 0x40a90c -[UIApplication _run] + 888 15 UIKitCore 0x4be9d0 UIApplicationMain + 340 16 REDACTED 0x986c main + 9 (AppDelegate.swift:9) 17 ??? 0x1c3d85e4c (Missing) com.apple.uikit.eventfetch-thread 0 libsystem_kernel.dylib 0x1808 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x5008 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x4f20 mach_msg_overwrite + 436 3 libsystem_kernel.dylib 0x4d60 mach_msg + 24 4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x53600 __CFRunLoopRun + 1208 6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608 7 Foundation 0xc7e4c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 8 Foundation 0xc7c9c -[NSRunLoop(NSRunLoop) runUntilDate:] + 64 9 UIKitCore 0x41e640 -[UIEventFetcher threadMain] + 420 10 Foundation 0xde718 __NSThread__start__ + 732 11 libsystem_pthread.dylib 0x606c _pthread_start + 136 12 libsystem_pthread.dylib 0x10d8 thread_start + 8 com.google.firebase.crashlytics.MachExceptionServer 0 libsystem_kernel.dylib 0x1808 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x5008 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x4f20 mach_msg_overwrite + 436 3 libsystem_kernel.dylib 0x4d60 mach_msg + 24 4 REDACTED 0x84188 FIRCLSMachExceptionServer + 194 (FIRCLSMachException.c:194) 5 libsystem_pthread.dylib 0x606c _pthread_start + 136 6 libsystem_pthread.dylib 0x10d8 thread_start + 8 com.apple.CFSocket.private 0 libsystem_kernel.dylib 0x9474 select$DARWIN_EXTSN + 8 1 libsystem_kernel.dylib 0x9474 __select + 8 2 CoreFoundation 0xbeb7c __CFSocketManager + 640 3 libsystem_pthread.dylib 0x606c _pthread_start + 136 4 libsystem_pthread.dylib 0x10d8 thread_start + 8 com.apple.NSURLConnectionLoader 0 libsystem_kernel.dylib 0x1808 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x5008 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x4f20 mach_msg_overwrite + 436 3 libsystem_kernel.dylib 0x4d60 mach_msg + 24 4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160 5 CoreFoundation 0x53600 __CFRunLoopRun + 1208 6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608 7 CFNetwork 0xfdc90 _CFHostIsDomainTopLevel + 108176 8 Foundation 0xde718 __NSThread__start__ + 732 9 libsystem_pthread.dylib 0x606c _pthread_start + 136 10 libsystem_pthread.dylib 0x10d8 thread_start + 8 Thread 0 libsystem_kernel.dylib 0x1590 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x4980 _pthread_wqthread + 364 2 libsystem_pthread.dylib 0x10cc start_wqthread + 8 Thread 0 libsystem_kernel.dylib 0x1590 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x4980 _pthread_wqthread + 364 2 libsystem_pthread.dylib 0x10cc start_wqthread + 8 Thread 0 libsystem_kernel.dylib 0x1590 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x4980 _pthread_wqthread + 364 2 libsystem_pthread.dylib 0x10cc start_wqthread + 8 Thread 0 libsystem_kernel.dylib 0x1590 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x4980 _pthread_wqthread + 364 2 libsystem_pthread.dylib 0x10cc start_wqthread + 8 ```
orendayan commented 1 month ago

@msrutek-paylocity Can you tell us how many of these occur? Can you share the Apple log? Also, we've released 3.3.1. Please upgrade and let us know if it solved the issues.

MikePendo commented 1 month ago

@msrutek-paylocity In that crash I dont think Pendo is somehow related, although u see Pendo in the stack trace as: PNDHookFunctions ret_BOOL_args_SelIdIdId_WithHook: it doesnt necessary means we are responsible for the crash or triggering it. This line is only indicating that we are hooking the call and passing it further, with the same arguments and signature. I have briefly looked at similar stack traces of the crashes and I noticed exactly same crash in other scenarios: https://forums.developer.apple.com/forums/thread/692843 https://stackoverflow.com/questions/69568511/ios15-uitextview-after-dragging-the-view-it-causes-a-crash-invalid-parameter-n It seems like related to copy paste of/to textFields/textViews. @orendayan From our side lets try to use their app and copy paste some text and see if that somehow reproducible IF NOT I suggest to close that BUG as I dont think its related to Pendo

msrutek-paylocity commented 1 month ago

@MikePendo

From the link, it seems like the issue was related to iOS 15 specifically. However, this crash occurred on the latest iOS at that time (iOS 17.5.1) 🤔

@orendayan Did you have any luck trying to reproduce? We haven't had any success yet. If not, we can probably close this issue and reopen if we find out more.

shlomipendo commented 1 month ago

Hey guys, As we couldn't reproduce it, I'm closing this issue for now. Please reopen in case you have more information that could help us here.