3

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.

Jason
  • 14,517
  • 25
  • 92
  • 153
  • 2
    [Symbolicating iPhone APP Crash Reports](http://stackoverflow.com/questions/1460892/symbolicating-iphone-app-crash-reports) Take a look at the atos solution in their also for one-offs. – Joe Oct 06 '11 at 14:00
  • Thanks for the suggestion. I have tried to use `atos` but have received the following error message: "atos cannot load symbols for the file MyApp.app.dSYM for architecture armv7" – Jason Oct 06 '11 at 14:34
  • 2
    So in my situation I revealed my app archive in finder, then navigated into the .xarchive file in terminal. Then I go into the Products/Applications dir and type `atos -arch armv7 -o MyApp.app/MyApp` Now this will put you in interactive mode and you can then just type the address 0x738167 – Joe Oct 06 '11 at 15:46
  • What version of Xcode/iOS are you developing with? – Nick Toumpelis Nov 18 '11 at 09:25

4 Answers4

4

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.

Nick Toumpelis
  • 2,717
  • 22
  • 38
3

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

dr4ke616
  • 101
  • 4
2

You could also try symbolicating with Crittercism. I've been using them for the past month and their symbolification system has been spot on.

GregP
  • 21
  • 1
0

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:

  1. Right click the archive > Show In Finder from the Window > Organizer screen.

  2. Then right click the file > Show packaged contents, this will show you the dSYM folder.

  3. Right click and zip that folder up.

  4. 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!

Zhang
  • 11,549
  • 7
  • 57
  • 87