I am trying to symbolicate an iOS crash report. I am missing dSYMs for UIKitCore and other native libs.
The app is built with NativeScript. I have successfully symbolicated frames of my app and NativeScript framework. However I can't seem to find a way to symbolicate frames of libs like UIKitCore, they are still showing up as addresses. I have also tried searching for them using mdfind as per Apple documentation - they are not present on my Mac. I have also tried looking for these dSYMs online without luck.
Here is an excerpt of my crash log:
Last Exception Backtrace:
0 CoreFoundation 0x1cb5d927c 0x1cb4c1000 + 1147516
1 libobjc.A.dylib 0x1ca7b39f8 0x1ca7ae000 + 23032
2 NativeScript 0x10420fca0 NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool) + 277664 (JSErrors.mm:189)
3 NativeScript 0x104223354 NativeScript::FFICallback<NativeScript::ObjCBlockCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*) + 357204 (FFICallbackInlines.h:33)
4 NativeScript 0x104cb9894 ffi_closure_SYSV_inner + 11458708 (ffi.c:1218)
5 NativeScript 0x104cbc1b4 .Ldo_closure + 19
6 libdispatch.dylib 0x1cb018a38 0x1cafb9000 + 391736
7 libdispatch.dylib 0x1cb0197d4 0x1cafb9000 + 395220
8 libdispatch.dylib 0x1caff99e4 0x1cafb9000 + 264676
9 CoreFoundation 0x1cb56ac1c 0x1cb4c1000 + 695324
10 CoreFoundation 0x1cb565b54 0x1cb4c1000 + 674644
11 CoreFoundation 0x1cb5650b0 0x1cb4c1000 + 671920
12 GraphicsServices 0x1cd76579c 0x1cd75b000 + 42908
13 UIKitCore 0x1f7edf978 0x1f7623000 + 9161080
14 NativeScript 0x104cbc044 ffi_call_SYSV + 67
15 NativeScript 0x104cb8fb4 ffi_call_int + 11456436 (ffi.c:758)
16 NativeScript 0x104cb8ab0 ffi_call + 11455152 (ffi.c:767)
17 NativeScript 0x1041d4f90 NativeScript::FunctionWrapper::call(JSC::ExecState*) + 36752 (FunctionWrapper.mm:97)
18 NativeScript 0x104cb7b58 llint_entry + 32567
Many articles I found had examples with UIKitCore symbolicated so I assume this has to do with my configuration.
Part 1: Install the symbols
Check the full iOS version in the crash report. It should look like "iPhone OS 13.3 (17C54)"
There are a lot of repositories with iOS symbols or links to them. Like this one: https://github.com/Zuikyo/iOS-System-Symbols/blob/master/collected-symbol-files.md
Find and download symbols you need.
Unpack them to ~/Library/Developer/Xcode/iOS\ DeviceSupport
Add info.plist into the root folder if it missed (just copy from the other symbols and change its version value)
Part 2. Use the force of Xcode
Connect ANY real device, open Xcode, open the "Devices and Simulators" window, click the "View device logs" and then go to tab "All logs".
Drag and drop the crash into the table. Find it.
If the system symbols are not desymbolicated – do right-click on the crash and select "Re-symbolicate crash".
Repeat Step 3 multiple times (2-3 usually enough) – it needs time to resymbolicate it, but it looks like xcode does not update the crashlog automatically
And yes, UIKitCore is a system framework
UIKitCore is NOT an apple framework.
Related
I wrote a simple app with React Native targeting iOS. When I build the app in Xcode to test on simulators or my iPhone everything works perfectly. When I archive the build in Xcode and load it on my iPhone using the development option, it crashes when I press the only button on screen on start.
The app source code can be found on GitHub.
I am using React Native ~0.63.4 and React: 16.13.1 in a bare Expo workflow.
Third party dependencies:
#react-native-async-storage/async-storage
expo-constants
expo-notifications
uuid
react-native-date-picker
Here is a full crash report from the device logs: Google Drive
I'm at a loss trying to interpret the crash logs but the thread that crashes is exactly this everytime (except for the thread number):
Thread 3 name: Dispatch queue: com.facebook.react.ExceptionsManagerQueue
Thread 3 Crashed:
0 libsystem_kernel.dylib 0x00000001d285f414 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001eed77b40 pthread_kill + 272
2 libsystem_c.dylib 0x00000001aec84b74 abort + 104
3 libc++abi.dylib 0x00000001b9fbccf8 __cxxabiv1::__aligned_malloc_with_fallback+ 81144 (unsigned long) + 0
4 libc++abi.dylib 0x00000001b9fade4c demangling_unexpected_handler+ 20044 () + 0
5 libobjc.A.dylib 0x00000001b9eb6f64 _objc_terminate+ 28516 () + 144
6 libc++abi.dylib 0x00000001b9fbc0e0 std::__terminate(void (*)+ 78048 ()) + 20
7 libc++abi.dylib 0x00000001b9fbc06c std::terminate+ 77932 () + 44
8 libdispatch.dylib 0x00000001a5554dc4 _dispatch_client_callout + 40
9 libdispatch.dylib 0x00000001a555c10c _dispatch_lane_serial_drain + 580
10 libdispatch.dylib 0x00000001a555cc5c _dispatch_lane_invoke + 408
11 libdispatch.dylib 0x00000001a5566d78 _dispatch_workloop_worker_thread + 708
12 libsystem_pthread.dylib 0x00000001eed78804 _pthread_wqthread + 276
13 libsystem_pthread.dylib 0x00000001eed7f75c start_wqthread + 8
When I open the app while connected to my laptop and have the console for my iPhone open while crashing the app, I first get these messages under Errors and Faults:
error 16:14:06.383233-0500 remindrs Error: Requiring unknown module "undefined".
error 16:14:06.386759-0500 remindrs Unhandled JS Exception: Error: Requiring unknown module "undefined".
error 16:14:06.463315-0500 SpringBoard Ignoring state for untracked process [application<org.name.remindrs>:5966]: <RBSProcessState| task:none debug:none>
fault 16:14:06.559231-0500 SpringBoard Unable to move topic <private>, This topic was not in the list provided! APSTopicListOpportunistic
I've tried cleaning the build folder, turning off Swift compiler optimizations, and rearchived the project multiple times.
None of my searching has paid off and I'm not sure how to identify the issue I am having. I don't know if it is with React Native or with some configuration in Xcode.
Thank you for your help!
I solved the problem by removing a few lines of codes dealing with a Date. I'm not sure why this caused a crash in release and not debug but the problem is fixed!
I'm running Xcode 11.2.1 and all of a sudden started getting the error Unable to install "my app name". The app builds fine and I was able to install it to the same phone not 20 minutes ago and I haven't made any code changes since then.
Here's a screenshot of the error:
So far I have tried uninstalling the existing app on the phone, restarting the phone, restarting xcode, restarting the computer, clearing derived data, disconnecting and reconnecting the phone many times. Nothing has worked, still getting the same error.
Xcode provides no additional errors other than the one shown.
Has anyone else faced something similar / knows a potential fix?
Update: Okay so xcode does provide some insight, If I click the details button shown in the screenshot I can see the following info:
App installation failed
Domain: com.apple.dtdevicekit
Code: -402620388
Failure Reason: No code signature found.
User Info: {
DVTRadarComponentKey = 487927;
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x000000011d62f6e7 DTDKCreateNSError + 109
1 DTDeviceKitBase 0x000000011d62fde9 DTDK_AMDErrorToNSError + 792
2 DTDeviceKitBase 0x000000011d66f56a __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 164
3 DVTFoundation 0x0000000103ccd156 DVTInvokeWithStrongOwnership + 73
4 DTDeviceKitBase 0x000000011d66f301 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1589
5 IDEiOSSupportCore 0x000000011d4f7a25 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4523
6 DVTFoundation 0x0000000103dfe3ba __DVT_CALLING_CLIENT_BLOCK__ + 7
7 DVTFoundation 0x0000000103dffa92 __DVTDispatchAsync_block_invoke + 809
8 libdispatch.dylib 0x00007fff665c4553 _dispatch_call_block_and_release + 12
9 libdispatch.dylib 0x00007fff665c54de _dispatch_client_callout + 8
10 libdispatch.dylib 0x00007fff665caa9e _dispatch_lane_serial_drain + 597
11 libdispatch.dylib 0x00007fff665cb422 _dispatch_lane_invoke + 363
12 libdispatch.dylib 0x00007fff665d4aa1 _dispatch_workloop_worker_thread + 598
13 libsystem_pthread.dylib 0x00007fff6681e763 _pthread_wqthread + 290
14 libsystem_pthread.dylib 0x00007fff6681e5c3 start_wqthread + 15
);
}
Seems to be a code signing issue, though I don't know why my code signature would've changed...
Okay, so after trying to run to a simulator, Xcode gave me a build time error stating that one of the frameworks I was using wasn't built for the correct architecture... This is because the framework was built for phone architecture not simulator. So I rebuilt the framework, this time for phone and for simulator, and voila it built and installed to the simulator no problem!
I then tried to run it to the phone again and it installed without issue!
So I guess somehow the signature on that framework or something must've been invalid, and rebuilding it fixed the issue.
Not sure if this will help anyone else but I'll leave the answer here just in case.
Hope this will save somebody's life.
You just need to turn on the checkbox in the image - "Code Sign On Copy".
Some time happens to me that Xcode lose the team signature. Go to target settings, Signing & Capabilities ->Team. May be you have a screen, like this:
Click on Team combo box e add you account. That's all
Hope this help.
I'm searching for 5 days ago about this crash, but I can find why my app crash sometimes.
I'm using the Crittercism library to log my crash. The dSYM file is correctly uploaded on the Crittercism website. Here the crash log from Crittercism:
0 libobjc.A.dylib 0x38540626 objc_msgSend + 6
1 UIKit 0x307baaf7 -[_UIModalItemsCoordinator _notifyDelegateModalItem:tappedButtonAtIndex:] + 95
2 UIKit 0x307ba96d -[_UIModalItemAlertContentView tableView:didSelectRowAtIndexPath:] + 749
3 UIKit 0x306c205f -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1079
4 UIKit 0x30774377 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 215
5 UIKit 0x306236f5 _applyBlockToCFArrayCopiedToStack + 317
6 UIKit 0x3059c55b _afterCACommitHandler + 431
7 CoreFoundation 0x2dd532a5 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 21
8 CoreFoundation 0x2dd50c49 __CFRunLoopDoObservers + 285
9 CoreFoundation 0x2dd50f8b __CFRunLoopRun + 731
10 CoreFoundation 0x2dcbbf0f CFRunLoopRunSpecific + 523
11 CoreFoundation 0x2dcbbcf3 CFRunLoopRunInMode + 107
12 GraphicsServices 0x32bc0663 GSEventRunModal + 139
13 UIKit 0x3060716d UIApplicationMain + 1137
14 myApp 0x000c3357 main (main.m:16)
15 libdyld.dylib 0x38a43ab7 start + 3
The thing is: I have many UITableView in my app. But I can't find which one it is.
How do I have to process to debug this crash ? I didn't find some useful information on Apple Developer Center. I try to use the atos command to symbolicate the file, but no useful information. It's exactly the same info than on the Crittercism website.
Here the command I used: atos -arch armv7 -o myApp (to enter interactif mode, then, enter each memory address like : 0x307baaf7)
I have only the myApp.app.dSYM archive, and to use this command (above), I used the file the archive at path: Contents/Resources/DWARF/myApp
I'm really lost. Any idea ? Suggestions ? Thank you so much for your help.
EDIT 1:
I've checked all my UIAletView and delegate of UIAlertView: all is ok.
I see the crash log on Crittercism, (around 120 crashes for 63 users on iOS 7 only, iPhone and iPad).
I can't reproduced it ! I really don't understand.
Frame 14 already shows the correct symbol, which is main.m line 16. Using atos with the address as written in the stackframe like you did is wrong, see this stackoverflow explanation. As such it is not possible for a crash report to tell you which table view is causing such a memory issue.
Based upon the above you may not be able to get the exact table view from the stack trace itself, but with Crittercism there are additional features (such as Breadcrumbs) that allow for capturing a trail beyond just the stack.
My recommendation is to add a breadcrumb in the viewDidLoad of the TableViewController and grab/define the name of the table view there. That way you can step through the breadcrumbs and know that leading up to the crash you were in this tableview.
That should help you for better capturing this scenario in the future.
As for this particular stack trace. You can potentially use the techniques described in this post to help you better understand the true origins of the objc_msgSend.
* See the Kerni's response below in the comments *
I am trying to analyse a crash log that a customer sent me, but I cannot get it to symbolicate the system library calls. It does symbolicate calls to my own methods correctly. That does not make it very practical to analyse what goes wrong.
I have run 'symbolicatecrash -v', to see what is causing the lack of symbolication. The likely cause is this:
## /Users/baraupp/Library/Developer/Xcode/iOS DeviceSupport/6.1.3 (10B329)/Symbols/usr/lib/system/libsystem_kernel.dylib doesn't contain armv7s slice
I have checked the mentioned libraries with 'lipo', which says that they contain 'armv7' but no 'armv7s'. After searching the web, it came out that this is a difference between iPhone 4 and iPhone 5. The normal solution seems to be to plug-in an iPhone 5 device and download the libraries from there. But I don't have an iPhone 5.
Anybody knows how to solve this?
To give you an idea how the symbolication looks like:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3bab0350 0x3ba9f000 + 70480
1 libsystem_c.dylib 0x3ba26fb2 0x3b9f8000 + 192434
2 libsystem_c.dylib 0x3ba63366 0x3b9f8000 + 439142
3 libc++abi.dylib 0x3b00bdda 0x3b008000 + 15834
4 libc++abi.dylib 0x3b009094 0x3b008000 + 4244
5 libobjc.A.dylib 0x3b5bca58 0x3b5b4000 + 35416
6 libc++abi.dylib 0x3b009118 0x3b008000 + 4376
7 libc++abi.dylib 0x3b0091b0 0x3b008000 + 4528
8 libc++abi.dylib 0x3b00a626 0x3b008000 + 9766
9 libobjc.A.dylib 0x3b5bc9b0 0x3b5b4000 + 35248
10 CoreFoundation 0x3380829c 0x337ff000 + 37532
11 CoreFoundation 0x338080c4 0x337ff000 + 37060
12 GraphicsServices 0x373e7336 0x373e2000 + 21302
13 UIKit 0x357242b4 0x356cd000 + 357044
14 Flyskyhy 0x000f8a66 main (main.m:17)
15 Flyskyhy 0x000f8a1c 0xf6000 + 10780
There are only two ways to solve this:
You either need an iPhone 5 device with iOS 6.1.3 to plug into your computer so Xcode can import the symbols
Or you need to get the symbols from another developer and replace yours with them.
Usually the symbols are part of the latest Xcode release, but Apple doesn't always provide Xcode updates when an iOS version only contains bug-fixes but no API changes.
I ran into this issue as well with an iOS7 app using XCode5, even though I had all the correct symbols.
What I found was that I had taken my dSYM file out of the archive where spotlight could index it, but the crashlog was only getting partically symbolicated (as seen in the question). But I had left the actual .app file in an xcarchive, and it was not able to be indexed by spotlight. As soon as I copied that file out of the archive to the visible location, I was able to symbolicate properly.
In following answer of Kerni:
You can install related Xcode with your target version of iOS and copy ~/Library/Developer/Xcode/iOS DeviceSupport/
I am trying to analyse a crash log that a customer sent me, but I cannot get it to symbolicate the system library calls. It does symbolicate calls to my own methods correctly. That does not make it very practical to analyse what goes wrong.
I have run 'symbolicatecrash -v', to see what is causing the lack of symbolication. The likely cause is this:
## /Users/baraupp/Library/Developer/Xcode/iOS DeviceSupport/6.1.3 (10B329)/Symbols/usr/lib/system/libsystem_kernel.dylib doesn't contain armv7s slice
I have checked the mentioned libraries with 'lipo', which says that they contain 'armv7' but no 'armv7s'. After searching the web, it came out that this is a difference between iPhone 4 and iPhone 5. The normal solution seems to be to plug-in an iPhone 5 device and download the libraries from there. But I don't have an iPhone 5.
Anybody knows how to solve this?
To give you an idea how the symbolication looks like:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3bab0350 0x3ba9f000 + 70480
1 libsystem_c.dylib 0x3ba26fb2 0x3b9f8000 + 192434
2 libsystem_c.dylib 0x3ba63366 0x3b9f8000 + 439142
3 libc++abi.dylib 0x3b00bdda 0x3b008000 + 15834
4 libc++abi.dylib 0x3b009094 0x3b008000 + 4244
5 libobjc.A.dylib 0x3b5bca58 0x3b5b4000 + 35416
6 libc++abi.dylib 0x3b009118 0x3b008000 + 4376
7 libc++abi.dylib 0x3b0091b0 0x3b008000 + 4528
8 libc++abi.dylib 0x3b00a626 0x3b008000 + 9766
9 libobjc.A.dylib 0x3b5bc9b0 0x3b5b4000 + 35248
10 CoreFoundation 0x3380829c 0x337ff000 + 37532
11 CoreFoundation 0x338080c4 0x337ff000 + 37060
12 GraphicsServices 0x373e7336 0x373e2000 + 21302
13 UIKit 0x357242b4 0x356cd000 + 357044
14 Flyskyhy 0x000f8a66 main (main.m:17)
15 Flyskyhy 0x000f8a1c 0xf6000 + 10780
There are only two ways to solve this:
You either need an iPhone 5 device with iOS 6.1.3 to plug into your computer so Xcode can import the symbols
Or you need to get the symbols from another developer and replace yours with them.
Usually the symbols are part of the latest Xcode release, but Apple doesn't always provide Xcode updates when an iOS version only contains bug-fixes but no API changes.
I ran into this issue as well with an iOS7 app using XCode5, even though I had all the correct symbols.
What I found was that I had taken my dSYM file out of the archive where spotlight could index it, but the crashlog was only getting partically symbolicated (as seen in the question). But I had left the actual .app file in an xcarchive, and it was not able to be indexed by spotlight. As soon as I copied that file out of the archive to the visible location, I was able to symbolicate properly.
In following answer of Kerni:
You can install related Xcode with your target version of iOS and copy ~/Library/Developer/Xcode/iOS DeviceSupport/