I am completely at a loss here - I have a react native app created within expo. It runs perfectly well with expo go. I then built it using eas on my Mac (latest Ventura OS installed) and posted it to app store connect and installed it through TestFlight - it crashed immediately. I'm VERY new to this so it took me a long time to figure out how to troubleshoot this but I ended up finding this in the crash logs:
Thread 2 name: Dispatch queue: com.facebook.react.ExceptionsManagerQueue
Thread 2 Crashed:
0 libsystem_kernel.dylib 0x2076d8200 __pthread_kill + 8
1 libsystem_pthread.dylib 0x217b3a1ac pthread_kill + 268
2 libsystem_c.dylib 0x1d2111c8c abort + 180
3 libc++abi.dylib 0x217a7ab8c abort_message + 132
4 libc++abi.dylib 0x217a6aa80 demangling_terminate_handler() + 336
5 libobjc.A.dylib 0x1c3e11d3c _objc_terminate() + 144
6 libc++abi.dylib 0x217a79f28 std::__terminate(void (*)()) + 20
7 libc++abi.dylib 0x217a79ec4 std::terminate() + 56
8 libdispatch.dylib 0x1d20adff0 _dispatch_client_callout + 40
9 libdispatch.dylib 0x1d20b5694 _dispatch_lane_serial_drain + 672
10 libdispatch.dylib 0x1d20b61e0 _dispatch_lane_invoke + 384
11 libdispatch.dylib 0x1d20c0e10 _dispatch_workloop_worker_thread + 652
12 libsystem_pthread.dylib 0x217b33df8 _pthread_wqthread + 288
13 libsystem_pthread.dylib 0x217b33b98 start_wqthread + 8
And:
Thread 2 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x0000000217a7e0f5 x5: 0x000000016b4c6430 x6: 0x000000000000006e x7: 0xffffffff00000600
x8: 0xb1cfaa93a40be1da x9: 0xb1cfaa92cf4791da x10: 0x0000000000000200 x11: 0x000000000000000b
x12: 0x000000000000000b x13: 0x00000000001ff800 x14: 0x00000000000007fb x15: 0x000000008c033819
x16: 0x0000000000000148 x17: 0x000000016b4c7000 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x0000000000001603 x21: 0x000000016b4c70e0 x22: 0x0000000000000000 x23: 0x000000016b4c70e0
x24: 0x0000000000000000 x25: 0x0000000280c888e8 x26: 0x0000000000000114 x27: 0x0000000000000000
x28: 0x0000000283787840 fp: 0x000000016b4c63a0 lr: 0x0000000217b3a1ac
sp: 0x000000016b4c6380 pc: 0x00000002076d8200 cpsr: 0x40001000
far: 0x000000021e5abf50 esr: 0x56000080 Address size fault
I spent an entire day searching for causes surrounding these errors - there were references to this but nothing related to what I was doing.
I then went back to the basics - literally:
npx create-expo-app TestApp
eas build:configure
eas build --platform ios
And loaded this into a simulator (downloaded the ipa file, changed it to a .zip file, transferred the app file to the simulator) and it immediately crashed - but that same build worked in TestFlight so apparently the hack I found to use ipa files in a simulator doesn't work.
So, I'm not sure how best to troubleshoot this other than slowly start from a barebones app, add functionality, and keep building and publishing for TestFlight. I've used various versions of expo, node, eas cli, etc - all giving me the same results.
I tried using ErrorUtils to catch an exception and send the error to my node server but that didn't work (I might have set it up wrong).
I'm not sure how to proceed in troubleshooting this. I haven't used (nor do I know how to) Xcode much outside of using the simulators. Any help would be VERY MUCH appreciated.
After painfully starting from a bare-bones react-native expo app and adding functionality bit by bit, I found the issue was the stack navigator code. Once I had it narrowed down to that, I found this question that described the fact I missed installing the support packages necessary for stack navigation:
npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context #react-native-community/masked-view
And that you have to include:
import 'react-native-gesture-handler';
At the top of your App.js file - but in my case, I had two files with stack navigation so it wasn't enough to include that import just in App.js but also in that other file.
Once I did this, no more crashes!
Related
I'm making LLVM pass for Mach-O files with bitcode. For debugging purposes, I'd like to make a pass that adds log. So that I can see the logs after ipa file with bitcode is uploaded to test flight and installed to an iPhone.
What I was planning was to make a call to NSLog with function name and implemented the pass like following based on other codes. However this code crashes when it's ran on the iPhone. How should I edit the code so that it prints log without any problems. Following are current llvm pass code and error on runtime.
LLVM PASS CODE:
Function *Nslog = module->getFunction("NSLog");
if (!Nslog) {
PointerType *Pty = PointerType::get(IntegerType::get(module->getContext(), 8), 0);
FunctionType *FuncTy = FunctionType::get(Pty, true);
Nslog = Function::Create(FuncTy, GlobalValue::ExternalLinkage, "NSLog", module);
Nslog->setCallingConv(CallingConv::Swift);
}
IRBuilder <> builder(module->getContext());
builder.SetInsertPoint(bb);
llvm::Value *strPointer = builder.CreateGlobalStringPtr(func_name+2);
const std::vector<llvm::Value *> args{strPointer};
IRBuilder<> logCall(bb->getFirstNonPHI());
logCall.CreateCall(Nslog, args);
Crash Log:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000001
VM Region Info: 0x1 is not in any region. Bytes before following region: 4331290623
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 00000001022a4000-00000001022a8000 [ 16K] r-x/r-x SM=COW ...Depth-Sampler
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [2208]
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
0 libobjc.A.dylib 0x00000001bc347b28 objc_msgSend + 8
1 libsystem_trace.dylib 0x00000001bc1decc4 os_log_shim_with_CFString + 80 (format.m:24)
2 CoreFoundation 0x00000001bc6166b8 _CFLogvEx3 + 184 (CFUtilities.c:1165)
3 Foundation 0x00000001bc9f86fc _NSLogv + 120 (NSPlatform.m:0)
4 Foundation 0x00000001bc9f8740 NSLog + 48 (NSPlatform.m:1305)
5 iOS-Depth-Sampler 0x00000001022ab328 main + 44 (VideoCapture.swift:0)
6 libdyld.dylib 0x00000001bc4298f0 start + 4
Thread 1:
0 libsystem_pthread.dylib 0x00000001bc343738 start_wqthread + 0
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000001 x1: 0x00000001f7b86238 x2: 0x0000000000000001 x3: 0x0000000000000001
x4: 0x000000016db5ba00 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x00000000ffffffff
x8: 0x00000001f7b86000 x9: 0x0000000000000000 x10: 0x00000001bc438f20 x11: 0x00000001fd5ffd30
x12: 0x000000010264d360 x13: 0x0000000102308000 x14: 0x000000008b23e000 x15: 0x000000000000007c
x16: 0x00000001bc32effc x17: 0x000000000b200000 x18: 0x0000000000000000 x19: 0x00000001bc6166b8
x20: 0x000000016db5ba00 x21: 0x0000000000000001 x22: 0x000000020966c9c0 x23: 0x00000001022ab328
x24: 0x0000000000000000 x25: 0x0000000000000000 x26: 0x00000001022ab328 x27: 0x0000000000000000
x28: 0x000000016db5ba68 fp: 0x000000016db5b920 lr: 0x00000001bc1decc4
sp: 0x000000016db5b8f0 pc: 0x00000001bc347b28 cpsr: 0x20000000
esr: 0x92000006 (Data Abort) byte read Translation fault
for people who meet same problem, I'll leave how I made NSLog calls in ipa's LLVM.
In XCode Project I added tons of NSLog calls. Then in bitcode level, we can find NSLog call functions like following
tail call swiftcc void #"$s10Foundation5NSLogyySS_s7CVarArg_pdtF"(i64 -3458764513820540907, %"__ir_hidden#293_"* inttoptr (i64 or (i64 sub (i64 ptrtoint ([22 x i8]* #12 to i64), i64 32), i64 -9223372036854775808) to %"__ir_hidden#293_"*), %"__ir_hidden#293_"* bitcast (%"__ir_hidden#275_"* #_swiftEmptyArrayStorage to %"__ir_hidden#293_"*)), !dbg 413
Since !dbg part has limited scope of function (not sure, experimental result) remove !dbg part and get rest of NSLog function call. I linked all bitcode files in Mach-O and made it to a single .bc file. In this .bc file, I could move above instruction in other function to call NSLog at wanted position.
Also, at bitcode level, I could change value of global string and set it as wanted value. (not at runtime)
My latest mobile game update was promptly rejected by the iOS App Review Team for crashing after they pressed the "start" button to load the game scene from the main menu scene. Without providing a crash log, they told me to go reproduce the crash myself and then identify and fix the issue (lol yeah, sure thing buddy). I was unable to reproduce this issue so I spammed their inbox for three days and they finally provided me with a crash log. I'm unable to symbolicate the crash log in Xcode because I'm running MacOS on a virtual machine, which is unable to connect to a device (I refuse to buy a Mac just so I can publish free mobile games), so I've found myself at quite the dead end. I've attached the full crash log below. If anybody can help me understand what could be causing the crash, I'd greatly appreciate it. The crash is on Thread 0. I removed a lot of details from the log to fit it in the post so I can provide more information if needed.
Incident Identifier: E1CC2B12-75DA-4704-A9BA-9923B4EE44A3
CrashReporter Key: d5a46eb6fe6765b9893f0126d9ae455c5b11cea1
Hardware Model: xxx
Process: AppName [4775]
Path: /private/var/containers/Bundle/Application/8C49D650-D44B-40CA-9071-6EE143554D36/AppName.app/AppName
Identifier: com.Company-Name.AppName
Version: 1 (1.0.8)
AppStoreTools: 12E262
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.Company-Name.AppName [1637]
Date/Time: 2021-05-06 15:53:25.8187 +0100
Launch Time: 2021-05-06 15:53:17.5422 +0100
OS Version: iPhone OS 14.5.1 (18E212)
Release Type: User
Baseband Version: n/a
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
VM Region Info: 0 is not in any region. Bytes before following region: 4376707072
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 104df4000-104df8000 [ 16K] r-x/r-x SM=COW ...app/AppName
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_platform.dylib 0x00000001c993d128 0x1c9936000 + 28968
1 UnityFramework 0x0000000105747228 0x105098000 + 7008808
2 UnityFramework 0x00000001057530e8 0x105098000 + 7057640
3 UnityFramework 0x000000010542fe74 0x105098000 + 3767924
4 UnityFramework 0x0000000105710c10 0x105098000 + 6786064
5 UnityFramework 0x000000010571226c 0x105098000 + 6791788
6 UnityFramework 0x00000001057123b8 0x105098000 + 6792120
7 UnityFramework 0x000000010557f470 0x105098000 + 5141616
8 UnityFramework 0x000000010556f4b8 0x105098000 + 5076152
9 UnityFramework 0x0000000105461350 0x105098000 + 3969872
10 UnityFramework 0x00000001054621cc 0x105098000 + 3973580
11 UnityFramework 0x0000000105463438 0x105098000 + 3978296
12 UnityFramework 0x0000000105463ad8 0x105098000 + 3979992
13 UnityFramework 0x00000001054562a4 0x105098000 + 3924644
14 UnityFramework 0x00000001054562e4 0x105098000 + 3924708
15 UnityFramework 0x00000001054565ac 0x105098000 + 3925420
16 UnityFramework 0x000000010578cecc 0x105098000 + 7294668
17 UnityFramework 0x00000001050b2290 0x105098000 + 107152
18 UnityFramework 0x00000001050b21f8 0x105098000 + 107000
19 QuartzCore 0x00000001851f98e4 0x1851e6000 + 80100
20 IOKit 0x000000018c6ba0f8 0x18c6b3000 + 28920
21 CoreFoundation 0x00000001820953dc 0x18201e000 + 488412
22 CoreFoundation 0x00000001820b8fc0 0x18201e000 + 634816
23 CoreFoundation 0x00000001820b83c4 0x18201e000 + 631748
24 CoreFoundation 0x00000001820b2538 0x18201e000 + 607544
25 CoreFoundation 0x00000001820b16a8 0x18201e000 + 603816
26 GraphicsServices 0x0000000198761570 0x19875e000 + 13680
27 UIKitCore 0x00000001849cf370 0x183ea0000 + 11727728
28 UIKitCore 0x00000001849d48ec 0x183ea0000 + 11749612
29 UnityFramework 0x00000001050b1cc8 0x105098000 + 105672
30 AppName 0x0000000104dfbe1c 0x104df4000 + 32284
31 libdyld.dylib 0x0000000181d90140 0x181d8f000 + 4416
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x00000002a0000060 x2: 0x0000000025bc53e0 x3: 0x0000000000000020
x4: 0x0000000000000000 x5: 0x0000000000000020 x6: 0x0000000000000015 x7: 0x0000000000000000
x8: 0xbf800000bde131b9 x9: 0x3f586c393f7178c0 x10: 0xb4000000b4000000 x11: 0xbe39a80dbcc13b57
x12: 0xbe3db1abbca0ee69 x13: 0x3e8a242ebd91359d x14: 0x3ea8e51ebf679701 x15: 0xbeaaa529bf6fb740
x16: 0x00000001c993d0e0 x17: 0x0000000000000001 x18: 0x0000000000000000 x19: 0x0000000147b0e2e0
x20: 0x00000002a0000020 x21: 0x0000000025bc5400 x22: 0x0000000000000000 x23: 0x000000014654f790
x24: 0x0000000147b0e2e0 x25: 0x00000001456e4040 x26: 0x0000000000000000 x27: 0x000000014654f790
x28: 0x0000000000000000 fp: 0x000000016b0090a0 lr: 0x0000000105747228
sp: 0x000000016b009040 pc: 0x00000001c993d128 cpsr: 0x20000000
esr: 0x56000080 Address size fault
The error is pretty clear when reading through it. Firstly, the EXC_BAD_ACCESS (SIGSEGV) meaning it is accessing memory it should not be. Second, the KERN_INVALID_ADDRESS at 0x0000000000000000 is the address of NULL. In other words, you have a null reference exception that is being thrown when clicking start. As I can not see your code, I do not know the specifics. If you have any #if UNITY_IOS or #if UNITY_ANDROID conditions that section off code, it could be the iOS version is missing an assignment. If you want to learn more about understanding memory access crashes, read Apple's writeup.
I should add, this null reference exception might not be directly from your code. If you are using plugins or libraries in your project that runs differently on iOS, they might be the issue. As there is not a lot of information to go off from your question it is hard to say. Can you list any packages you could be using? Do you have an iPhone to test on personally? If not I would heavily consider at least finding someone with one to test your iOS game on instead of blindly publishing to a live environment.
You could try to use the atos command to symbolicate address. For example:
atos -arch arm64 -o UnityFramework.framework/UnityFramework -l 0x105098000 0x0000000105747228 0x00000001057530e8 0x000000010542fe74 ...and so on
-l option is followed by the base address of UnityFramework image, and next is stack addresses.
Then you can see the symbols of functions call stack, find out where call the crash functions.
These also apply to CoreFoundation, UIKitCore.
I'm trying to build a Xamarin Forms app with an associated App Extension for iOS. My solution structure is like this:
MyProject
\BitThicket.MyProject -- Forms project
\BitThicket.MyProject.Core -- NET Standard 2.0 class library
\BitThicket.MyProject.iOS -- iOS project
\BitThicket.MyProject.Extensions.Intents -- Intents project
Each project was created from a template, and I've made few changes - and the crash happens at startup, so none of my code is reached anyway.
I'm targeting iOS 11.1, and I have a valid signing certificate and provisioning profile set up. I'm able to build the app and deploy it to a device (my iPhone 7+) from Visual Studio for Mac (7.2.2). However, when the debugger tries to launch the app for me, the blank splash view shows and then the app crashes. The debugger never connects. Incidentally, it crashes in the same way when the app is launched manually on the device.
I retrieved the device logs using Xcode, and the crash looks like this:
Incident Identifier: 948709A2-74AA-4E16-BEEA-072CFCF4AB38
CrashReporter Key: ######################################
Hardware Model: iPhone9,2
Process: BitThicket.Turns.iOS [2457]
Path: /private/var/containers/Bundle/Application/#####-##############-############/BitThicket.Turns.iOS.app/BitThicket.Turns.iOS
Identifier: com.bitthicket.Turns
Version: 1.0 (1.0)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.bitthicket.Turns [818]
Date/Time: 2017-11-24 09:41:15.3743 -0600
Launch Time: 2017-11-24 09:41:15.3041 -0600
OS Version: iPhone OS 11.1.2 (15B202)
Baseband Version: 3.21.01
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Description: DYLD, Library not loaded: #rpath/Mono.framework/Mono | Referenced from: /var/containers/Bundle/Application/########-####-####-####-############/BitThicket.Turns.iOS.app/BitThicket.Turns.iOS | Reason: no suitable image found. Did find: | /private/var/containers/Bundle/Application/########-####-####-####-############/BitThicket.Turns.iOS.app/Frameworks/Mono.framework/Mono: code signing blocked mmap() of '/private/var/containers/Bundle/Application/########-####-####-####-############/BitThicket.Turns.iOS.app/Frameworks/Mono.framework/Mono'
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 Crashed:
0 dyld 0x0000000106722f1c __abort_with_payload + 8
1 dyld 0x00000001067226f4 abort_with_payload_wrapper_internal + 100
2 dyld 0x0000000106722720 fcntl + 0
3 dyld 0x00000001066f8498 dyld::fastBindLazySymbol+ 17560 (ImageLoader**, unsigned long) + 0
4 dyld 0x00000001066fb714 dyld::_main+ 30484 (macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 7376
5 dyld 0x00000001066f521c _dyld_start + 68
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000006 x1: 0x0000000000000001 x2: 0x000000016d50a470 x3: 0x00000000000000a5
x4: 0x000000016d50a070 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x00000000000002f0
x8: 0x0000000000000020 x9: 0x0000000000000009 x10: 0x6f6e6f4d2f736b72 x11: 0x6f77656d6172662e
x12: 0x726f77656d617246 x13: 0x2e6f6e6f4d2f736b x14: 0x726f77656d617266 x15: 0x00276f6e6f4d2f6b
x16: 0x0000000000000209 x17: 0x000000008000001f x18: 0x0000000000000000 x19: 0x0000000000000000
x20: 0x000000016d50a070 x21: 0x00000000000000a5 x22: 0x000000016d50a470 x23: 0x0000000000000001
x24: 0x0000000000000006 x25: 0x00000001028f4000 x26: 0x0000000106736000 x27: 0x0000000106735f88
x28: 0x000000016d50ba70 fp: 0x000000016d50a040 lr: 0x00000001067226f4
sp: 0x000000016d50a000 pc: 0x0000000106722f1c cpsr: 0x00000000
Binary Images:
0x1028f4000 - 0x103e43fff BitThicket.Turns.iOS arm64 <###########################> /var/containers/Bundle/Application/########-####-####-####-############/BitThicket.Turns.iOS.app/BitThicket.Turns.iOS
0x1066f4000 - 0x106733fff dyld arm64 <##########################> /usr/lib/dyld
EOF
Does anyone know what causes this? There don't seem to be a lot of direct answers on the Xamarin forums or other places (including SO, unfortunately). I've tried some of the simple things, like restarting Visual Studio for Mac, or delete the app from my device and clean/rebuild the solution, but those things don't seem to help.
In the termination description it sounds like it tried to load mono, but mmap was blocked by code signing somehow - but I don't really understand how. The app builds and deploys to my device, so it seems like code signing is working.
After digging a little further, I found a few examples of problems that seemed similar, and the most common approach factor seemed to be that signing certificates were incorrectly configured. I'm still curious about the underlying reason - the "why" behind the why.
In the end, I found that I had the "Apple Worldwide Developer Relations Certificate Authority" on both the "System" and "login" keychains, as well as configured for "Always Trust", when it should have been only in my "login" keychain and configured for "System Defaults".
Once I corrected those issues, I tried again and I still had the problem. It finally went away after rebooting my mac.
I'm working on a watch App. The Xcode version is 7.3, Swift 2 , iPhone 5 and watch version 3.1.3
First thing Mobile app and watch App both works properly on simulator.The App has two version (English/ Chinese). Now the problem is When I select the english Language for watch, App Works as I needed. But if I change the watch Language to Chinese or any other language then the App Shows a Spinner for long time and then return a black screen. Is anyone facing Same Issue??Please suggest me what is wrong with this app?? Thanks in advance.
Incident Identifier: 9611567E-C66A-4016-A07D-464B0D0F46CB
CrashReporter Key: f90545bedbe3c3364591ded5495f1209af31a874
Hardware Model: Watch2,4
Process: iCE Angel ID WatchApp [276]
Path: /private/var/containers/Bundle/Application/5DC3CFAC-91A8-475D-8B36-60D5353F38E3/iCE Angel ID WatchApp.app/iCE Angel ID WatchApp
Identifier: com.iceangelid.app.watchkit
Version: 1.1.1 (1.1.1)
Code Type: ARM (Native)
Role: Non UI
Parent Process: launchd [1]
Coalition: com.iceangelid.app.watchkit [343]
Date/Time: 2017-10-25 15:26:48.9193 +0530
Launch Time: 2017-10-25 15:25:56.0000 +0530
OS Version: Watch OS 3.1.3 (14S960)
Report Version: 104
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x1f1896e0 0x1f185000 + 18144
1 libsystem_kernel.dylib 0x1f1894ac 0x1f185000 + 17580
2 CoreFoundation 0x1f516818 0x1f45d000 + 759832
3 CoreFoundation 0x1f514adc 0x1f45d000 + 752348
4 CoreFoundation 0x1f469414 0x1f45d000 + 50196
5 GraphicsServices 0x20c04e1e 0x20bf9000 + 48670
6 UIKit 0x23ea20be 0x23e2d000 + 479422
7 UIKit 0x23e9cf08 0x23e2d000 + 458504
8 SockPuppetGizmo 0x2a4d0ace 0x2a4c9000 + 31438
9 libdyld.dylib 0x1f0ac566 0x1f0a9000 + 13670
Thread 16:
0 libsystem_pthread.dylib 0x1f25d1a0 0x1f259000 + 16800
Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x10004005 r1: 0x07000806 r2: 0x00000000 r3: 0x00000c00
r4: 0x00001b03 r5: 0xffffffff r6: 0x00000000 r7: 0x002b6e08
r8: 0x14e5dd88 r9: 0x014dccdc r10: 0x07000806 r11: 0x07000806
ip: 0xffffffe1 sp: 0x002b6dc0 lr: 0x1f1894ad pc: 0x1f1896e0
cpsr: 0x60000010
Binary Images:
0x100000 - 0x103fff iCE Angel ID WatchApp armv7k <7c65269026583b9eb4c246f5eb0d09ce> /var/containers/Bundle/Application/5DC3CFAC-91A8-475D-8B36-60D5353F38E3/iCE Angel ID WatchApp.app/iCE Angel ID WatchApp
0x140000 - 0x16ffff dyld armv7k <40c16d46fa443776b664db9a54fcd325> /usr/lib/dyld
0x1eb9c000 - 0x1eb9ffff libSystem.B.dylib armv7k <acc06d05ed6537c2a5f58cf93c84188b> /usr/lib/libSystem.B.dylib
0x1eba0000 - 0x1ebe3fff libc++.1.dylib armv7k <97e755cc71ae3b86b896f3ac8408fe1a> /usr/lib/libc++.1.dylib
0x1ebe4000 - 0x1ebfffff libc++abi.dylib armv7k <10a460aa3dbc3a2e929eea18e8e9f2a3> /usr/lib/libc++abi.dylib
[https://i.stack.imgur.com/Sr7m9.png][1]
One more thing that i forgot to mention is the app works properly on real devices when installed first time but if I uninstall the app and then reinstall it this produce the same issue as mentioned above.
When I test my iOS app on my iPhone, it crashes immediately. From Xcode, Window->Devices->iPhone, I'm able to get the following crash report:
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000100a69dc0
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [0]
Triggered by Thread: 3
Filtered syslog:
None found
Thread 3 name: Dispatch queue: NSOperationQueue 0x170228680 ::
NSOperation 0x17005ba80 (QOS: DEFAULT)
Thread 3 Crashed:
0 libswiftCore.dylib 0x0000000100a69dc0 0x10090c000 + 1433024
1 appName_iOS 0x00000001000a6510 0x10000c000 + 632080
2 appName_iOS 0x0000000100019b38 0x10000c000 + 56120
3 CFNetwork 0x0000000192c101fc __75- [__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 32
4 CFNetwork 0x0000000192c27ef8 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 148
5 Foundation 0x00000001930d5804 __ NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
6 Foundation 0x000000019301a760 -[NSBlockOperation main] + 96
7 Foundation 0x000000019300ab18 -[__NSOperationInternal _start:] + 612
8 Foundation 0x00000001930d7ba0 __NSOQSchedule_f + 228
9 libdispatch.dylib 0x00000001914be9a0 _dispatch_client_callout + 16
10 libdispatch.dylib 0x00000001914ccad4 _dispatch_queue_serial_drain + 928
11 libdispatch.dylib 0x00000001914c22cc _dispatch_queue_invoke + 884
12 libdispatch.dylib 0x00000001914cea50 _dispatch_root_queue_drain + 540
13 libdispatch.dylib 0x00000001914ce7d0 _dispatch_worker_thread3 + 124
14 libsystem_pthread.dylib 0x00000001916c71d0 pthread_wqthread + 1096
15 libsystem_pthread.dylib 0x00000001916c6d7c start_wqthread + 4
Thread 3 crashed with ARM Thread State (64-bit):
x0: 0x0000000100f00380 x1: 0x00000001702e5a80 x2: 0x0000000000000008 x3: 0x00000001916472c0
x4: 0x0000000000000038 x5: 0x0000000000000010 x6: 0x0000000000000000 x7: 0x0000000000000d60
x8: 0x00000001702e5c00 x9: 0x00000001702e5c00 x10: 0x0000000000000001 x11: 0xbaddc0dedeadbead
x12: 0x0000010000000100 x13: 0x0000000000000028 x14: 0x0000000000000001 x15: 0x0000000000000881
x16: 0x0000000191637a1c x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000174051cd0
x20: 0x0000000000000000 x21: 0x00000001a0eeac53 x22: 0x0000000000000000 x23: 0x0000000174051cd0
x24: 0x0000000000000000 x25: 0x00000000000000d8 x26: 0x00000001b737b000 x27: 0x000000016e0570e0
x28: 0x0000000000000000 fp: 0x000000016e056700 lr: 0x0000000100a69dc0
sp: 0x000000016e0566f0 pc: 0x0000000100a69dc0 cpsr: 0x20000000
Of course, I'm unable to understand the crash report and where the problem occurred. I know I need to symbolicate the report, can someone point me in the right direction on how to symbolicate?
Xcode needs the symbols (dSYM) from the exact build that triggered the build on the Mac that symbolicates the crash reports. Each build is identified with a unique UUID (one for each CPU architecture) which is embedded in the app binary and the symbol file. The crash report contains that UUID in the Binary Images section for each loaded binary. The symbolication process uses Spotlight to find the proper symbol, and if it can't find it, is not able to symbolicate the memory address of the corresponding stack frames.
Whenever you change code in your project (or change build settings) and trigger a new build, then the UUID will change as well and the new symbol file can not be used for crash reports of older builds.
So if you don't have the symbol for that specific app build available, it is not possible to get the symbols without manual efforts.
If you didn't change the code or build settings, you could try to symbolicate the app specific frames manually via the terminal. To do that follow these steps:
Create a new build (make sure to use the same build configuration!).
Then you need the load address from the app binary from the crash report (It's the first memory address in the line below Binary Images which mentions your app).
You also need the CPU architecture of that binary image, e.g. arm64, or armv7, or armv7s (If the build was done for the device). In your case it looks like the build is for arm64 as the shown data shows 64bit addresses.
Now call atos with the list of memory addresses you want to symbolicate (example uses the memory address of frame 1 and 2):
atos -arch arm64 -l TheLoadAddressOfTheBinary -o YourDsymPackage.dSYM/Contents/Resources/DWARF/YourDsymFile 0x00000001000a6510 0x0000000100019b38
You should now get 2 symbols for the 2 provided memory addresses. If you are lucky (when using a new dSYM), they are helpful.