如何使用Apple提供的崩溃报告等代码生成崩溃报告 [英] how to generate crash report using code like crash report provided by Apple

查看:116
本文介绍了如何使用Apple提供的崩溃报告等代码生成崩溃报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为Symbolicate iOS Crash生成崩溃报告以查看崩溃日志,所以我想使用代码获取崩溃报告,目前我只得到:

i want to generate crash report for Symbolicate iOS Crash to View Crash Logs,so i want to get the crash report using code,at present i only get :

* - [__ NSArrayM objectAtIndex:]:索引121超出界限[0 .. 23]

* -[__NSArrayM objectAtIndex:]: index 121 beyond bounds [0 .. 23]

 Application received signal SIGSEGV

( 

  0   CoreFoundation                      0x3120e2bb  + 186
  1   libobjc.A.dylib                     0x38f2b97f objc_exception_throw + 30
  2   CoreFoundation                      0x3120e1c5  + 0
  3   myshine                             0x001f9f51 myshine + 1503057
  4   libsystem_c.dylib                   0x393a9e8b _sigtramp + 34
  5   myshine                             0x000ac985 myshine + 137605
  6   myshine                             0x000ac35d myshine + 136029
  7   CoreFoundation                      0x311ab7cf  + 74

)

 not have 

/ 1: Process Information
  Incident Identifier: 30E46451-53FD-4965-896A-457FC11AD05F
  CrashReporter Key:   5a56599d836c4f867f6eec76afee451bf9ae5f31
  Hardware Model:      iPhone4,1
  Process:         Rage Masters [4155]
  Path:            /var/mobile/Applications/A5635B22-F5EF-4CEB-94B6-FE158D885014/Rage      Masters.app/Rage Masters
  Identifier:      Rage Masters
  Version:         ??? (???)
  Code Type:       ARM (Native)
  Parent Process:  launchd [1]

 / / 2: Basic Information
Date/Time:       2012-10-17 21:39:06.967 -0400
OS Version:      iOS 6.0 (10A403)
Report Version:  104

// 3: Exception
Exception Type:  00000020
Exception Codes: 0x000000008badf00d
Highlighted Thread:  0

我想要得到相同的报告

推荐答案

所以你想编写自己的崩溃记者,这样你就可以得到报告并对它们进行符号化?

So you want to write your own crash reporter so you can get the reports and symbolicate them?

编写崩溃报告非常困难,请参阅开源库开发人员的这两篇文章 PLCrashReporter 了解所涉及的内容: http://landonf.bikemonkey.org/code/objc/Reliable_Crash_ Reporting.20110912.html http://landonf.bikemonkey。 org / code / crashreporting / Reliable_Crash_Reporting_1.1.20130119.html

Writing crash reports is very very hard, see these two articles from the developer of the Open Source library PLCrashReporter to get an idea what is involved: http://landonf.bikemonkey.org/code/objc/Reliable_Crash_Reporting.20110912.html and http://landonf.bikemonkey.org/code/crashreporting/Reliable_Crash_Reporting_1.1.20130119.html

简而言之:


  • 所有代码必须是异步安全的。这意味着您可以使用任何Objective-C代码。大多数C方法也不是异步安全的。

  • 一旦发生崩溃,你可以(基本上)不分配新内存。

  • All code must be async-safe. That means you can NOT use any Objective-C code. Most of the C methods are also not async safe.
  • You can (basically) not allocate new memory once a crash occurred.

您要求的所有细节以及尚未被要求撰写此类记者的详细信息都需要写出超出答案范围的信息。

All the details you are asking and the ones that are not yet asked to write such a reporter would require to write way more than could fit in an answer.

请不要自己写,自己安全一些麻烦。那里有很多随时可用的解决方案。有些是开源的,如果它们对上述规则是安全的,可以进行验证,有些是封闭源代码,不能轻易验证(上面的文章详细介绍了其中一些)。

Just don't write it yourself and safe yourself some trouble. There are plenty of ready to use solutions out there. Some are Open Source and can be validated if they are safe to the above rules, some are closed source and cannot be easily validated (The articles above do go into details for some of them).

我不会就各种解决方案提出任何建议,因为我有偏见,因为我是一个开源和一个商业解决方案的开发者。上面链接的文章确实分析了一些可用的解决方案。

I will not make any recommendation on the various solutions, since I am biased as I am a developer of one Open Source and one commercial solution. The articles linked above do analyze some of the available solutions.

所以这里有一些。

开源:


  • PLCrashReporter :自2009年以来在数千个应用程序中使用。安全,可靠,创建可以象征化的标准格式崩溃报告。

  • KSCrash :很新。创建标准格式崩溃报告。可以连接到不同的服务器解决方案。

  • QuincyKit :基于客户端SDK和PHP的服务器基于PLCrashReporter的组件。使PLCrashReporter易于集成,服务器组件收集报告并在符号化后对其进行分组。可以使用您自己的Mac自动进行符号化以进行实际符号化。 (免责声明:我是此开发商)

  • PLCrashReporter: Uses in thousands of apps since 2009. Safe, reliably, creates standard format crash reports that can be symbolicated.
  • KSCrash: Pretty new. Creates standard format crash reports. Can connect to different server solutions.
  • QuincyKit: Client SDK and PHP based server component based on PLCrashReporter. Makes integrating PLCrashReporter easy and server component collects reports and groups them once they are symbolicated. Symbolication can be automated using your own Mac to do the actual symbolication. (Disclaimer: I am the developer of this)

托管/商业解决方案:


  • Bugsense :免费和付费计划。在引擎盖下使用PLCrashReporter。 SDK的其余部分似乎是封闭源代码。服务器端符号。

  • BugSnag :免费和付费计划。开源SDK。在引擎盖下使用KSCrash。

  • Crashlytics :免费。封闭源。在引擎盖下使用了PLCrashReporter,现在使用自己的实现。服务器端符号。

  • Crittercism :免费和付费计划。在引擎盖下使用PLCrashReporter。 SDK的其余部分似乎是封闭源代码。服务器端符号。

  • HockeyApp :付费计划,1个月试用期。使用PLCrashReporter,所有SDK都是开源的。创建标准格式崩溃报告。服务器端符号。 (免责声明:我是其中的联合创始人和开发商之一)

  • 哨兵:付费,全新,开源(SDK和服务器)。在引擎盖下使用KSCrash。

  • Testflight :免费,封闭的来源。服务器端符号。

  • Bugsense: Free and paid plans. Uses PLCrashReporter under the hood. Rest of the SDK seems to be closed source. Server side symbolication.
  • BugSnag: Free and paid plans. Open Source SDK. Uses KSCrash under the hood.
  • Crashlytics: Free. Closed source. Did use PLCrashReporter under the hood, now use their own implementation. Server side symbolication.
  • Crittercism: Free and paid plans. Uses PLCrashReporter under the hood. Rest of the SDK seems to be closed source. Server side symbolication.
  • HockeyApp: Paid plans, 1 month trial. Uses PLCrashReporter under the hood, all SDKs open source. Creates standard format crash reports. Server side symbolication. (Disclaimer: I am one of the Co-Founders and developers of this)
  • Sentry: Paid, Pretty new, Open Source (SDK and Server). Uses KSCrash under the hood.
  • Testflight: Free, closed source. Server side symbolication.

肯定还有一些我忘了的东西。

There surely are some more out there which I forgot about.

这篇关于如何使用Apple提供的崩溃报告等代码生成崩溃报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