简体   繁体   English

如何从BugSense中混合iOS崩溃报告?

[英]How to sybolicate iOS crash reports from BugSense?

I am beginning to receive crash reports from my iOS app via BugSense . 我开始通过BugSense从我的iOS应用程序收到崩溃报告。 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: * - [NSMutableArray objectAtIndex:]:索引0超出空数组的边界”以及堆栈跟踪,例如:

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? 如何从Bugsense获取报告数据并执行此操作? 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? 有没有办法从BugSense下载“常规”崩溃报告并使用它,或者他们提供的数据是否足以以某种方式解决? 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的工作原理是获取设备上的符号并将其发布到服务器上,其格式与您在崩溃日志中看到的格式类似。 BugSense gets the exception stacktrace and when it can't find one, the crashed thread stacktrace. BugSense获取异常堆栈跟踪,当它找不到时,崩溃的线程堆栈跟踪。 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. 看起来BugSense在您自己的代码中获取符号时出现问题。

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. atos应该可以帮助您发现代码中的确切方法调用。

Disclaimer: I write the code for BugSense-iOS.framework. 免责声明:我为BugSense-iOS.framework编写代码。

If you have a free BugSense account, it wont Symbolicate the crash reports for you. 如果您有免费的BugSense帐户,它将不会为您提供崩溃报告。 However you can pay $19/month to enable this feature. 但是,您可以支付每月19美元来启用此功能。 Alternatively you can try use this python script I wrote. 或者你可以尝试使用我写的这个python脚本。

https://github.com/dr4ke616/Bugsense-Symbolicater https://github.com/dr4ke616/Bugsense-Symbolicater

You could also try symbolicating with Crittercism . 你也可以尝试用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: 我在Ray Wenderlich网站上找到了一个教程:

http://www.raywenderlich.com/33669/overview-of-ios-crash-reporting-tools-part-1 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 >.<). 我一直在以错误的方式使用Bugsense(没有符号和面包屑>。<)。

Note: breadcrumb is for the rather expensive version. 注意:breadcrumb是相当昂贵的版本。

How to upload dSYM to Bugsense website to symbolicate stacktrace 如何将dSYM上传到Bugsense网站以表示堆栈跟踪

Anyhow, from the tutorial, I found out I needed to upload the dSYM folder as a zipped file to Bugsense. 无论如何,从教程中,我发现我需要将dSYM文件夹作为压缩文件上传到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: 要获取dSYM文件,您需要:

  1. Right click the archive > Show In Finder from the Window > Organizer screen. 在窗口>管理器屏幕中右键单击存档>在Finder中显示。

  2. Then right click the file > Show packaged contents, this will show you the dSYM folder. 然后右键单击文件>显示打包内容,这将显示dSYM文件夹。

  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". 登录您的bugsense帐户,查找您的应用程序,转到设置页面,左侧应该有一个名为“dSYM”的标签。 Tap on that and then press the Browse & Upload button to upload your dSYM. 点击它,然后按浏览和上传按钮上传您的dSYM。

Now you can go to each of your bug and press the "symbolicate" button, this will turn all those nasty: 现在你可以找到你的每一个bug并按下“symbolicate”按钮,这将变成所有那些讨厌的:

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. 您需要为每次生成应用程序的新捆绑版本时生成的相应存档上载相应的dSYM压缩文件。

Otherwise, if you try to use Bugsense without this dSYM, you'll get a useless stacktrace. 否则,如果您尝试使用没有此dSYM的Bugsense,您将获得无用的堆栈跟踪。

Hope that benefits anyone in the future. 希望将来有益于任何人。 Good luck! 祝好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM