- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我从我的应用程序的用户那里收到了一些崩溃报告;然而,它们是 KSCrash 的 JSON 格式。我可以说出问题是什么,但我可以准确地找到问题所在!我能找到的所有象征崩溃报告的东西似乎都处理 Apple 风格的报告,而不是 KSCrash 的 JSON 格式。
Symbolicating iPhone App Crash Reports 好像不支持JSON格式。
我也尝试过 atos(即来自 Using atos to determine crashed method name with dSYM,但不确定我是否正确计算了地址。
请帮忙!
JSON 崩溃报告:
{
"binary_images": [
{
"cpu_subtype": 0,
"cpu_type": 16777228,
"image_addr": 4295196672,
"image_size": 524288,
"image_vmaddr": 4294967296,
"name": "/var/mobile/Containers/Bundle/Application/5CEB5AA5-797A-4656-8E41-E3898243DD2C/MYAPP.app/MYAPP",
"uuid": "C34AC6E9-4A70-3909-89E3-B7621BAC1855"
},
...
{
"cpu_subtype": 0,
"cpu_type": 16777228,
"image_addr": 6627819520,
"image_size": 151552,
"image_vmaddr": 6625312768,
"name": "/System/Library/PrivateFrameworks/CoreServicesInternal.framework/CoreServicesInternal",
"uuid": "69F0DA76-836A-3F05-BCF8-A561EC6C467A"
}
],
"crash": {
"diagnosis": "Application threw exception NSInvalidArgumentException: (null)\nOriginated at or in a subcall of _mh_execute_header",
"error": {
"address": 0,
"mach": {
"code": 0,
"exception": 10,
"exception_name": "EXC_CRASH",
"subcode": 0
},
"nsexception": {
"name": "NSInvalidArgumentException",
"referenced_object": {
"address": 5896109504,
"type": "unknown"
}
},
"reason": "-[NSKnownKeysDictionary1 floatValue]: unrecognized selector sent to instance 0x15f6f7dc0",
"signal": {
"code": 0,
"name": "SIGABRT",
"signal": 6
},
"type": "nsexception"
},
"threads": [
{
"backtrace": {
"contents": [
{
"instruction_addr": 6480478100,
"object_addr": 6479265792,
"object_name": "CoreFoundation",
"symbol_addr": 6480477976,
"symbol_name": "<redacted>"
},
{
"instruction_addr": 6826131244,
"object_addr": 6826098688,
"object_name": "libobjc.A.dylib",
"symbol_addr": 6826131188,
"symbol_name": "objc_exception_throw"
},
{
"instruction_addr": 6480506028,
"object_addr": 6479265792,
"object_name": "CoreFoundation",
"symbol_addr": 6480505816,
"symbol_name": "<redacted>"
},
{
"instruction_addr": 6480493644,
"object_addr": 6479265792,
"object_name": "CoreFoundation",
"symbol_addr": 6480492772,
"symbol_name": "<redacted>"
},
{
"instruction_addr": 6479458908,
"object_addr": 6479265792,
"object_name": "CoreFoundation",
"symbol_addr": 6479458816,
"symbol_name": "_CF_forwarding_prep_0"
},
{
"instruction_addr": 4295494968,
"object_addr": 4295196672,
"object_name": "MYAPP",
"symbol_addr": 4295196672,
"symbol_name": "_mh_execute_header"
},
{
"instruction_addr": 4295426364,
"object_addr": 4295196672,
"object_name": "MYAPP",
"symbol_addr": 4295196672,
"symbol_name": "_mh_execute_header"
},
{
"instruction_addr": 4295392188,
"object_addr": 4295196672,
"object_name": "MYAPP",
"symbol_addr": 4295196672,
"symbol_name": "_mh_execute_header"
},
{
"instruction_addr": 4295384932,
"object_addr": 4295196672,
"object_name": "MYAPP",
"symbol_addr": 4295196672,
"symbol_name": "_mh_execute_header"
},
{
"instruction_addr": 4295385280,
"object_addr": 4295196672,
"object_name": "MYAPP",
"symbol_addr": 4295196672,
"symbol_name": "_mh_execute_header"
},
{
"instruction_addr": 6570714364,
"object_addr": 6570655744,
"object_name": "UIKit",
"symbol_addr": 6570713740,
"symbol_name": "<redacted>"
},
{
"instruction_addr": 6562573572,
"object_addr": 6562512896,
"object_name": "QuartzCore",
"symbol_addr": 6562573424,
"symbol_name": "<redacted>"
},
{
"instruction_addr": 6562552096,
"object_addr": 6562512896,
"object_name": "QuartzCore",
"symbol_addr": 6562551804,
"symbol_name": "<redacted>"
},
{
"instruction_addr": 6562551776,
"object_addr": 6562512896,
"object_name": "QuartzCore",
"symbol_addr": 6562551744,
"symbol_name": "<redacted>"
},
{
"instruction_addr": 6562549376,
"object_addr": 6562512896,
"object_name": "QuartzCore",
"symbol_addr": 6562549124,
"symbol_name": "<redacted>"
},
{
"instruction_addr": 6562548692,
"object_addr": 6562512896,
"object_name": "QuartzCore",
"symbol_addr": 6562548176,
"symbol_name": "<redacted>"
},
{
"instruction_addr": 6562521932,
"object_addr": 6562512896,
"object_name": "QuartzCore",
"symbol_addr": 6562521852,
"symbol_name": "<redacted>"
},
{
"instruction_addr": 6480179012,
"object_addr": 6479265792,
"object_name": "CoreFoundation",
"symbol_addr": 6480178980,
"symbol_name": "<redacted>"
},
{
"instruction_addr": 6480170172,
"object_addr": 6479265792,
"object_name": "CoreFoundation",
"symbol_addr": 6480169800,
"symbol_name": "<redacted>"
},
{
"instruction_addr": 6480171244,
"object_addr": 6479265792,
"object_name": "CoreFoundation",
"symbol_addr": 6480170316,
"symbol_name": "<redacted>"
},
{
"instruction_addr": 6479304704,
"object_addr": 6479265792,
"object_name": "CoreFoundation",
"symbol_addr": 6479304320,
"symbol_name": "CFRunLoopRunSpecific"
},
{
"instruction_addr": 6664434032,
"object_addr": 6664388608,
"object_name": "GraphicsServices",
"symbol_addr": 6664433852,
"symbol_name": "GSEventRunModal"
},
{
"instruction_addr": 6571156968,
"object_addr": 6570655744,
"object_name": "UIKit",
"symbol_addr": 6571156764,
"symbol_name": "UIApplicationMain"
},
{
"instruction_addr": 4295322808,
"object_addr": 4295196672,
"object_name": "MYAPP",
"symbol_addr": 4295196672,
"symbol_name": "_mh_execute_header"
},
{
"instruction_addr": 6834759864,
"object_addr": 6834749440,
"object_name": "libdyld.dylib",
"symbol_addr": 6834759860,
"symbol_name": "<redacted>"
}
],
"skipped": 0
},
"crashed": true,
"current_thread": true,
"index": 0
},
{
"backtrace": {
"contents": [
{
"instruction_addr": 6835930524,
"object_addr": 6835814400,
"object_name": "libsystem_kernel.dylib",
"symbol_addr": 6835930516,
"symbol_name": "kevent_qos"
},
{
"instruction_addr": 6834634084,
"object_addr": 6834552832,
"object_name": "libdispatch.dylib",
"symbol_addr": 6834633852,
"symbol_name": "<redacted>"
},
{
"instruction_addr": 6834566092,
"object_addr": 6834552832,
"object_name": "libdispatch.dylib",
"symbol_addr": 6834566040,
"symbol_name": "<redacted>"
}
],
"skipped": 0
},
"crashed": false,
"current_thread": false,
"index": 1,
"registers": {
"basic": {
"cpsr": 0,
"fp": 6140552752,
"lr": 6834634084,
"pc": 6835930524,
"sp": 6140552608,
"x0": 3,
"x1": 6944956928,
"x10": 0,
"x11": 0,
"x12": 24,
"x13": 33554431,
"x14": 0,
"x15": 5895038864,
"x16": 374,
"x17": 0,
"x18": 0,
"x19": 6944821248,
"x2": 1,
"x20": 6944821248,
"x21": 6944821248,
"x22": 6944956800,
"x23": 6944960512,
"x24": 6944960512,
"x25": 0,
"x26": 6140555520,
"x27": 6140555520,
"x28": 0,
"x29": 6140552752,
"x3": 6140552616,
"x4": 1,
"x5": 0,
"x6": 0,
"x7": 0,
"x8": 6944956864,
"x9": 0
}
}
},
...
]
},
"process": {},
"report": {
"id": "93239236-359A-44AC-8AAA-9AB2ACCE30DA",
"process_name": "MYAPP",
"timestamp": "2015-07-17T23:35:51Z",
"type": "standard",
"version": {
"major": 3,
"minor": 0
}
},
"system": {
"CFBundleExecutable": "MYAPP",
"CFBundleExecutablePath": "/var/mobile/Containers/Bundle/Application/5CEB5AA5-797A-4656-8E41-E3898243DD2C/MYAPP.app/MYAPP",
"CFBundleIdentifier": "ca.mymojo.CJ-Stats",
"CFBundleName": "MYAPP",
"CFBundleShortVersionString": "1.1.2",
"CFBundleVersion": "1.1.2",
"app_start_time": "2015-07-17T23:35:47Z",
"app_uuid": "C34AC6E9-4A70-3909-89E3-B7621BAC1855",
"application_stats": {
"active_time_since_last_crash": 3.93054,
"active_time_since_launch": 3.93054,
"application_active": true,
"application_in_foreground": true,
"background_time_since_last_crash": 0,
"background_time_since_launch": 0,
"launches_since_last_crash": 1,
"sessions_since_last_crash": 1,
"sessions_since_launch": 1
},
"binary_cpu_subtype": 0,
"binary_cpu_type": 16777228,
"boot_time": "2015-07-17T12:07:09Z",
"cpu_arch": "arm64",
"cpu_subtype": 1,
"cpu_type": 16777228,
"device_app_hash": "58ebd0a220c47528a58b7d2426b69ce4b5491e14",
"jailbroken": false,
"kernel_version": "Darwin Kernel Version 15.0.0: Mon Jun 29 00:33:05 PDT 2015; root:xnu-3247.1.36.0.1~9/RELEASE_ARM64_T7000",
"machine": "iPhone7,2",
"memory": {
"free": 27996160,
"size": 1035993088,
"usable": 825868288
},
"model": "N61AP",
"os_version": "13A4293g",
"parent_process_id": 1,
"parent_process_name": "unknown",
"process_id": 4791,
"process_name": "MYAPP",
"system_name": "iPhone OS",
"system_version": "9.0",
"time_zone": "CDT"
},
"user": {}
最佳答案
终于明白了!
我需要使用 KSCrashReportFilterAppleFmt 将文件转换为 .crash 文件,然后我可以将其加载到 Xcode 中,Xcode 很乐意为我符号化它。我用来转换的代码在下面,如果其他人觉得这有用的话。
NSString *srcFilePath = @"crash-report.json";
NSString *destFilePath = @"crash-report.crash";
NSData *myJSON = [NSData dataWithContentsOfFile:srcFilePath];
NSError* localError = nil;
NSDictionary *parsedJSON = [NSJSONSerialization JSONObjectWithData:myJSON options:0 error:&localError];
if(localError != nil)
{
return ;
}
id filter = [KSCrashReportFilterAppleFmt filterWithReportStyle:KSAppleReportStyleSymbolicatedSideBySide];
NSArray *reports = @[parsedJSON];
[filter filterReports:reports
onCompletion:^(NSArray *filteredReports, BOOL completed, NSError *error) {
if(error != nil) {
return;
}
if(completed) {
NSString *contents = [filteredReports objectAtIndex:0];
[contents writeToFile:destFilePath
atomically:YES
encoding:NSStringEncodingConversionAllowLossy
error:nil];
}
}];
关于ios - 符号化 iPhone KSCrash JSON 报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31500561/
最近开始学习MongoDB。今天老师教了我们 mongoexport 命令。在练习时,我遇到了一个典型的问题,包括教练在内的其他同学都没有遇到过。我在我的 Windows 10 机器上使用 Mongo
我是 JSON Schema 的新手,读过什么是 JSON Schema 等等。但我不知道如何将 JSON Schema 链接到 JSON 以针对该 JSON Schema 进行验证。谁能解释一下?
在 xml 中,我可以在另一个 xml 文件中包含一个文件并使用它。如果您的软件从 xml 获取配置文件但没有任何方法来分离配置,如 apache/ngnix(nginx.conf - site-av
我有一个 JSON 对象,其中包含一个本身是 JSON 对象的字符串。我如何反序列化它? 我希望能够做类似的事情: #[derive(Deserialize)] struct B { c: S
考虑以下 JSON { "a": "{\"b\": 12, \"c\": \"test\"}" } 我想定义一个泛型读取 Reads[Outer[T]]对于这种序列化的 Json import
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 11 个月前关闭。 Improve
我的旧项目在 MySQL 中有 Standard JSON 格式的数据。 对于我在 JS (Node.js) 和 DynamoDB 中的全新项目,关于 Standard JSON格式: 是否建议将其转
JSON 值字符串、数字、true、false、null 是否是有效的 JSON? 即,是 true 一个有效的 JSON 文档?还是必须是数组/对象? 一些验证器接受这个(例如 http://jso
我有一个 JSON 字符串,其中一个字段是文本字段。这个文本字段可以包含用户在 UI 中输入的文本,如果他们输入的文本是 JSON 文本,也许是为了说明一些编码,我需要对他们的文本进行编码,以便它不会
我正在通过 IBM MQ 调用处理数据,当由 ColdFusion 10 (10,0,11,285437) 序列化时,0 将作为 +0.0 返回,它会导致无效的 JSON并且无法反序列化。 stPol
我正在从三个数组中生成一个散列,然后尝试构建一个 json。我通过 json object has array 成功了。 require 'json' A = [['A1', 'A2', 'A3'],
我从 API 接收 JSON,响应可以是 30 种类型之一。每种类型都有一组唯一的字段,但所有响应都有一个字段 type 说明它是哪种类型。 我的方法是使用serde .我为每种响应类型创建一个结构并
我正在下载一个 JSON 文件,我已将其检查为带有“https://jsonlint.com”的有效 JSON 到文档目录。然后我打开文件并再次检查,结果显示为无效的 JSON。这怎么可能????这是
我正在尝试根据从 API 接收到的数据动态创建一个 JSON 对象。 收到的示例数据:将数据解码到下面给出的 CiItems 结构中 { "class_name": "test", "
我想从字符串转换为对象。 来自 {"key1": "{\n \"key2\": \"value2\",\n \"key3\": {\n \"key4\": \"value4\"\n }\n
目前我正在使用以下代码将嵌套的 json 转换为扁平化的 json: import ( "fmt" "github.com/nytlabs/gojsonexplode" ) func
我有一个使用来自第三方 API 的数据的应用程序。我需要将 json 解码为一个结构,这需要该结构具有“传入”json 字段的 json 标签。传出的 json 字段具有不同的命名约定,因此我需要不同
我想使用 JSON 架构来验证某些值。我有两个对象,称它们为 trackedItems 和 trackedItemGroups。 trackedItemGroups 是组名称和 trackedItem
考虑以下案例类模式, case class Y (a: String, b: String) case class X (dummy: String, b: Y) 字段b是可选的,我的一些数据集没有字
我正在存储 cat ~/path/to/file/blah | 的输出jq tojson 在一个变量中,稍后在带有 JSON 内容的 curl POST 中使用。它运作良好,但它删除了所有换行符。我知
我是一名优秀的程序员,十分优秀!