如何理解这份崩溃报告? SIGSEGV

时间:2017-02-16 08:30:40

标签: css objective-c crash crash-reports

我最近经常遇到这种情况,设备iPhone 5s,SDk:9.1 我似乎无法重现这个错误。该日志取自第三方崩溃记者(Testfairy)。

这很烦人,因为我无法弄清楚是什么导致它......

Crashed Thread: 14
0   libobjc.A.dylib                     0x19a6f1bdc objc_msgSend (in libobjc.A.dylib) + 28
1   Foundation                          0x186bd68d4 _writeJSONValue (in Foundation) + 96
2   Foundation                          0x186bd8cc0 ___writeJSONObject_block_invoke (in Foundation) + 236
3   CoreFoundation                      0x185b6e4f4 __65-[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke (in CoreFoundation) + 88
4   CoreFoundation                      0x185b5c198 -[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:] (in CoreFoundation) + 224
5   Foundation                          0x186bd844c _writeJSONObject (in Foundation) + 360
6   Foundation                          0x186bd69fc _writeJSONValue (in Foundation) + 392
7   Foundation                          0x186bd8ea8 ___writeJSONArray_block_invoke (in Foundation) + 144
8   CoreFoundation                      0x185b13990 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke (in CoreFoundation) + 132
9   CoreFoundation                      0x185b13828 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] (in CoreFoundation) + 212
10  Foundation                          0x186bd86a8 _writeJSONArray (in Foundation) + 300
11  Foundation                          0x186bd6a9c _writeJSONValue (in Foundation) + 552
12  Foundation                          0x186bd8cc0 ___writeJSONObject_block_invoke (in Foundation) + 236
13  CoreFoundation                      0x185b6e4f4 __65-[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke (in CoreFoundation) + 88
14  CoreFoundation                      0x185b5c198 -[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:] (in CoreFoundation) + 224
15  Foundation                          0x186bd844c _writeJSONObject (in Foundation) + 360
16  Foundation                          0x186bd69fc _writeJSONValue (in Foundation) + 392
17  Foundation                          0x186bd682c -[_NSJSONWriter dataWithRootObject:options:error:] (in Foundation) + 140
18  Foundation                          0x186bd7888 +[NSJSONSerialization dataWithJSONObject:options:error:] (in Foundation) + 348
19  MyApp                               0x1003721e8 -[TestFairyCommunicator sendEvents:toServer:withSession:] (in MyApp) (TestFairyCommunicator.m:219)
20  MyApp                               0x10036fa70 -[TestFairy send:events:] (in MyApp) (TestFairy.m:1260)
21  MyApp                               0x100369394 -[TFEventsTracker sendEvents] (in MyApp) (TFEventsTracker.m:66)
22  MyApp                               0x10036e32c -[TestFairy checkForegroundViewController] (in MyApp) (TestFairy.m:924)
23  MyApp                               0x10036df34 -[TestFairy collectMetrics] (in MyApp) (TestFairy.m:886)
24  Foundation                          0x186b5fc80 __NSThread__start__ (in Foundation) + 1000
25  libsystem_pthread.dylib             0x19b113b28 _pthread_body (in libsystem_pthread.dylib) + 156
26  libsystem_pthread.dylib             0x19b113a8c _pthread_body (in libsystem_pthread.dylib) + 0
27  libsystem_pthread.dylib             0x19b111028 thread_start (in libsystem_pthread.dylib) + 4

您对导致此次崩溃的原因有什么想法吗?

1 个答案:

答案 0 :(得分:0)

在此处设置断点TestFairyCommunicator.m:219,并检查您的事件数据结构是否合理:

  • 顶级对象是NSArray或NSDictionary。
  • 所有对象都是NSString,NSNumber,NSArray,NSDictionary或NSNull的实例。
  • 所有字典键都是NSString的实例。
  • 数字不是NaN或 无穷大。

直接引用:https://developer.apple.com/reference/foundation/nsjsonserialization