简体   繁体   English

使用Flurry Crash Analytics对iOS 7崩溃报告进行符号化

[英]Symbolicating an iOS 7 crash report using Flurry Crash Analytics

I recently pushed an iOS 7 update for my application and implemented Flurry Analytics with crash reporting enabled. 我最近为我的应用推出了iOS 7更新,并实现了Flurry Analytics并启用了崩溃报告。 I recently noticed some users are experiencing crashes. 我最近注意到一些用户遇到了崩溃。 Using Flurry I can retrieve the stack trace at the moment my app crashed to track down the issue. 使用Flurry我可以在应用程序崩溃时检索堆栈跟踪以追踪问题。
Well, I'm certainly familiar with crash reports and already fixed bugs using them before by getting them from iTunes Connect or mail and simply symbolicating them in Xcode. 好吧,我当然熟悉崩溃报告,并且已经修复了之前使用它们的错误,从iTunes Connect或邮件中获取它们并简单地在Xcode中对它们进行符号化。 I however don't succeed at doing that using Flurry. 然而,我没有成功使用Flurry做到这一点。

What I tried: 我尝试了什么:
When viewing the stack trace on Flurry itself, this is what I get: 在Flurry上查看堆栈跟踪时,这就是我得到的: 乱舞堆栈跟踪 As you can see, a lot of lines are perfectly symbolicated, others are symbolicated to <redacted> . 正如您所看到的,很多线条都是完美的象征,其他线条则被象征为<redacted> Some research learned me that Apple stripped a lot of debug symbols in iOS 6 and 7. 一些研究告诉我Apple在iOS 6和7中剥离了很多调试符号。
First thing I tried was uploading my own dSYM file. 我尝试的第一件事是上传我自己的dSYM文件。 Flurry reported the dSYM file was saved and crash reports were symbolicated again using the dSYM file. Flurry报告已保存dSYM文件,并使用dSYM文件再次对崩溃报告进行符号化。 The stack trace was however still exactly the same as without a dSYM. 然而,堆栈跟踪仍然与没有dSYM完全相同。
No problem, I thought, I could just try to download the crash report and symbolicate it using Xcode. 没问题,我想,我可以尝试下载崩溃报告并使用Xcode对其进行符号化。 Clicking on download gives me a file (without extension, so I renamed it to .crash ) with this content: 点击下载为我提供了一个文件(没有扩展名,所以我将其重命名为.crash ):

Hardware Model:      iPhone3,1
Process:         RadioPlayer [2965]
Path:            /var/mobile/Applications/E4DD7DA6-4450-4538-A1E2-AE23139FAC10/RadioPlayer.app/RadioPlayer
Identifier:      *******
Version:         1.2.0
Code Type:       ARM
Parent Process:  launchd [1]

Exception Type:  SIGSEGV
Exception Codes: SEGV_ACCERR at 0x548a000
Crashed Thread:  2

Thread 0:
0   libsystem_kernel.dylib              0x3aa67a8c _mach_msg_trap + 20
1   CoreFoundation                      0x3015e7cb <redacted> + 154
2   CoreFoundation                      0x3015cf37 <redacted> + 854
3   CoreFoundation                      0x300c7ce7 _CFRunLoopRunSpecific + 522
4   CoreFoundation                      0x300c7acb _CFRunLoopRunInMode + 106
5   GraphicsServices                    0x34da0283 _GSEventRunModal + 138
6   UIKit                               0x32969a41 _UIApplicationMain + 1136
7   RadioPlayer                         0x000dfb9b __mh_execute_header + 23451
8   libdyld.dylib                       0x3a9c3ab7 <redacted> + 2

Thread 1:
0   libsystem_kernel.dylib              0x3aa6783c _kevent64 + 24
1   libdispatch.dylib                   0x3a9a23f3 <redacted> + 38

Thread 2 Crashed:
0   vImage                              0x2f19d7dc <redacted> + 139
1   vImage                              0x2f1874ff _vImageFlatten_RGBA8888 + 378
2   vImage                              0x2f26e799 <redacted> + 40
3   vImage                              0x2f27d7c3 <redacted> + 674
4   vImage                              0x2f27d365 _vImageConvert_AnyToAny + 1300
5   ImageIO                             0x30efd9e7 <redacted> + 858
6   ImageIO                             0x30ef8c3b <redacted> + 2754
7   ImageIO                             0x30ef8173 <redacted> + 102
8   ImageIO                             0x30ef8057 _CGImageDestinationFinalize + 66
9   UIKit                               0x32a8a611 _UIImageJPEGRepresentation + 520
10  MediaPlayer                         0x31435319 -[MPMediaItemArtwork imageDataWithSize:atPlaybackTime:] + 36
11  MediaPlayer                         0x31435387 -[MPMediaItemArtwork albumImageDataWithSize:] + 42
12  MediaPlayer                         0x31494f0d -[MPNowPlayingInfoCenter _pushNowPlayingInfoAndRetry:] + 824
13  libdispatch.dylib                   0x3a99ed7b <redacted> + 10
14  libdispatch.dylib                   0x3a99f2f3 <redacted> + 378
15  libdispatch.dylib                   0x3a99f75b <redacted> + 38
16  libdispatch.dylib                   0x3a9b18f9 <redacted> + 76
17  libdispatch.dylib                   0x3a9b1b79 <redacted> + 56
18  libsystem_pthread.dylib             0x3aae0dbf __pthread_wqthread + 298
19  libsystem_pthread.dylib             0x3aae0c84 _start_wqthread + 8


