How to sybolicate iOS crash reports from BugSense?
I am beginning to receive crash reports from my iOS app via BugSense. I have included the debug symbols in my app and an getting info on the errors, eg. "* -[NSMutableArray objectAtIndex:]: index 0 beyond bounds for empty array" and also stacktraces such as:
Full Stacktrace
0 CoreFoundation __exceptionPreprocess 114
1 libobjc.A.dylib objc_exception_throw 24
2 CoreFoundation -[__NSArrayM objectAtIndex:] 184
3 Myapp Myapp 738167
4 UIKit -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] 662
5 UIKit -[UITableView _userSelectRowAtPendingSelectionIndexPath:] 130
6 Foundation __NSFireDelayedPerform 368
7 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ 14
8 CoreFoundation __CFRunLoopDoTimer 850
9 开发者_运维百科CoreFoundation __CFRunLoopRun 1088
10 CoreFoundation CFRunLoopRunSpecific 230
11 CoreFoundation CFRunLoopRunInMode 58
12 GraphicsServices GSEventRunModal 114
13 GraphicsServices GSEventRun 62
14 UIKit -[UIApplication _run] 404
15 UIKit UIApplicationMain 670
16 Myap p Myapp 11901
17 Myapp Myapp
However, I want to symbolicate the reports so that I can pinpoint exactly where the bugs are in my code. How can I take the report data from Bugsense and do this? Is there a way to download the "regular" crash report from BugSense and use that, or is the data they provide enough to work off of somehow? I know which version of the app that the reports are coming from so i know which binaries to symbolicate against.
BugSense works by getting the symbols on the device and posting them on the server, in a format similar to what you see in a crash log. BugSense gets the exception stacktrace and when it can't find one, the crashed thread stacktrace. For a variety of reasons, this isn't always perfect.
The stacktrace that you posted is partially symbolicated. It looks like BugSense has a problem getting the symbols in your own code.
If you have followed the usage guide to the letter, it could be a failing of the framework itself. atos should help you discover the exact method calls in your code.
Disclaimer: I write the code for BugSense-iOS.framework.
If you have a free BugSense account, it wont Symbolicate the crash reports for you. However you can pay $19/month to enable this feature. Alternatively you can try use this python script I wrote.
https://github.com/dr4ke616/Bugsense-Symbolicater
You could also try symbolicating with Crittercism. I've been using them for the past month and their symbolification system has been spot on.
Just had to go through this myself today. I found a tutorial on the Ray Wenderlich site:
http://www.raywenderlich.com/33669/overview-of-ios-crash-reporting-tools-part-1
I had been using Bugsense the wrong way (without symbolicate and breadcrumb >.<).
Note: breadcrumb is for the rather expensive version.
How to upload dSYM to Bugsense website to symbolicate stacktrace
Anyhow, from the tutorial, I found out I needed to upload the dSYM folder as a zipped file to Bugsense.
This folder essentially allows the raw stacktrace to symbolicate with which function calls caused the crash, also showing line number.
When you do an archive, you get the archive file in Window > Organizer.
To get the dSYM file, you need to:
Right click the archive > Show In Finder from the Window > Organizer screen.
Then right click the file > Show packaged contents, this will show you the dSYM folder.
Right click and zip that folder up.
Login to your bugsense account, look for your app, go to the settings page and there should be a tab on the left called "dSYM". Tap on that and then press the Browse & Upload button to upload your dSYM.
Now you can go to each of your bug and press the "symbolicate" button, this will turn all those nasty:
0000x1aeaf390a
crash messages to something like:
MyViewController:m110, [MyViewController objectAtIndex:17] out of bounds
You need to upload the respective dSYM zipped file for the respective archive that you generated everytime you generate a new bundle version of your app.
Otherwise, if you try to use Bugsense without this dSYM, you'll get a useless stacktrace.
Hope that benefits anyone in the future. Good luck!
精彩评论