As you can tell from the title, I am in a sticky situation where my App is crashing after performing a specific test. The test is as follows:
install App on iPhone 7
transfer iCloud profile to iPhone X
launch App (app will show splash screen and fail)
I was able to recuperate the .crash data from the iPhoneX however the data isnt very useful as the calls being made are all in hex. I am aware you can try to analyze the data through atos as well as other tools from this help link however it seems you always need the dSYM for most of the cases. I have the original .app and .ipa that was used to publish the app however there are no .dSYM files on the build machine. (I believe by default Apple has it set to build DWARF without dSYM)
Is there any way I can put the data from my .crash file to good use? The file is completely unsymbolicated.
(As a side note, a way to get out of the App crashing at launch after doing the iCloud transfer is to uninstall and reinstall the app from the App store. Not fun for an end user)
Snippet of the crash:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Filtered syslog:
None found
Thread 0 name: tid_303 Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000183f202e8 __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000184039748 pthread_kill$VARIANT$armv81 + 360
2 libsystem_c.dylib 0x0000000183e8efbc abort + 140
3 MyApp 0x0000000105ad4de8 0x104be8000 + 15650280
Is there any way I can put the data from my .crash file to good use without DSYM ?
No, it is impossible.
DSYM file stores all the debug symbols, with it we can find the corresponding function name via the memory address(in crash file) which leads to crash.
Related
I got a crash report from Apple and symbolicated it following this document, but I still didn't understand the report.
First, I tried below "XCode approach" to symbolicate the report:
Connect an iOS device to your Mac
Choose "Devices" from the "Window" menu
Under the "DEVICES" section in the left column, choose a device
Click the "View Device Logs" button under the "Device Information" section on the right hand panel
Drag your crash report onto the left column of the presented panel
Xcode will automatically symbolicate the crash report and display the results
Before that, I downloaded dSYM files from App Store by 'Organizer' and copied them into a separated folder. But all the symbolicated names looked like this:
5 Recycling 0x10103b464 fb1UCM8vZCiE + 355
6 Recycling 0x1010431d4 fbkUVUzGnhkS + 1655
7 Recycling 0x101038a78 fbIiaWxkoUb6 + 307
And then, I tried the approach from this blog, but the problem remained:
{"app_name":"Recycling","timestamp":"2020-02-08 00:00:51.02 +0800","app_version":"1.7.3","slice_uuid":"20cdeb29-1f14-3298-9649-503635ded968","adam_id":1406292831,"build_version":"3","bundleID":"com.qdjzd.Recycling","share_with_app_devs":true,"is_first_party":false,"bug_type":"109","os_version":"iPhone OS 13.3.1 (17D50)","incident_id":"36AEED5C-F4AD-4711-926E-783D4783039E","name":"Recycling"}
Incident Identifier: 36AEED5C-F4AD-4711-926E-783D4783039E
CrashReporter Key: 665569f89a7cca0567f04077cd6e5757ddeffea5
Hardware Model: xxx1
Process: Recycling [6029]
Path: /private/var/containers/Bundle/Application/0A62AE5B-BE91-4A30-8CB5-A6137DE9DCC1/Recycling.app/Recycling
Identifier: com.qdjzd.Recycling
Version: 3 (1.7.3)
AppStoreTools: 11C29
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.qdjzd.Recycling [1787]
Date/Time: 2020-02-08 00:00:50.8368 +0800
Launch Time: 2020-02-08 00:00:22.0052 +0800
OS Version: iPhone OS 13.3.1 (17D50)
Release Type: User
Baseband Version: n/a
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 11
Last Exception Backtrace:
0 CoreFoundation 0x1abab8a48 0x1ab98d000 + 1227336
1 libobjc.A.dylib 0x1ab7dffa4 0x1ab7da000 + 24484
2 CoreFoundation 0x1ab9c0e34 0x1ab98d000 + 212532
3 CoreServices 0x1ac1232d8 0x1ac056000 + 840408
4 Foundation 0x1abd736f8 0x1abd69000 + 42744
5 Recycling 0x10103b464 fb1UCM8vZCiE + 355
6 Recycling 0x1010431d4 fbkUVUzGnhkS + 1655
7 Recycling 0x101038a78 fbIiaWxkoUb6 + 307
8 libsystem_pthread.dylib 0x1ab7d3d8c 0x1ab7c9000 + 44428
9 libsystem_pthread.dylib 0x1ab7d776c 0x1ab7c9000 + 59244
Can anyone help me?
In Xcode 10 you can follow these steps:
Inside Organizer, locate the archive where the app is based on.
Click on the Download Debug Symbols button. Nothing will appear in your Downloads folder, but that's OK.
Connect the build machine to an iOS device.
Select the device in Devices and Simulators.
Click on the View Devices Logs button.
Drag-and-drop the crash file to the left panel. The file must end with a .crash extension, otherwise the drag fails.
Switch to the All Logs tab.
Select the added crash file.
The file should automatically symbolicate, otherwise use the right-click context menu item Re-Symbolicate Log.
Thanks for everyone! I finally resolved this problem by myself.
The reason is that I used a 3rd-party library named UMCCommon with version 1.5.3, and all of its symbols are obfuscated, so I can not understand.
I have implemented an application which uses PLCrashReporter as Crash handling method.
and it retrieves a report which can be switched to human readable format.
Incident Identifier: E125648C-6BCF-4F69-9950-C8CDFB0535D3
CrashReporter Key: e681450ca18f97638adb5f7295a4af24103b92ae
Hardware Model: iPad5,4
Process: CrashReport [6918]
Path: /private/var/mobile/Containers/Bundle/Application/FA6CA909-C229-457F-9EF0-35B889481B63/CrashReport.app/CrashReport
Identifier: net.example.CrashReport
Version: 1 (1.0)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2016-05-15 16:40:51.199 +0430
Launch Time: 2016-05-15 16:40:44.122 +0430
OS Version: iOS 8.4.1 (12H321)
Report Version: 105
Exception Type: EXC_CRASH (SIGTRAP)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 1
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 CrashReport 0x00000001000663a4 0x100060000 + 25508
1 CrashReport 0x00000001000662ac 0x100060000 + 25260
2 CrashReport 0x0000000100066304 0x100060000 + 25348
3 UIKit 0x0000000187b411e8 0x187afc000 + 283112
with all details about the application and Hardware model , but No Line or class name!
I have searched a lot and find out the i have to use symbolication process.
some told to use .dSYM , but the application is not yet on the apple store
some other solution was to work with report.crash and something like that but I couldn't find this file in my application
I want the lines of code to be sent from the application , not to handle it from XCode or some other tools
in final:
I need some codes to extract line number and functions from PLCrashReport , please use Swift. I am not very good at Objective C.
Thanks
You need to symbolicate the crash report, e.g. by using the same tool that Xcode uses which is symbolicatecrash.pl. There are a lot of discussions here that are referencing this, the following link provides one of the many answers that cover this: How to Manually Symbolicate iOS Crash to View Crash Logs
Also you need the exact dSYM that was created with the build that caused the crash, without the dSYM the above mentioned tool can not provide any useful data and especially can not provide you class names, method names, file names or line numbers. The dSYM is generated every time you build the app in Xcode. It has nothing to do with the App Store. Check the build folder where you find the app package. If you don't see it, then you changed the build settings. The following page shows the build setting you need to have enabled: https://support.hockeyapp.net/kb/client-integration-ios-mac-os-x-tvos/how-to-solve-symbolication-problems#build-settings-for-getting-proper-symbol-data
It is not possible to get line numbers directly from your application, as the binary doesn't provide the necessary information at any time. You need to symbolicate the crash report with the above mentioned tool and the above mentioned dSYM to get line numbers.
As it is not possible to get line numbers only using your apps binary, it is also not possible to get them at runtime. Hence it doesn't matter if you code something in Swift or Objective-C, it doesn't matter.
I've took the following crash report from the iTunes Connect:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0
0 CoreFoundation 0x3226629e __exceptionPreprocess + 158
1 libobjc.A.dylib 0x39f0097a objc_exception_throw + 26
2 CoreFoundation 0x321b08d4 -[__NSArrayM insertObject:atIndex:] + 764
3 *** MYAPP *** 0x0001d994 0x00011000 + 51604
4 *** MYAPP *** 0x0001cfb6 0x00011000 + 49078
How to build the application with debug symbols that iTunes Connect will symbolicate automatically?
I'm not an expert but...
To see methods in a crash report your machine needs to have a table of symbols from the app.
Did you build the app in Xcode on your Mac?
I believe there's a DSYM (debugger symbols) file generated when you build that holds a table of the symbols so that you can open a crash report in the Xcode > Organiser and see the addresses symbolicated to objects to get a better sense of what is happening.
This is all off the top of my head so [citation needed] but the short version is you need the symbol files. If you didn't build the app on your Mac then that;s why you're missing object names.
Heres a link to Debugging Deployed iOS apps guide.
And one to the parent with all the debug info
My app is in App Store so that means my app has passed Apple's review but when my friend install and download the app she couldn't even see the splash screen and it crashed right after she tapped the app icon. What can be the reason for this problem?
EDIT:
Here is the meat of your crash log. Based on the error it appears that #ThomasW and #rahul-vyas are correct that the deployment target inside your Build Settings is likely set to iOS6.x. I would recommend checking both the Target and the Project settings to make sure they're set to iOS5.1.
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x00000001, 0xe7ffdefe
Crashed Thread: 0
Dyld Error Message:
Symbol not found: _objc_setProperty_nonatomic_copy
Referenced from: /var/mobile/Applications/B4F5424C-1593-4150-9AD0-6CF3FE3BD3E5/TubeNoStop.app/TubeNoStop
Expected in: /usr/lib/libobjc.A.dylib
Dyld Version: 199.6
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 dyld 0x2fe2a080 dyld_fatal_error + 0
1 dyld 0x2fe2cefc dyld::halt(char const*) + 72
2 dyld 0x2fe2cfda dyld::fastBindLazySymbol(ImageLoader**, unsigned long) + 214
3 libdyld.dylib 0x36aa83ec dyld_stub_binder + 12
Have your friend install this: iPhone Configuration Utility 3.6.2 for Windows
She can use that to email the crash report to you. Then import the crash report into the organiser in xcode, and "symbolicate" it to find where it crashed.
But before doing any of that, run it in the iOS 5.1 Simulator in Xcode. Chances are it will crash there too. If you don't have the 5.1 simulator you can install it from settings (it uses a couple GB of disk space)
I have a problem in understanding some things about these two crash reports that I get from Apple:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x617401fa
Crashed Thread: 0
0 app 0x0017c0ca Json::parse(int, JSON_value_struct const*) + 378
1 app 0x0017bf46 Json::parse(void*, int, JSON_value_struct const*) + 2
2 app 0x001302d2 JSON_parser_char + 2070
3 app 0x0017bb58 Json::parse(std::string const&) + 356
4 app 0x0008e682 NotificationData::ProcessNotifications(std::vector<UserEvent, std::allocator<UserEvent> >&) + 1062
5 app 0x00106aea SMS::CheckNotifications() + 106
6 app 0x001073dc SMS::update(Rex::TimeData const&) + 936
7 app 0x00192c7e SceneManager::updateTick(TimeData const&) + 314
8 app 0x001685ae Core::onRender(TimeData const&) + 522
and
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0xffff0202
Crashed Thread: 0
0 app 0x0017c0ca 0x1000 + 1552586
1 app 0x0017bf46 0x1000 + 1552198
2 app 0x001302d2 0x1000 + 1241810
3 app 0x0017bb58 0x1000 + 1551192
4 app 0x0008e682 0x1000 + 579202
5 app 0x00106aea 0x1000 + 1071850
6 app 0x001073dc 0x1000 + 1074140
7 app 0x00192c7e 0x1000 + 1645694
8 app 0x001685ae 0x1000 + 1471918
Some facts first: the first is said to occur 40% of the time and the second time 35%. If this is true it's quite a good thing for me.
My reasoning based upon what I read about this stuff is that they are one and the same because the memory adresses of the functions are exactly the same, just the KERN_INVALID_ADDRESS at 0x617401fa and KERN_INVALID_ADDRESS at 0xffff0202 differ, which would be expected because the function was writting some corrupt file on disk
My first question is why do the crash reports sometime come symbolicated (or partially symbolicated) and other times not? (I just got into analyzing them and our build system wasn't saving the dSYM files generated for each build so I can't do much thing about symbolicating the second one)
The second one is how is it possible for a crash report to come symbolicated from the user? As I looked into the project , the settings for the released build are like this: the GCC_GENERATE_DEBUGGING_SYMBOLS is set to NO for ALL_BUILDS and and the target application level debug_information is set to dwarf with dSYM file and generate debug symbols is set to No. ( Side question: When it is built with these settings there is no dSYM generate but if I magically set the GCC_GENERATE_DEBUGGING_SYMBOLS to true from cMake(...) the dSYM is generated. As I read target level settings override build level settings)
Sorry for the long post, it's my first one.
Regarding the facts: it is 40% of the crashes that iTunes gets! That is by far not all crashes your app has. iTunes Connect only shows crashes from devices, where the user did approve sending anonymous usage data when setting up the device (since iOS 5 can be changed deep in the settings app later on). And only a fraction of users enable that, since they don't want to be tracked. On systems pre iOS5 crash reports are also only send once the device gets synced with iTunes.
So in a nutshell: Crash Reports on iTunes Connect do not give you a real view on crash reports. Here an example blog post about this fact from the Camera+ developers: http://taptaptap.com/blog/cameraplus-2-3-1-available-attack-of-the-crashinator/
Those two crash reports are identical, you are correct.
Question 1: All crash reports on the device are send to Apple not symbolicated. The symbolication happens on Apple's servers. And since they still get a damn lot of crash reports (even though only a fraction of what really happens) they only symbolicate 1 report per group to reduce load on their servers.
The symbolication of the second one would show the same result as the first one, since the memory addresses are identical.
Question 2: Apple uses the symbols from the app binary if they are not stripped from it. They don't use the dSYM nor do they have or want it. Disadvantage of this way: you don't get line numbers and the binary executable is 30-50% larger. The relevant build setting is COPY_PHASE_STRIP. I assume that is set to NO in your case.
Regarding settings level: select the project in Xcode, then the target, View the build settings not as Combined but as Levels. The value on the far left (Resolved column) is the one being used. If you are using build settings in .xcconfig files, they are usually set per build configuration on project level, target overwrites these if set differently.