Crash on iOS15 Beta 5

First time, app run normally but if you kill the app and run it again, app crash immediately.

If restart iphone, app can run only first time same as above.

Developed from Visual Studio Xamarin

What is this log told me ?


Hardware Model:      iPhone8,4
Process:             XXXXXXX.iOS [393]
Path:                /private/var/containers/Bundle/Application/9CF84154-0C87-49C4-85E9-1D495D323ED9/XXXXXXX.iOS.app/XXXXXXX.iOS
Identifier:          com.xx.xxxxx
Version:             1.0 (1.15)
AppStoreTools:       12E506
AppVariant:          1:iPhone8,4:14
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.xx.xxxxx [397]

Date/Time:           2021-08-12 20:06:00.5105 +0700
Launch Time:         2021-08-12 20:06:00.3810 +0700
OS Version:          iPhone OS 15.0 (19A5318f)
Release Type:        Beta
Baseband Version:    11.00.00
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0

Last Exception Backtrace:
0   CoreFoundation                	0x181b4d314 0x181abb000 + 598804
1   libobjc.A.dylib               	0x199214748 0x199200000 + 83784
2   CoreFoundation                	0x181c1ca64 0x181abb000 + 1448548
3   CoreFoundation                	0x181ae6abc 0x181abb000 + 178876
4   CoreFoundation                	0x181ae5d2c 0x181abb000 + 175404
5   XXXXXXX.iOS                   	0x1035088e8 0x102560000 + 16419048
6   XXXXXXX.iOS                   	0x1034baf10 0x102560000 + 16101136
7   XXXXXXX.iOS                   	0x1034badc4 0x102560000 + 16100804
8   XXXXXXX.iOS                   	0x1034ba7f8 0x102560000 + 16099320
9   XXXXXXX.iOS                   	0x103495458 0x102560000 + 15946840
10  XXXXXXX.iOS                   	0x103662de4 0x102560000 + 17837540
11  XXXXXXX.iOS                   	0x102594934 0x102560000 + 215348
12  XXXXXXX.iOS                   	0x102902010 0x102560000 + 3809296
13  XXXXXXX.iOS                   	0x103c88118 0x102560000 + 24281368
14  XXXXXXX.iOS                   	0x103d1ebc0 0x102560000 + 24898496
15  XXXXXXX.iOS                   	0x103d220b0 0x102560000 + 24912048
16  XXXXXXX.iOS                   	0x1025641d0 0x102560000 + 16848
17  XXXXXXX.iOS                   	0x102565438 0x102560000 + 21560
18  UIKitCore                     	0x18409bdac 0x183e1c000 + 2620844
19  XXXXXXX.iOS                   	0x103507ee8 0x102560000 + 16416488
20  XXXXXXX.iOS                   	0x10346dff0 0x102560000 + 15785968
21  XXXXXXX.iOS                   	0x10346df74 0x102560000 + 15785844
22  XXXXXXX.iOS                   	0x102594894 0x102560000 + 215188
23  XXXXXXX.iOS                   	0x102902010 0x102560000 + 3809296
24  XXXXXXX.iOS                   	0x103c88118 0x102560000 + 24281368
25  XXXXXXX.iOS                   	0x103d1ebc0 0x102560000 + 24898496
26  XXXXXXX.iOS                   	0x103d23dc0 0x102560000 + 24919488
27  XXXXXXX.iOS                   	0x103c6d5c4 0x102560000 + 24171972
28  XXXXXXX.iOS                   	0x103dc4180 0x102560000 + 25575808
29  XXXXXXX.iOS                   	0x10259434c 0x102560000 + 213836
30  dyld                          	0x104318190 0x104300000 + 98704

Thread 6:
0   libsystem_pthread.dylib       	0x00000001db8f2a9c 0x1db8f2000 + 2716

Thread 7:
0   libsystem_pthread.dylib       	0x00000001db8f2a9c 0x1db8f2000 + 2716

Thread 8:
0   libsystem_pthread.dylib       	0x00000001db8f2a9c 0x1db8f2000 + 2716


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x0000000000000000   x5: 0x0000000000989680   x6: 0x0000000000001c00   x7: 0x0000000000000000
    x8: 0x0000000104360580   x9: 0x3cc25e695a373c4b  x10: 0x00000000000003e8  x11: 0x0000000000000000
   x12: 0x00000002834b8200  x13: 0x000000010488b82b  x14: 0x0000000000000020  x15: 0x0000000080000000
   x16: 0x0000000000000148  x17: 0x0000000181addc4c  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000000000103  x21: 0x0000000104360660  x22: 0x0000000000000000  x23: 0x0000000122822000
   x24: 0x000000010488b828  x25: 0x000000016d89b7f0  x26: 0x0000000000000002  x27: 0x0000000103fce930
   x28: 0x0000000000ffffff   fp: 0x000000016d89a9b0   lr: 0x00000001db8fe8d8
    sp: 0x000000016d89a990   pc: 0x00000001bb457a60 cpsr: 0x40000000
   esr: 0x56000080  Address size fault


