Xamarin iOS random crashes with SIGBUS - ios

I have strange crashes on devices in my Xamarin App. It happens at any time of app, without any connection to particular actions inside the app. What can I do to find a reason for that crash?
The crash log was caught through HockeyApp.
OS Version: iPhone OS 11.0.1 (15A402)
Report Version: 104
Exception Type: SIGBUS
Exception Codes: BUS_ADRALN at 0x1
Crashed Thread: 0
Application Specific Information:
Selector name found in current argument registers: prev_signal_handlers
Thread 0 Crashed:
0 ??? 0x0000000000000001 0x0 + 0
1 libsystem_platform.dylib 0x0000000180fafb60 _sigtramp + 48
2 libsystem_kernel.dylib 0x0000000180e80a3c mach_msg + 68
3 CoreFoundation 0x000000018132fce4 __CFRunLoopServiceMachPort + 192
4 CoreFoundation 0x000000018132d8b0 __CFRunLoopRun + 1420
5 CoreFoundation 0x000000018124e2d8 CFRunLoopRunSpecific + 432
6 GraphicsServices 0x00000001830dff84 GSEventRunModal + 96
7 UIKit 0x000000018a7fb880 UIApplicationMain + 204
8 FaxiOS 0x00000001006c76f4 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr (<unknown>:1)
9 FaxiOS 0x00000001006742ec UIKit_UIApplication_Main_string___intptr_intptr (UIApplication.cs:79)
10 FaxiOS 0x00000001006742ac UIKit_UIApplication_Main_string___string_string (UIApplication.cs:63)
11 FaxiOS 0x00000001002c3544 Fax_iOS_Application_Main_string__ (<unknown>:1)
12 FaxiOS 0x00000001005a9094 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 240
13 FaxiOS 0x00000001012f3b38 mono_jit_runtime_invoke (mini-runtime.c:2509)
14 FaxiOS 0x000000010136e620 do_runtime_invoke (object.c:2860)
15 FaxiOS 0x0000000101371844 do_exec_main_checked (object.c:3018)
16 FaxiOS 0x00000001012d7770 mono_jit_exec (driver.g.c:1037)
17 FaxiOS 0x0000000101424f48 xamarin_main (monotouch-main.m:480)
18 FaxiOS 0x00000001011a4108 main (main.m:179)
19 libdyld.dylib 0x0000000180d7256c start + 0

Related

Xamarin.Forms iOS application crash on release after SplashScreen