// The file continues like this listing the other threads and overview of binary images.
// I however didn't paste that part here since I don't think it's useful.

I now tried both simply dragging this file into the Xcode organizer and importing device logs. 我现在尝试将这个文件拖放到Xcode组织器并导入设备日志。 Both did simply nothing. 两者都没有做到。 There didn't appear a new device log in the list or anything else. 列表中没有出现新设备日志或其他任何内容。
Next step: trying to symbolicate the crash log manually using atos . 下一步:尝试使用atos手动表示崩溃日志。 I copied the content of the dSYM to the working directory etc and then tried this command 我将dSYM的内容复制到工作目录等,然后尝试了这个命令

xcrun atos -arch armv7 -o RadioPlayer 0x31435387`

This returned 0x31435387 . 这返回0x31435387 I tried some other memory addresses and the output was each time just the memory address itself. 我尝试了一些其他内存地址,输出每次只是内存地址本身。

Can anybody please help me with this issue? 有人可以帮我解决这个问题吗? I would really love to symbolicate these <redacted> symbols since it would certainly help me to fix the bug that leads to those crashes. 我真的很想象征这些<redacted>符号,因为它肯定会帮助我修复导致这些崩溃的错误。 Thanks! 谢谢!

I noticed that in order to be able to drag the Flurry crash report to XCode Organizer you need to: 我注意到为了能够将Flurry崩溃报告拖到XCode Organizer,您需要:

  1. Rename the file to .crash 将文件重命名为.crash
  2. Add an incident identifier line at the top of the report. 在报告顶部添加事件标识符行。 This looks like a GUID so you can put anything unique or generate one online , eg 这看起来像一个GUID,因此您可以放置​​任何唯一的或在线生成一个 ,例如

    Incident Identifier: D1D6CA1F-EC87-4677-9366-401BE050B2C8 事件标识符:D1D6CA1F-EC87-4677-9366-401BE050B2C8

  3. Add iOS and Crash Report version lines (just above the Exception Type), eg 添加iOS和崩溃报告版本行(在例外类型上方),例如

    OS Version: iOS 7.1.1 (11D201) 操作系统版本:iOS 7.1.1(11D201)

    Report Version: 104 报告版本:104

  1. <redacted> is an iOS optimization for system symbols only. <redacted>是仅针对系统符号的iOS优化。
  2. Uploading your app dSYM doesn't change a thing, since that only contains the app symbols, not the iOS system symbols of the required cpu architecture. 上传您的应用程序dSYM不会改变任何东西,因为它只包含应用程序符号,而不是所需cpu体系结构的iOS系统符号。
  3. To symbolicate those locally you need to have the exact system symbols or the iOS version and architecture that created the crash. 要在本地表示符号,您需要具有确切的系统符号或创建崩溃的iOS版本和体系结构。
  4. Using atos to symbolicate a system symbol with your app binary/dSYM doesn't work (as mentioned above) 使用atos到symbolicate系统符号与您的应用程序二进制/的dSYM不起作用(如上所述)
  5. Getting a symbol by only passing in the address in the stack frame, never works, you also need to pass the load address of the corresponding binary (which can be found in the binary images section, the first address in the line of the binary) 通过仅传递堆栈帧中的地址来获取符号,从不起作用,您还需要传递相应二进制文件的加载地址(可以在二进制图像部分中找到,二进制文件行中的第一个地址)
  6. In your atos example you are trying an address which already shows proper symbols in the stack trace. 在您的atos示例中,您正在尝试一个已在堆栈跟踪中显示正确符号的地址。
  7. Dragging the crash report into the Xcode organizer should already symbolicate the report if you have the symbols available and you won't have to do the manual steps. 如果您有可用的符号,则将崩溃报告拖动到Xcode组织器中应该已经对报告进行了符号化,您不必执行手动步骤。
  8. It looks like that Flurry doesn't have the iOS symbols on their server to resolve those symbols themselves. 看起来Flurry的服务器上没有iOS符号来自行解析这些符号。

So an example for 0x3a99ed7b of the libdispatch.dylib library would be: 因此,对于一个例子0x3a99ed7b的的libdispatch.dylib库将是:

xcrun atos -arch armv7 -o PathToLibrary -l LoadAddressOfLibrary 0x3a99ed7b

The root path for the iOS symbols on your Mac is: ~/Library/Developer/Xcode/iOS DeviceSupport/` with a subdirectory for each iOS version. Mac上iOS符号的根路径是:〜/ Library / Developer / Xcode / iOS DeviceSupport /`,每个iOS版本都有一个子目录。

So the simple solution: drag the crash report into the Device Logs entry in the Xcode organizer and hope you have everything required. 因此,简单的解决方案是:将崩溃报告拖到Xcode组织器的“ Device Logs条目中,并希望您拥有所需的一切。 If that doesn't remove at least some of the <redacted> strings, you are missing the iOS symbols and the manual steps won't work either. 如果这不能删除至少一些<redacted>字符串,则缺少iOS符号,手动步骤也不起作用。

这对我的乱跑日志起作用http://ipartymobile.com/how-to-find-your-bug-from-ios-crash-logs/没有为崩溃报告添加任何内容,只需占用内存地址并插入格式为“xcrun atos -arch armv7 -o MyApp 0x0000000”

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

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