从苹果崩溃报告中找到崩溃的根源

时间:2018-07-26 16:25:26

标签: ios swift

我有一个被苹果拒绝的应用程序,因为它崩溃了,我似乎无法查明崩溃实际上是在进行进一步调试的地方(到目前为止,我也无法复制崩溃)。

使用https://developer.apple.com/library/archive/technotes/tn2151/_index.htmlHow to symbolicate crash report from Apple received in .txt format not .crash format,我可以部分地象征他们发送给我的崩溃报告,这使我明白了:

  

0应用0x000000010461ad04关闭#2中的关闭   ViewController.getLocations(lat:lng :) + 470276   (ViewController.swift:0)

在查看方法ViewController.getLocations时,我看不到任何可能导致崩溃的东西,但我对+ 470276感到有些困惑?

完整追溯:

Thread 0 Crashed:
0   App                 0x000000010461ad04 closure #2 in closure #1 in ViewController.getTolls(lat:lng:) + 470276 (ViewController.swift:0)
1   App                 0x00000001045cae70 thunk for @escaping @callee_guaranteed () -> () + 142960 (MyVehiclesViewController.swift:0)
2   libdispatch.dylib               0x00000001836ecaa0 0x1836eb000 + 6816
3   libdispatch.dylib               0x00000001836eca60 0x1836eb000 + 6752
4   libdispatch.dylib               0x00000001836f965c 0x1836eb000 + 58972
5   CoreFoundation                  0x0000000183da3070 0x183cb5000 + 974960
6   CoreFoundation                  0x0000000183da0bc8 0x183cb5000 + 965576
7   CoreFoundation                  0x0000000183cc0da8 0x183cb5000 + 48552
8   GraphicsServices                0x0000000185ca6020 0x185c9b000 + 45088
9   UIKit                           0x000000018dce0758 0x18d9c3000 + 3266392
10  App                 0x00000001045ae924 main + 26916 (BaseViewController.swift:24)
11  libdyld.dylib                   0x0000000183751fc0 0x183751000 + 4032

1 个答案:

答案 0 :(得分:1)

在我看来,MyVehiclesViewController中有一个对转义的闭包的调用没有以某种方式实现。同样,回溯中的“ + 47276”也是给定的内存地址的偏移量。完整的符号应改为行号。

对于如何完全符号化的堆栈溢出,this one非常好。