I have a very bad issue right now:
Behavior:
Application work when debug, but in release exit when app start.
The debugg information is not clear for the reason the application fail only in release mode.
Visual Studio 2019
Xamarin Forms 4.8.0.1821
ZxIng.Net.Mobile 2.4.1
ZxIng.Net.Mobile.Forms 2.4.1
Newtonsoft.Json 12.0.3
Xamarin.Essentials 1.6.1
SDK 14.4
Simulator log file:
Process: myapp-ui.iOS [19566]
Path: /Users/USER/Library/Developer/CoreSimulator/Devices/2C19C42D-564E-42CB-B805-C9C49BB1E8FD/data/Containers/Bundle/Application/1F644647-27DB-48EF-96D6-75A169AE4E9D/myapp-ui.iOS.app/myapp-ui.iOS
Identifier: myapp-ui.iOS
Version: 2.0.3 (1610484945)
Code Type: X86-64 (Native)
Parent Process: launchd_sim [17405]
Responsible: SimulatorTrampoline [1267]
User ID: 501
Date/Time: 2021-02-16 12:29:44.629 -0600
OS Version: macOS 11.2.1 (20D74)
Report Version: 12
Anonymous UUID: E13D7872-1C1C-3306-5557-E45B4D68317D
Time Awake Since Boot: 350000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 tid_307 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
abort() called
CoreSimulator 732.18.6 - Device: iPhone 12 Pro (2C19C42D-564E-42CB-B805-C9C49BB1E8FD) - Runtime: iOS 14.4 (18D46) - DeviceType: iPhone 12 Pro
Thread 0 Crashed:: tid_307 Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff61131462 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff6116a610 pthread_kill + 263
2 libsystem_c.dylib 0x00007fff200fac2e __abort + 139
3 libsystem_c.dylib 0x00007fff200faba3 abort + 135
4 io.myapp.myapp-easyapp 0x00000001045caa6f xamarin_unhandled_exception_handler + 31 (runtime.m:1151)
5 io.myapp.myapp-easyapp 0x000000010445f415 mono_invoke_unhandled_exception_hook + 133 (exception.c:1265)
6 io.myapp.myapp-easyapp 0x000000010439ce2a mono_handle_exception_internal + 6986 (mini-exceptions.c:2782)
7 io.myapp.myapp-easyapp 0x000000010439b2d9 mono_handle_exception + 25 (mini-exceptions.c:3107)
8 io.myapp.myapp-easyapp 0x000000010431b969 mono_amd64_throw_exception + 169 (exceptions-amd64.c:409)
9 ??? 0x0000000104f6a5b0 0 + 4378240432
10 io.myapp.myapp-easyapp 0x00000001045ca7ed xamarin_process_managed_exception + 301 (runtime.m:2356)
11 io.myapp.myapp-easyapp 0x00000001045d1482 xamarin_invoke_trampoline + 1250 (trampolines-invoke.m:686)
12 io.myapp.myapp-easyapp 0x00000001045d3642 xamarin_arch_trampoline + 82 (trampolines-x86_64.m:491)
13 io.myapp.myapp-easyapp 0x00000001045d400a xamarin_x86_64_common_trampoline + 118 (trampolines-x86_64-asm.s:51)
14 com.apple.Foundation 0x00007fff208592ba __NSThreadPerformPerform + 204
15 com.apple.CoreFoundation 0x00007fff2039038a __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
16 com.apple.CoreFoundation 0x00007fff20390282 __CFRunLoopDoSource0 + 180
17 com.apple.CoreFoundation 0x00007fff2038f7c6 __CFRunLoopDoSources0 + 346
18 com.apple.CoreFoundation 0x00007fff20389f2f __CFRunLoopRun + 878
19 com.apple.CoreFoundation 0x00007fff203896d6 CFRunLoopRunSpecific + 567
20 com.apple.GraphicsServices 0x00007fff2c257db3 GSEventRunModal + 139
21 com.apple.UIKitCore 0x00007fff24696cf7 -[UIApplication _run] + 912
22 com.apple.UIKitCore 0x00007fff2469bba8 UIApplicationMain + 101
23 ??? 0x00000001065cb0a4 0 + 4401705124
24 ??? 0x00000001065caf13 0 + 4401704723
25 ??? 0x00000001065c7313 0 + 4401689363
26 io.myapp.myapp-easyapp 0x00000001043b36d1 mono_jit_runtime_invoke + 1569 (mini-runtime.c:3191)
27 io.myapp.myapp-easyapp 0x00000001044d9c08 do_runtime_invoke + 54 (object.c:3052) [inlined]
28 io.myapp.myapp-easyapp 0x00000001044d9c08 mono_runtime_invoke_checked + 136 (object.c:3220)
29 io.myapp.myapp-easyapp 0x00000001044dff75 do_exec_main_checked + 60 [inlined]
30 io.myapp.myapp-easyapp 0x00000001044dff75 mono_runtime_exec_main_checked + 117 (object.c:5284)
31 io.myapp.myapp-easyapp 0x00000001043124ec mono_jit_exec_internal + 14 (driver.c:1383) [inlined]
32 io.myapp.myapp-easyapp 0x00000001043124ec mono_jit_exec + 364 (driver.c:1328)
33 io.myapp.myapp-easyapp 0x00000001045d3196 xamarin_main + 1686 (monotouch-main.m:493)
34 io.myapp.myapp-easyapp 0x00000001042cc857 main + 55 (main.m:55)
35 libdyld.dylib 0x00007fff2025a3e9 start + 1
Fortunately the problem is Entitlement.plist, for some reason when use SecureStorage from Xamarin.Essentials, the application crash in release Testflight on shop, so I remove SecureStorage and problem solved.
Thanks all for all the answers.

