UICollectionViewData layoutAttributesForItemAtIndexPath HockeyApp Crash Report - ios

I am using HockeyApp for crash reporting and getting the following crash. I am unable to reproduce the crash. Can this be due to animating the scroll in the UICollectionView?
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0x66dbc2408
Crashed Thread: 0
Application Specific Information:
Selector name found in current argument registers: indexAtPosition:
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000198e8c0b0 objc_retain + 16
1 UIKit 0x00000001898bade0 -[UICollectionViewData layoutAttributesForItemAtIndexPath:] + 248
2 UIKit 0x0000000189acb1dc -[UICollectionView scrollToItemAtIndexPath:atScrollPosition:animated:] + 256
3 MyApp 0x000000010016c33c -[CalendarView scrollToDate:animated:] (CalendarView.m:183)
4 MyApp 0x00000001001607cc __56-[CalendarViewController _updateHighlightedDateRange]_block_invoke (CalendarViewController.m:577)
5 libdispatch.dylib 0x00000001996916e8 _dispatch_call_block_and_release + 20
6 libdispatch.dylib 0x00000001996916a8 _dispatch_client_callout + 12
7 libdispatch.dylib 0x0000000199696db0 _dispatch_main_queue_callback_4CF + 1840
8 CoreFoundation 0x00000001842781f8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
9 CoreFoundation 0x0000000184276060 __CFRunLoopRun + 1624
10 CoreFoundation 0x00000001841a4ca0 CFRunLoopRunSpecific + 380
11 GraphicsServices 0x000000018f3e0088 GSEventRunModal + 176
12 UIKit 0x00000001898bcffc UIApplicationMain + 200
13 MyApp 0x000000010015c2a4 main (main.m:12)
14 libdyld.dylib 0x00000001996c28b8 start + 0

Related

react-native app crashes on release mode - IOS with SIGABRT

App run on debug mode well and no error occur. But when i archive and run to below command;
npx react-native run-ios --configuration=Release
Archive is success but app crashes at LaunchScreen. Here is the Problem Report's backtrace.
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x10f9f7368 __exceptionPreprocess + 226
1 libobjc.A.dylib 0x10b148baf objc_exception_throw + 48
2 MyApp -> 0x100f4039c RCTFormatError + 0 (RCTAssert.m:167)
3 MyApp -> 0x100f59d6d __28-[RCTCxxBridge handleError:]_block_invoke + 651
4 libdispatch.dylib 0x10f0cb7fb _dispatch_call_block_and_release + 12
5 libdispatch.dylib 0x10f0cca3a _dispatch_client_callout + 8
6 libdispatch.dylib 0x10f0dc32c _dispatch_main_queue_drain + 1338
7 libdispatch.dylib 0x10f0dbde4 _dispatch_main_queue_callback_4CF + 31
8 CoreFoundation 0x10f9569f7 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
9 CoreFoundation 0x10f9513c6 __CFRunLoopRun + 2482
10 CoreFoundation 0x10f950637 CFRunLoopRunSpecific + 560
11 GraphicsServices 0x115fcd28a GSEventRunModal + 139
12 UIKitCore 0x11e4b1425 -[UIApplication _run] + 994
13 UIKitCore 0x11e4b6301 UIApplicationMain + 123
14 Akıllı Karavan 0x100e51ac0 main + 72 (main.m:8)
15 dyld_sim 0x10a9c32bf start_sim + 10
16 dyld 0x20240852e start + 462
17 dyld 0x202403000 ???
Any solution ?

Expo standalone iOS build crashes on splash screen on Simulator and Testflight

