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.
Related
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.
I've read numerous threads on stackoverflow and on apple site and I still cannot get basics to work. I make a debug build of my app, I install it on my phone, this build intentionally crashes. I run this app while not connected with Xcode debugger. The app crashes, how do I see now function names and line numbers of the crash backtrace?
I tried to open devices windows in Xcode and there Iviewed the log, I see my app crashlog, I see that there were multiple function calls in my code before it crashed, but all of them are shown as hex addresses and not actually symbolicated. What do I need to do to make it work?
Open Project Settings. Go to your Target and set the Debug Information Format to DWARF with dSYM File for Debug. Do the same for the Project
Project:
Target:
Xcode will symbolicate the crash report, which can take a few seconds, only if you still have the matching symbols of the build that triggered the crash. If the symbol exists simply wait a bit and the crash report will update.
If you in the meantime changed some code and triggered a new build, then the build and symbol files will be overwritten and get a new UUID (per CPU architecture). That UUID is part of the crash report (Binary Images section) and used to find the matching symbol file on your Mac. If that isn't found, then symbolication can not work.
Could it be you are using an invalid character in your project name?
I had this same problem with seeing the hex and not the actual function names. Turns out the issue was a unicode character in my Apps name "➕". I removed it and then the subsequent crash logs in xcode would show the function calls correctly.
Any solution for this. I am having exactly this problem. I build, run it on my iPad, stop execution, and then manually start the app on the iPad. It crashes, I go to the Device Logs, and the crash is there but it won't symbolicate:
0 CoreFoundation 0x1b0d035ac __exceptionPreprocess + 220
1 libobjc.A.dylib 0x1c4d7d42c objc_exception_throw + 59
2 CoreFoundation 0x1b0c0c1b4 +[NSException raise:format:arguments:] + 99
3 Foundation 0x1b1f6a7bc -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 131
4 xxxxxxxxxxxxxxx 0x102f6c2d4 0x102f64000 + 33492
5 xxxxxxxxxxxxxxx 0x102f6c23c 0x102f64000 + 33340
6 xxxxxxxxxxxxxxx 0x102f76754 0x102f64000 + 75604
7 xxxxxxxxxxxxxxx 0x102f764ac 0x102f64000 + 74924
8 xxxxxxxxxxxxxxx 0x102f76f40 0x102f64000 + 77632
9 xxxxxxxxxxxxxxx 0x102f83fa0 0x102f64000 + 130976
There are no Unicode characters in my app name (which isn't really xxxxxxx).
I have an app which occasionally kicks users out after they've logged in and had it minimized for a few hours. It happens randomly with no preference for a specific device or os version. Here's the bugsense crash log
Error Message
data parameter is nil
Where
0x84000 +
Short Stacktrace
0 CoreFoundation 0x2e7cee83 + 130
1 libobjc.A.dylib 0x38b2b6c7 objc_exception_throw + 38
2 CoreFoundation 0x2e7cedc5 + 0
3 Foundation 0x2f156be7 + 66
4 MEMetrics 0x0009820d 0x84000 + 82445
5 Foundation 0x2f10947f + 54
Affected App Versions
2.0
Affected SDKs
7.0.4
Details (last occurence of error)
OS iOS 7.0.4
App Version 2.0
Device iPhone5,3
Country US
wifi_on 1
user_id user6#test.com
locale en_US
sdk_version 3.4
mobile_net_on 0
jailbreak 0
log_data {u'ms_from_start': 42804}
internal_version 2.0
carrier Verizon
build_uuid 5310A8F9-6F2B-3D2D-B7E8-9C5F9621FF3C
gps_on 1
execname MEMetrics
It seems to appear in no specific file.
You can make sense of these lines by uploading DSYM files in the Bugsense settings for a project.
Try going to a Project then Settings -> DSYMs (Here it explains how
you should zip and upload a DSYM file from an xarchive)
These are symbol definition files that help a crash report generator understand the lines of code that correspond to the information coded in that report. Upload latest DSym files each time you upload a binary for distribution or to app store (At least that is what I do, if someone knows of a better way or frequency on which we should upload these files please let us know)
Very often crash appears with following stack:
0x000cc1c8 NR_timeElapsedInMilliSeconds in NRTimer.m on Line 54
0x000f70ea +[NewRelic noticeNetworkRequestForURL:withTimer:responseHeaders:statusCode:bytesSent:bytesReceived:responseData:andParams:] in NewRelic.m on Line 93
0x000cfd7a __41-[NRURLProtocol handleDidReceiveResponse]_block_invoke in NRURLProtocol.m on Line 431
Please can you assist
It seems very likely that this issue is resolved by an update of the New Relic for Mobile Apps iOS SDK. We realize this isn't great news, because updating your app is non-trivial. However, this does look like an issue that is fixed in our most recent agent version: https://docs.newrelic.com/docs/releases/ios
The first step would be to verify that you've got the latest version of the New Relic for Mobile Apps iOS SDK. After that, you'll probably need to get in touch at support.newrelic.com. For a crash like this one, New Relic will ask for the following information (I'm happy to let you know what information New Relic will probably need to investigate, but I don't think all this info is necessarily appropriate to post publicly, so do use a support ticket at support.newrelic.com):
1) I'd like to get a sense of the scope of this issue: was it reported for a single user, multiple users, or is this consistent and replicable in your development environment?
2) A crash log with symbols is helpful for initial troubleshooting, and several third party error reporting services (Crashlytics, TestFlight, Airbrake, etc.) will provide useful stack traces. Please paste any stack traces if you have them. If you're using Apple's crash reports service, you can do the following:
Log in to https://itunesconnect.apple.com
Go to "Manage Your Applications"
Choose your application by clicking on its name
Click the "View details" button under the Versions table
Click "Crash Reports" link
If you don't see any reports, press "refresh"
3) If this can be replicated in your dev environment, I'd like to run some logging from the New Relic for Mobile Apps iOS SDK during the crash. Turn up the logging level in the app by adding this method call before calling startWithApplicationToken:
[NRLogger setLogLevels:NRLogLevelALL];
To make this change take effect, hit “Run” in Xcode and let the iOS Simulator launch. Copy and paste the entire contents of the simulator or device console output while running the app. (press Shift-Command-C to show the debug console in Xcode).
4) Also, please attach your AppDelegate.m to this ticket so that we can take a closer look at how you’ve implemented the New Relic agent in your app. You can find the location of the file by selecting it in the application's project in Xcode, then choosing File > Show in Finder.
5) Finally, please include a permalink to the where the app is reporting to the New Relic user interface. To create a permalink to any page within the New Relic user interface, scroll to the bottom and click 'Permalink ∞' all the way on the right next to 'Kiosk Mode.' This will show us the exact page and time period that you are observing.
#Toby_New_Relic, please find answers below
1) It reproduces not just on one device. As I see it is only iPhone 5S.
2) Stack:
2 libsystem_platform.dylib 0x38284722 _sigtramp
3 libsystem_pthread.dylib 0x38289a52 pthread_kill
4 libsystem_c.dylib 0x381d302c abort
5 libsystem_c.dylib 0x381b2c6a __assert_rtn
6 MyApp 0x000bd760 NR_timeElapsedInMilliSeconds in NRTimer.m on Line 54
7 MyApp 0x000e8682 +[NewRelic noticeNetworkRequestForURL:withTimer:responseHeaders:statusCode:bytesSent:bytesReceived:responseData:andParams:] in NewRelic.m on Line 93
8 MyApp 0x000c1312 __41-[NRURLProtocol handleDidReceiveResponse]_block_invoke in NRURLProtocol.m on Line 431
9 MyApp 0x000e0c78 __NR__dispatch_async_block_invoke in NRGCDOverride.m on Line 38
10 libdispatch.dylib 0x381570c2 _dispatch_call_block_and_release
11 libdispatch.dylib 0x3815c7d8 _dispatch_root_queue_drain
12 libdispatch.dylib 0x3815c9c4 _dispatch_worker_thread2
13 libsystem_pthread.dylib 0x38286dfe _pthread_wqthread
14 libsystem_pthread.dylib 0x38286cc3 start_wqthread
3) I can't replicate this issue on dev env
4)
I just added to pch
#import <NewRelicAgent/NewRelic.h>
and to application:didFinishLaunchingWithOptions:
[ NewRelicAgent startWithApplicationToken: <APPLICATION_TOKEN> ];
5) Permalink
https://rpm.newrelic.com/accounts/47982
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)