Binary Images:
0x102560000 - 0x103e9ffff XXXXXXX.iOS arm64  <9e34962dad9f3a4d915464e9b58696bf> /private/var/containers/Bundle/Application/9CF84154-0C87-49C4-85E9-1D495D323ED9/XXXXXXX.iOS.app/XXXXXXX.iOS
0x104300000 - 0x104353fff dyld arm64  <cc0622646dac3bceb17ade758ec95e79> /usr/lib/dyld
0x181abb000 - 0x181ef4fff CoreFoundation arm64  <908c804ab43c366e8c4f955f2d723734> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x1831fe000 - 0x1834dcfff Foundation arm64  <e9fd4d9355ff39b8b325920378b4eb7f> /System/Library/Frameworks/Foundation.framework/Foundation
0x183e1c000 - 0x185593fff UIKitCore arm64  <1cc130419dcf35f2b10664f71d764a44> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x18c4b6000 - 0x18c530fff libsystem_c.dylib arm64  <8955052000aa3defaf18cacfb087ef2e> /usr/lib/system/libsystem_c.dylib
0x199200000 - 0x199235fff libobjc.A.dylib arm64  <135c6774c9b43be58f39dc072e83c31b> /usr/lib/libobjc.A.dylib
0x1992f7000 - 0x19930ffff libc++abi.dylib arm64  <6962e59d3f1332d1a0677dc50ef390c8> /usr/lib/libc++abi.dylib
0x1bb451000 - 0x1bb482fff libsystem_kernel.dylib arm64  <dc4963921c143e6e97c1d9d449de8e84> /usr/lib/system/libsystem_kernel.dylib
0x1db8f2000 - 0x1db901fff libsystem_pthread.dylib arm64  <c916740f7fb83c72871f71229e61fb7b> /usr/lib/system/libsystem_pthread.dylib

EOF

I started seeing the exact same thing on Beta 5

We have exactly the same story with our Xamarin iOS app. It started to crash on iOS15 Beta5. The reason for a crash has not been identified yet.

You can deobfuscate your stack trace by following these steps:

Get the first number from the crash file in the Binary Images section: in your case (0x102560000)

Go to directory that contains *.dSYM in out case it is bin/iPhone/release/

And run in terminal

atos -arch arm64  -o YourAppName.app/YourAppName -l 0x102560000 0x1035088e8

or copy all addresses into stack.txt file and run

atos -arch arm64  -o YourAppName.app/YourAppName -l 0x102560000 -f stack.txt

Out stack trace:

wrapper_managed_to_native_Foundation_NSObject_xamarin_set_gchandle_with_flags_safe_intptr_intptr_Foundation_NSObject_XamarinGCHandleFlags (in {AppName}) + 136
Foundation_NSObject_CreateManagedRef_bool (in {AppName}) (NSObject2.cs:286)
Foundation_NSObject_InitializeObject_bool (in {AppName}) (NSObject2.cs:273)
Foundation_NSObject__ctor_Foundation_NSObjectFlag (in {AppName}) (NSObject2.cs:148)
UIKit_UIApplicationDelegate__ctor (in {AppName}) (UIApplicationDelegate.g.cs:883)
MvvmCross_Platforms_Ios_Core_MvxApplicationDelegate__ctor (in {AppName}) (MvxApplicationDelegate.cs:22)
MvvmCross_Platforms_Ios_Core_MvxApplicationDelegate_2_TMvxIosSetup_REF_TApplication_REF__ctor (in {AppName}) + 20
{AppName}_AppDelegate__ctor (in {AppName}) (/<unknown>:1)
wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr (in {AppName}) + 272
mono_jit_runtime_invoke (in {AppName}) (mini-runtime.c:3171)
mono_runtime_invoke_checked (in {AppName}) (object.c:3220)
mono_runtime_invoke (in {AppName}) (object.c:3107)
native_to_managed_trampoline_1(objc_object, objc_selector, _MonoMethod*, bool, unsigned int) (in {AppName}) (registrar.m:32)
-[AppDelegate init] (in {AppName}) (registrar.m:9828)
0x000000018370b498
wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr (in {AppName}) + 344
UIKit_UIApplication_Main_string___intptr_intptr (in {AppName}) (UIApplication.cs:86)
UIKit_UIApplication_Main_string___string_string (in {AppName}) (UIApplication.cs:66)
{AppName}_Application_Main_string__ (in {AppName}) (/<unknown>:1)
wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr (in {AppName}) + 272
mono_jit_runtime_invoke (in {AppName}) (mini-runtime.c:3171)
mono_runtime_invoke_checked (in {AppName}) (object.c:3220)
mono_runtime_exec_main_checked (in {AppName}) (object.c:5284)
mono_jit_exec (in {AppName}) (driver.c:1328)
xamarin_main (in {AppName}) (monotouch-main.m:0)
main (in {AppName}) (main.m:184)

iOS 15 Beta 7 already fixed !! Bravo!

Crash on iOS15 Beta 5
 
 
Q