Alamofire 5.2.2 TestFlight watchOS build crashes on Apple Watch Series 3 devices (32-bit) (Bitcode related?)

I have a WatchOS Application on TestFlight that is crashing on startup on Apple Watch Series 3 devices (32-bit). It works flawlessly on Simulators (Xcode 11.7) and Apple Watch Series 4.
I am using Alamofire 5.2.2 with Swift Package Manager. Latest Xcode (version 11.7). The device is Apple Watch Series 3 devices (32-bit) running latest final watchOS (version 6.2.8). Can you help me or give some direction on what is happening here?
I am calling a REST service that returns a JSON error file (response) and HTTP status code 401 (Unauthorized) if no gateway access token is given.
As I said this works in simulator and Apple Watch Series 4 device. I suspect of Bitcode, as in the past versions I had an iOS companion app and disabled bitcode generation, but now we only have the watch app and I cannot disable Bitcode generation.
The crash is somewhat like this:
Hardware Model: Watch3,4
Process: Watch App Extension [616]
Version: 132 (1.0)
AppVariant: 1:Watch3,4:6
Beta: YES
Code Type: ARM (Native)
Role: Foreground
Parent Process: launchd [1]
Date/Time: 2020-09-02 15:52:50.8659 -0300
Launch Time: 2020-09-02 15:52:48.0000 -0300
OS Version: Watch OS 6.2.8 (17U63)
Release Type: User
Baseband Version: n/a
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000060
VM Region Info: 0x60 is not in any region. Bytes before following region: 2310048
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 00234000-0038c000 [ 1376K] r-x/r-x SM=COW ...App Extension
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [616]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libswiftCore.dylib 0x6f7f4060 static _SetStorage.allocate+ 864352 (scale:age:seed:) + 16
1 libswiftCore.dylib 0x6f7f007e static _SetStorage.allocate+ 847998 (capacity:) + 126
2 Watch App Extension 0x002fcca4 specialized protocol witness for Collection.endIndex.getter in conformance [A] + 822436 (_$s30Watch_App_Extension12SimulaCambioMp:0)
3 Watch App Extension 0x002ebcfe static ResponseSerializer.defaultEmptyRequestMethods.getter + 752894 (contaFormatada.modify:102)
4 Watch App Extension 0x002801e2 AlamofireLoginService.loginSmartwatch(completion:) + 311778 (AlamofireLoginService.swift:49)
5 Watch App Extension 0x0027b568 specialized InterfaceController.doLogin(:semProgresso:) + 292200 (InterfaceController.swift:0)
6 Watch App Extension 0x00275ec6 InterfaceController.awake(withContext:) + 270022 (InterfaceController.swift:246)
7 Watch App Extension 0x00276888 #objc InterfaceController.awake(withContext:) + 272520 (<compiler-generated>:0
8 WatchKit 0x5f1959c2 _WKInterfaceControllerCreateClass + 444
9 WatchKit 0x5f1ceef4 __153-[SPRemoteInterface createViewController:className:properties:contextID:info:gestureDescriptions:clientIdentifier:interfaceControllerCreationCompletion:]_block_invoke_3 + 348
10 WatchKit 0x5f1cebbe __153-[SPRemoteInterface createViewController:className:properties:contextID:info:gestureDescriptions:clientIdentifier:interfaceControllerCreationCompletion:]_block_invoke_2 + 1070
11 WatchKit 0x5f194130 spUtils_dispatchAsyncToMainThread + 22
12 WatchKit 0x5f1ce75c __153-[SPRemoteInterface createViewController:className:properties:contextID:info:gestureDescriptions:clientIdentifier:interfaceControllerCreationCompletion:]_block_invoke + 156
13 WatchKit 0x5f1956c4 -[SPRemoteInterface performAfterApplicationDidFinishLaunching:] + 40
14 WatchKit 0x5f195410 -[SPRemoteInterface createViewController:className:properties:contextID:info:gestureDescriptions:clientIdentifier:interfaceControllerCreationCompletion:] + 282
15 WatchKit 0x5f23564a __178-[SPExtensionConnection interfaceViewController:createCompanionControllerClass:properties:initializationContextID:info:gestureDescriptions:interfaceControllerCreationCompletion:]_block_invoke + 294
16 WatchKit 0x5f192ba2 -[SPExtensionConnection performOnSendQueue:syncIfUnsuspended:] + 464
17 WatchKit 0x5f195298 -[SPExtensionConnection interfaceViewController:createCompanionControllerClass:properties:initializationContextID:info:gestureDescriptions:interfaceControllerCreationCompletion:] + 284
18 WatchKit 0x5f1950f4 -[SPApplicationDelegate viewController:createWKInterfaceControllerClass:properties:contextID:creationCompletion:] + 1588
19 WatchKit 0x5f183740 -[SPInterfaceViewController loadView] + 2004
20 UIKitCore 0x678d7aca -[UIViewController loadViewIfRequired] + 160
21 UIKitCore 0x678d80f0 -[UIViewController view] + 24
22 WatchKit 0x5f182536 -[SPInterfaceViewController applicationDidBecomeActive] + 126
23 WatchKit 0x5f182024 -[SPApplicationDelegate applicationDidBecomeActive:] + 670
24 UIKitCore 0x67d6dc9a -[UIApplication _stopDeactivatingForReason:] + 1150
25 UIKitCore 0x6772463e -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 414
26 UIKitCore 0x677248f0 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 632
27 UIKitCore 0x677242d6 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 266
28 UIKitCore 0x67727d88 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 162
29 UIKitCore 0x679f8238 +[BSAnimationSettings+ 4551224 (UIKit) tryAnimatingWithSettings:actions:completion:] + 746
30 UIKitCore 0x67ab8a1c _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 230
31 UIKitCore 0x67727ba8 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 116
32 UIKitCore 0x67ab892c _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 78
33 UIKitCore 0x67727a4c -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 296
34 UIKitCore 0x675d7bd2 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 578
35 UIKitCore 0x675d6b48 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 190
36 UIKitCore 0x675d795c -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 158
37 UIKitCore 0x67a1480e -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 406
38 PepperUICore 0x59fc7e62 -[PUICApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 642
39 CarouselUIServices 0x5d67f498 -[CUISWatchKitApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 220
40 FrontBoardServices 0x52fa4b5c -[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:] + 510
41 FrontBoardServices 0x52fc3396 __88-[FBSWorkspaceScenesClient sceneID:updateWithSettingsDiff:transitionContext:completion:]_block_invoke_2 + 104
42 FrontBoardServices 0x52fad00c -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 204
43 FrontBoardServices 0x52fc32f8 __88-[FBSWorkspaceScenesClient sceneID:updateWithSettingsDiff:transitionContext:completion:]_block_invoke + 154
44 libdispatch.dylib 0x4f882e1e _dispatch_client_callout + 6
45 libdispatch.dylib 0x4f88507a _dispatch_block_invoke_direct + 180
46 FrontBoardServices 0x52fe1748 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 22
47 FrontBoardServices 0x52fe152e -[FBSSerialQueue _queue_performNextIfPossible] + 346
48 FrontBoardServices 0x52fe1926 -[FBSSerialQueue _performNextFromRunLoopSource] + 24
49 CoreFoundation 0x4fd0696e __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
50 CoreFoundation 0x4fd068c4 __CFRunLoopDoSource0 + 84
51 CoreFoundation 0x4fd062d6 __CFRunLoopDoSources0 + 200
52 CoreFoundation 0x4fd02264 __CFRunLoopRun + 732
53 CoreFoundation 0x4fd01cec CFRunLoopRunSpecific + 326
54 GraphicsServices 0x52b6bd3c GSEventRunModal + 132
55 UIKitCore 0x67d7736e UIApplicationMain + 1720
56 libxpc.dylib 0x4faa3f0c _xpc_objc_main.cold.3 + 152
57 libxpc.dylib 0x4fa94e8c _xpc_objc_main + 184
58 libxpc.dylib 0x4fa96ae8 xpc_main + 110
59 Foundation 0x50617090 +[NSXPCListener serviceListener] + 0
60 PlugInKit 0x577f0392 0x577de000 + 74642
61 WatchKit 0x5f18faf0 WKExtensionMain + 62
62 libdyld.dylib 0x4f8bd7b2 start + 2
Thread 1:
0 libsystem_pthread.dylib 0x4fa5bf24 start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x4fa5bf24 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x4fa5bf24 start_wqthread + 0
Thread 4 name: com.apple.uikit.eventfetch-thread
Thread 4:
0 libsystem_kernel.dylib 0x4f9c76a8 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x4f9c6d7a mach_msg + 42
2 CoreFoundation 0x4fd06390 __CFRunLoopServiceMachPort + 106
3 CoreFoundation 0x4fd0238a __CFRunLoopRun + 1026
4 CoreFoundation 0x4fd01cec CFRunLoopRunSpecific + 326
5 Foundation 0x505e3a58 -[NSRunLoop+ 27224 (NSRunLoop) runMode:beforeDate:] + 180
6 Foundation 0x505e3974 -[NSRunLoop+ 26996 (NSRunLoop) runUntilDate:] + 76
7 UIKitCore 0x67df5f18 -[UIEventFetcher threadMain] + 140
8 Foundation 0x506e4308 __NSThread__start__ + 708
9 libsystem_pthread.dylib 0x4fa55236 _pthread_start + 130
10 libsystem_pthread.dylib 0x4fa5bf50 thread_start + 20
Thread 5:
0 libsystem_pthread.dylib 0x4fa5bf24 start_wqthread + 0
Thread 6:
0 libsystem_pthread.dylib 0x4fa5bf24 start_wqthread + 0
Thread 7:
0 libsystem_pthread.dylib 0x4fa5bf24 start_wqthread + 0
Thread 8 name: Dispatch queue: com.apple.NSXPCConnection.m-user.com.apple.nsurlsessiond.NSURLSessionProxyService
Thread 8:
0 libsystem_kernel.dylib 0x4f9e0bac kevent_id + 24
1 libdispatch.dylib 0x4f89aec8 _dispatch_kq_poll + 144
2 libdispatch.dylib 0x4f89a73a _dispatch_event_loop_poke + 650
3 libdispatch.dylib 0x4f889dee _dispatch_queue_wakeup + 354
4 CFNetwork 0x5044ee96 0x502f6000 + 1412758
5 CoreFoundation 0x4fd6f564 __invoking___ + 84
6 CoreFoundation 0x4fc83cf6 -[NSInvocation invoke] + 274
7 Foundation 0x507c00bc __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT__ + 22
8 Foundation 0x506256fc -[NSXPCConnection _decodeAndInvokeMessageWithEvent:flags:] + 1168
9 Foundation 0x507c01e0 message_handler + 196
10 libxpc.dylib 0x4fa8f730 _xpc_connection_call_event_handler + 36
11 libxpc.dylib 0x4fa8fa04 _xpc_connection_mach_event + 716
12 libdispatch.dylib 0x4f882e8c _dispatch_client_callout4 + 8
13 libdispatch.dylib 0x4f895cda _dispatch_mach_msg_invoke + 312
14 libdispatch.dylib 0x4f887ca2 _dispatch_lane_serial_drain + 308
15 libdispatch.dylib 0x4f8966a8 _dispatch_mach_invoke + 418
16 libdispatch.dylib 0x4f887ca2 _dispatch_lane_serial_drain + 308
17 libdispatch.dylib 0x4f888650 _dispatch_lane_invoke + 352
18 libdispatch.dylib 0x4f890334 _dispatch_workloop_worker_thread + 508
19 libsystem_pthread.dylib 0x4fa56cfc _pthread_wqthread + 204
20 libsystem_pthread.dylib 0x4fa5bf38 start_wqthread + 20
Thread 9:
0 libsystem_pthread.dylib 0x4fa5bf24 start_wqthread + 0
Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x00000001 r1: 0x00000000 r2: 0x00000001 r3: 0x00000000
r4: 0x00000001 r5: 0x00000001 r6: 0x000000e4 r7: 0x27bcd708
r8: 0x00000000 r9: 0x00000000 r10: 0x00000000 r11: 0x16db3fd0
ip: 0xfff00000 sp: 0x27bcd670 lr: 0x6f7f007f pc: 0x6f7f4060
cpsr: 0x60000030
Binary Images:
0x234000 - 0x3d3fff Watch App Extension armv7k <53780c55b55534578139202ab803cb6a> /var/containers/Bundle/Application/8D10BAB7-2EDF-4C98-8558-915BEBC0F499/Watch App.app/PlugIns/Watch App Extension.appex/Watch App Extension
0x504000 - 0x513fff libobjc-trampolines.dylib armv7k <6ad2db0ce5f230ef93a1624440cf513a> /usr/lib/libobjc-trampolines.dylib
0x590000 - 0x5ebfff dyld armv7k <3cbcec3e342e3bfab00f28eb029de430> /usr/lib/dyld
0x4f772000 - 0x4f775fff libSystem.B.dylib armv7k <bfe605fff46e3cfe8397e37435e59490> /usr/lib/libSystem.B.dylib
0x4f776000 - 0x4f7b9fff libc++.1.dylib armv7k <68da4f7256543e498f1e74e33a812556> /usr/lib/libc++.1.dylib
0x4f7ba000 - 0x4f7cdfff libc++abi.dylib armv7k <1d210edc8eba3fcfa230d00b69cb680e> /usr/lib/libc++abi.dylib
0x4f7ce000 - 0x4f7f9fff libobjc.A.dylib armv7k <0d9598610d3d3e1a8fe88321114d241b> /usr/lib/libobjc.A.dylib
0x4f7fa000 - 0x4f801fff libcache.dylib armv7k <08fbf121eaf13f1da5f709956c6e2c70> /usr/lib/system/libcache.dylib
...
...
...
This is a known issue
https://github.com/Alamofire/Alamofire/issues/3295
Beyond Apple releasing a fix for their bug -- the work arounds include:
Setting Dead Code stripping to No in the Watch Extension Target.
A different version of Alamofire.
Moving AF from SPM to CocoaPods.

Analyzing Xamarin.iOS Crash Report

Our Xamarin Forms app is crashing intermittently on one of our iOS test devices, and I'm having a very hard time finding anything useful in the crash report.
All of the tutorials and examples I have found seem to reference line numbers and methods/properties from the application itself but all I am seeing here are mono library calls.
I'm also unable to reproduce the issue locally. Can anyone offer any guidance, or suggest a good resource I could use to determine what this crash report is actually reporting:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000189423014 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001894eb450 pthread_kill + 112 (pthread.c:1366)
2 libsystem_c.dylib 0x0000000189397400 abort + 140 (abort.c:91)
3 ESPMobileiOS 0x00000001000476a8 mono_handle_native_sigsegv (mini-exceptions.c:2420)
4 libsystem_platform.dylib 0x00000001894e5348 _sigtramp + 52 (sigtramp.c:115)
5 libsystem_pthread.dylib 0x00000001894eb450 pthread_kill + 112 (pthread.c:1366)
6 libsystem_c.dylib 0x0000000189397400 abort + 140 (abort.c:91)
7 ESPMobileiOS 0x000000010012fa04 print_all_exceptions(MonoObject*) (runtime.m:997)
8 ESPMobileiOS 0x0000000100047de0 mono_invoke_unhandled_exception_hook (mini-exceptions.c:2873)
9 ESPMobileiOS 0x000000010004733c mono_handle_exception_internal (mini-exceptions.c:1798)
10 ESPMobileiOS 0x000000010004641c mono_handle_exception (mini-exceptions.c:2027)
11 ESPMobileiOS 0x000000010003ef18 mono_arm_throw_exception (exceptions-arm64.c:390)
12 ESPMobileiOS 0x00000001004de4e8 throw_exception + 168
13 ESPMobileiOS 0x00000001002f67cc System_Runtime_ExceptionServices_ExceptionDispatchInfo_Throw + 44
14 ESPMobileiOS 0x00000001002f4d20 System_Runtime_CompilerServices_AsyncMethodBuilderCore__ThrowAsyncm__0_object + 80
15 ESPMobileiOS 0x000000010018cbd8 UIKit_UIKitSynchronizationContext__Postc__AnonStorey0__m__0 (UIKitSynchronizationContext.cs:24)
16 ESPMobileiOS 0x00000001001aa3a4 Foundation_NSAsyncActionDispatcher_Apply (NSAction.cs:163)
17 ESPMobileiOS 0x00000001004a9f94 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
18 ESPMobileiOS 0x000000010005433c mono_jit_runtime_invoke (mini-runtime.c:2524)
19 ESPMobileiOS 0x00000001000b0918 do_runtime_invoke (object.c:2809)
20 ESPMobileiOS 0x00000001000b0874 mono_runtime_invoke (object.c:2967)
21 ESPMobileiOS 0x00000001011a98e4 native_to_managed_trampoline_3(objc_object*, objc_selector*, _MonoMethod**, char const*, char const*) (registrar.m:103)
22 ESPMobileiOS 0x00000001011a9fdc -[__MonoMac_NSAsyncActionDispatcher xamarinApplySelector] (registrar.m:6678)
23 Foundation 0x000000018af69048 __NSThreadPerformPerform + 340 (NSThread.m:1247)
24 CoreFoundation 0x000000018a402b5c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 (CFRunLoop.c:1943)
25 CoreFoundation 0x000000018a4024a4 __CFRunLoopDoSources0 + 524 (CFRunLoop.c:1989)
26 CoreFoundation 0x000000018a4000a4 __CFRunLoopRun + 804 (CFRunLoop.c:2821)
27 CoreFoundation 0x000000018a32e2b8 CFRunLoopRunSpecific + 444 (CFRunLoop.c:3113)
28 GraphicsServices 0x000000018bde2198 GSEventRunModal + 180 (GSEvent.c:2245)
29 UIKit 0x00000001903757fc -[UIApplication _run] + 684 (UIApplication.m:2650)
30 UIKit 0x0000000190370534 UIApplicationMain + 208 (UIApplication.m:4092)
31 ESPMobileiOS 0x00000001001f7de4 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr (/<unknown>:1)
32 ESPMobileiOS 0x000000010016a55c UIKit_UIApplication_Main_string___intptr_intptr (UIApplication.cs:79)
33 ESPMobileiOS 0x000000010016a51c UIKit_UIApplication_Main_string___string_string (UIApplication.cs:63)
34 ESPMobileiOS 0x0000000100134214 ESPMobile_iOS_Application_Main_string__ (Main.cs:13)
35 ESPMobileiOS 0x00000001004a9f94 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
36 ESPMobileiOS 0x000000010005433c mono_jit_runtime_invoke (mini-runtime.c:2524)
37 ESPMobileiOS 0x00000001000b0918 do_runtime_invoke (object.c:2809)
38 ESPMobileiOS 0x00000001000b293c mono_runtime_exec_main (object.c:4585)
39 ESPMobileiOS 0x00000001000b2558 mono_runtime_run_main (object.c:4134)
40 ESPMobileiOS 0x000000010003e738 mono_jit_exec (driver.g.c:1048)
41 ESPMobileiOS 0x0000000100133b68 xamarin_main (monotouch-main.m:487)
42 ESPMobileiOS 0x00000001011cef80 main (main.arm64.m:115)
43 libdyld.dylib 0x00000001893115b8 start + 4
What I can see, is that something is going wrong when you try to run some code on the ui thread. The following line tells me this UIKit_UIKitSynchronizationContext__Postc__AnonStorey0__m__0 (UIKitSynchronizationContext.cs:24).
It's very hard to tell exactly what the problem is or in which file the problem is. Maybe implement insights are another crash logger. So you get more info about the crash.

UICollectionViewData layoutAttributesForItemAtIndexPath HockeyApp Crash Report

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

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