I developed a marketplace app using Expo. It works fine on Expo Go both on Android and iOS, as well as a standalone app for Android. The problem is when I build a .tar for iOS simulator or when I upload to Testflight to test it. Then it crashes right after showing the splash screen. I use a managed workflow, and I think I followed all the instructions.
Here's the crash log:
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
*** Terminating app due to uncaught exception 'ExpoFatalError', reason: 'Expo encountered a fatal error: Unhandled JS Exception: Invariant Violation: Native module cannot be null.'
terminating with uncaught exception of type NSException
abort() called
CoreSimulator 757.5 - Device: iPhone 12 (0D59D0C0-2D3B-40ED-A8E2-DA0B1417C29C) - Runtime: iOS 14.5 (18E182) - DeviceType: iPhone 12
Application Specific Backtrace 1:
0 CoreFoundation 0x00007fff20422fba __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff20193ff5 objc_exception_throw + 48
2 ComGrabbiGrabbiapp 0x000000010b375821 -[EXAppViewController maybeShowError:] + 506
3 ComGrabbiGrabbiapp 0x000000010b396dce handleFatalReactError_block_invoke_2 + 574
4 libdispatch.dylib 0x00007fff201078df _dispatch_client_callout + 8
5 libdispatch.dylib 0x00007fff201156ca _dispatch_async_and_wait_invoke + 109
6 libdispatch.dylib 0x00007fff201078df _dispatch_client_callout + 8
7 libdispatch.dylib 0x00007fff20114a27 _dispatch_main_queue_callback_4CF + 1045
8 CoreFoundation 0x00007fff203908f8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
9 CoreFoundation 0x00007fff2038b169 __CFRunLoopRun + 2781
10 CoreFoundation 0x00007fff2038a1a7 CFRunLoopRunSpecific + 567
11 GraphicsServices 0x00007fff2b874d85 GSEventRunModal + 139
12 UIKitCore 0x00007fff246c14df -[UIApplication _run] + 912
13 UIKitCore 0x00007fff246c639c UIApplicationMain + 101
14 ComGrabbiGrabbiapp 0x000000010b1461d0 main + 80
15 libdyld.dylib 0x00007fff2025abbd start + 1
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff60309946 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff60343615 pthread_kill + 263
2 libsystem_c.dylib 0x00007fff200fbd4f __abort + 139
3 libsystem_c.dylib 0x00007fff200fbcc4 abort + 135
4 libc++abi.dylib 0x00007fff20254692 abort_message + 241
5 libc++abi.dylib 0x00007fff20245dfd demangling_terminate_handler() + 266
6 libobjc.A.dylib 0x00007fff20179ace _objc_terminate() + 96
7 libc++abi.dylib 0x00007fff20253aa7 std::__terminate(void (*)()) + 8
8 libc++abi.dylib 0x00007fff20253a49 std::terminate() + 41
9 libdispatch.dylib 0x00007fff201078f3 _dispatch_client_callout + 28
10 libdispatch.dylib 0x00007fff201156ca _dispatch_async_and_wait_invoke + 109
11 libdispatch.dylib 0x00007fff201078df _dispatch_client_callout + 8
12 libdispatch.dylib 0x00007fff20114a27 _dispatch_main_queue_callback_4CF + 1045
13 com.apple.CoreFoundation 0x00007fff203908f8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
14 com.apple.CoreFoundation 0x00007fff2038b169 __CFRunLoopRun + 2781
15 com.apple.CoreFoundation 0x00007fff2038a1a7 CFRunLoopRunSpecific + 567
16 com.apple.GraphicsServices 0x00007fff2b874d85 GSEventRunModal + 139
17 com.apple.UIKitCore 0x00007fff246c14df -[UIApplication _run] + 912
18 com.apple.UIKitCore 0x00007fff246c639c UIApplicationMain + 101
19 com.grabbi.grabbiapp 0x000000010b1461d0 main + 80
20 libdyld.dylib 0x00007fff2025abbd start + 1
Okay after a weekend of debugging I fixed it. I had my main app component (in Expo) wrapped in a Stripe Provider component. Since I wasn't using Stripe but Paypal for checkout, I deleted the Stripe wrapper and now it works.
if(fontsLoaded){
return (
<StripeProvider
publishableKey="xxxxxxxxxxxxxxxxx"
urlScheme="your-url-scheme" // required for 3D Secure and bank redirects
merchantIdentifier="merchant.com.{{YOUR_APP_NAME}}" // required for Apple Pay
>
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<RootRouter />
</PersistGate>
</Provider>
</StripeProvider>
);

EAAccessoryManager notifyObserversThatAccessoryDisconnectedWithUserInfo crashes iOS 11.1.2

App is crashing while a bluetooth device is disconnected.
I've seen few related threads and they say
"A notification delegate was not reset to nil. A fix has been applied at version 10.3.79."
Following is crash log:
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
0 libobjc.A.dylib 0x000000018544c430 objc_msgSend + 16
1 ExternalAccessory 0x000000019c07c4dc -[EAAccessoryManager _notifyObserversThatAccessoryDisconnectedWithUserInfo:] + 104 (EAAccessoryManager.m:909)
2 ExternalAccessory 0x000000019c07eddc -[EAAccessoryManager _externalAccessoryDisconnected:] + 928 (EAAccessoryManager.m:1537)
3 CoreAccessories 0x00000001a7892ccc __54-[ACCExternalAccessoryProvider ExternalAccessoryLeft:]_block_invoke + 316 (ACCExternalAccessoryProvider.m:453)
4 libdispatch.dylib 0x0000000185b6d088 _dispatch_call_block_and_release + 24 (init.c:994)
5 libdispatch.dylib 0x0000000185b6d048 _dispatch_client_callout + 16 (object.m:502)
6 libdispatch.dylib 0x0000000185b79b74 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1016 (inline_internal.h:2500)
7 CoreFoundation 0x0000000186191eb0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 (CFRunLoop.c:1815)
8 CoreFoundation 0x000000018618fa8c __CFRunLoopRun + 2012 (CFRunLoop.c:3111)
9 CoreFoundation 0x00000001860affb8 CFRunLoopRunSpecific + 436 (CFRunLoop.c:3245)
10 GraphicsServices 0x0000000187f47f84 GSEventRunModal + 100 (GSEvent.c:2245)
11 UIKit 0x000000018f6842e8 UIApplicationMain + 208 (UIApplication.m:3949)
12 MYAPP 0x0000000100ab8d58 main + 172 (main.m:16)
13 libdyld.dylib 0x0000000185bd256c start + 4

Debug/reproduce EXC_BAD_ACCESS crash in CA::release_objects

I use Crashlytics to track crashes and I am seeing some crashes with the stack trace below:
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0xf8560b1c
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x37a20b66 objc_msgSend + 5
1 CoreFoundation 0x2d5f8e8d CFRelease + 560
2 QuartzCore 0x2fad2965 CA::release_objects(X::List<void const*>*) + 16
3 QuartzCore 0x2fad7dcf -[CAAnimation dealloc] + 54
4 libobjc.A.dylib 0x37a30b0b objc_object::sidetable_release(bool) + 174
5 CoreFoundation 0x2d5f8e8d CFRelease + 560
6 QuartzCore 0x2fada419 CA::Layer::run_animation_callbacks(void*) + 240
7 libdispatch.dylib 0x37f0a0af _dispatch_client_callout + 22
8 libdispatch.dylib 0x37f0c9a9 _dispatch_main_queue_callback_4CF + 268
9 CoreFoundation 0x2d6935b1 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
10 CoreFoundation 0x2d691e7d __CFRunLoopRun + 1308
11 CoreFoundation 0x2d5fc471 CFRunLoopRunSpecific + 524
12 CoreFoundation 0x2d5fc253 CFRunLoopRunInMode + 106
13 GraphicsServices 0x323362eb GSEventRunModal + 138
14 UIKit 0x2feb1845 UIApplicationMain + 1136
It looks like CFRelease is being called on some object twice. The problem is I have no idea which animation is causing the crash. The logs aren't very helpful as the crash happens in different places. How do I go about debugging/reproducing this crash or at the very least logging something so that I know what object is being released twice.

Why class method appears twice in the call stack of the crash log, iOS

I got a crash log from an app that is already in App Store. The weird part of the crash log is that a class method appears twice in the backtrace of the crashed thread, as if the class method recursively called itself. I said weird because that class method is quite simple and it doesn't make a recursive call inside method body. Here is the part from the crash log:
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3b788350 __pthread_kill + 8
1 libsystem_c.dylib 0x3b6fefb2 pthread_kill + 54
2 libsystem_c.dylib 0x3b73b366 abort + 90
3 btg2 0x0172a358 ___lldb_unnamed_function128645$$btg2 + 280
4 btg2 0x0171af34 ___lldb_unnamed_function128478$$btg2 + 256
5 libsystem_c.dylib 0x3b708d38 _sigtramp + 40
6 btg2 0x0129fd7c +[PHAPIRequest expectedSignatureValueForResponse:nonce:secret:] (PHAPIRequest.m:129)
7 btg2 0x0129fd7c +[PHAPIRequest expectedSignatureValueForResponse:nonce:secret:] (PHAPIRequest.m:129)
8 btg2 0x012a1ee4 -[PHAPIRequest connectionDidFinishLoadingWithRequest:response:data:context:] (PHAPIRequest.m:501)
9 btg2 0x012aee04 -[PHConnectionManager connectionDidFinishLoading:] (PHConnectionManager.m:234)
10 Foundation 0x33d46912 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke_0 + 14
11 Foundation 0x33c86764 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 196
12 Foundation 0x33c86680 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 56
13 CFNetwork 0x330e764c ___delegate_didFinishLoading_block_invoke_0 + 24
14 CFNetwork 0x330e6d30 ___withDelegateAsync_block_invoke_0 + 52
15 CFNetwork 0x3310f010 ___performAsync_block_invoke_068 + 16
16 CoreFoundation 0x33350aca CFArrayApplyFunction + 174
17 CFNetwork 0x3310f46e RunloopBlockContext::perform() + 70
18 CFNetwork 0x3307345e MultiplexerSource::perform() + 186
19 CoreFoundation 0x333df8f4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
20 CoreFoundation 0x333df158 __CFRunLoopDoSources0 + 208
21 CoreFoundation 0x333ddf2a __CFRunLoopRun + 642
22 CoreFoundation 0x33351238 CFRunLoopRunSpecific + 352
23 CoreFoundation 0x333510c4 CFRunLoopRunInMode + 100
24 GraphicsServices 0x36f0c336 GSEventRunModal + 70
25 UIKit 0x3526d2b4 UIApplicationMain + 1116
26 btg2 0x0007da00 main (main.mm:21)
27 btg2 0x0007a504 ___lldb_unnamed_function1$$btg2 + 36
Does any one have a reasoning why +[PHAPIRequest expectedSignatureValueForResponse:nonce:secret:] appears twice in the backtrace or may be knows the reason of the crash? Appreciate your help!

Resources