ios - 如何从崩溃日志堆栈跟踪中获取 Swift 中的崩溃行

标签 ios swift crash crash-dumps

我有一个来自应用生产构建的崩溃日志。我如何找出它崩溃的确切代码行?不用说,这个问题在办公室的任何设备上都无法重现。

Incident Identifier: 8ECB1402-12E9-4869-A5FE-DB5DD2383EDA
CrashReporter Key:   TODO
Hardware Model:      iPhone6,2
Process:         Argus [2287]
Path:            /private/var/mobile/Containers/Bundle/Application/BB7F6F60-2E8E-46A5-988E-38B9F618C254/Argus.app/Argus
Identifier:      com.azumio.iphone.argus
Version:         3.12.370
Code Type:       ARM
Parent Process:  launchd [1]

Date/Time:       2015-01-24 02:55:02 +0000
OS Version:      iPhone OS 8.1.2 (12B440)
Report Version:  104

Exception Type:  SIGTRAP
Exception Codes: #0 at 0x1d64d4
Crashed Thread:  0

Thread 0 Crashed:
0   Argus                               0x001d64d4 Argus.AZPedometerStepsSync.updateStatsToCheckIn (Argus.AZPedometerStepsSync)([Argus.AZPedometerData], checkIn : ObjectiveC.AZCheckIn) -> () + 7580
1   Argus                               0x001de830 Argus.AZPedometerStepsSync.(startLiveImport (Argus.AZPedometerStepsSync) -> (Swift.Int, checkIn : ObjectiveC.AZCheckIn, startWithFastImport : Swift.Bool) -> ()).(closure #1) + 136
2   Argus                               0x001d8840 partial apply forwarder for Argus.AZPedometerStepsSync.(startLiveImport (Argus.AZPedometerStepsSync) -> (Swift.Int, checkIn : ObjectiveC.AZCheckIn, startWithFastImport : Swift.Bool) -> ()).(closure #1) + 100
3   Argus                               0x001d88ac partial apply forwarder for reabstraction thunk helper from @callee_owned (@owned [Argus.AZPedometerData], @unowned Swift.Int) -> (@unowned ()) to @callee_owned (@in (data : [Argus.AZPedometerData], importNumber : Swift.Int)) -> (@out ()) + 56
4   Argus                               0x001cb4e4 Argus.StepsImportQueue.addToQueue (Argus.StepsImportQueue)(Argus.AZPedometerData) -> () + 1688
5   Argus                               0x001ddcb8 Argus.StepsImportQueue.(importForMinute (Argus.StepsImportQueue) -> (ObjectiveC.NSDate, endDate : ObjectiveC.NSDate, minute : Swift.Int) -> ()).(closure #1) + 1240
6   Argus                               0x001d89b0 partial apply forwarder for reabstraction thunk helper from @callee_owned (@owned Argus.AZPedometerData!, @owned ObjectiveC.NSError!) -> (@unowned ()) to @callee_owned (@in (Argus.AZPedometerData!, ObjectiveC.NSError!)) -> (@out ()) with unmangled suffix "187" + 56
7   Argus                               0x001dd2b0 Argus.AZStepCounter.(queryStepCountStartingFrom8 (Argus.AZStepCounter) -> (ObjectiveC.NSDate!, to : ObjectiveC.NSDate!, toQueue : ObjectiveC.NSOperationQueue!, withHandler : (Argus.AZPedometerData!, ObjectiveC.NSError!) -> ()!) -> ()).(closure #1).(closure #1).(closure #1) + 756
8   Argus                               0x001da144 partial apply forwarder for Argus.AZStepCounter.(queryStepCountStartingFrom8 (Argus.AZStepCounter) -> (ObjectiveC.NSDate!, to : ObjectiveC.NSDate!, toQueue : ObjectiveC.NSOperationQueue!, withHandler : (Argus.AZPedometerData!, ObjectiveC.NSError!) -> ()!) -> ()).(closure #1).(closure #1).(closure #1) + 140
9   Foundation                          0x2a0c02b1 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 9
10  Foundation                          0x2a02b34d -[NSBlockOperation main] + 149
11  Foundation                          0x2a01db07 -[__NSOperationInternal _start:] + 775
12  Foundation                          0x2a0c2c1b __NSOQSchedule_f + 187
13  libdispatch.dylib                   0x3710c7a7 _dispatch_client_callout + 23
14  libdispatch.dylib                   0x3710ffa3 _dispatch_main_queue_callback_4CF + 719
15  CoreFoundation                      0x2938b3b1 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
16  CoreFoundation                      0x29389ab1 __CFRunLoopRun + 1513
17  CoreFoundation                      0x292d73c1 CFRunLoopRunSpecific + 477
18  CoreFoundation                      0x292d71d3 CFRunLoopRunInMode + 107
19  GraphicsServices                    0x306950a9 GSEventRunModal + 137
20  UIKit                               0x2c8e6fa1 UIApplicationMain + 1441
21  Argus                               0x0024a3a7 main + 59
22  libdyld.dylib                       0x3712caaf start + 3

最佳答案

通常,Apple 建议找到问题所在的线程。您在其中明确定义了:

Crashed Thread:  0

因此,他们建议阅读上面有您的应用程序名称的最上面的语句(最接近 0)(语句的一部分)。如果我没记错的话,应该是这个问题方法:

Argus.AZPedometerStepsSync.updateStatsToCheckIn

关于ios - 如何从崩溃日志堆栈跟踪中获取 Swift 中的崩溃行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28220797/

相关文章:

ios - 所有符合协议(protocol)的类都继承默认实现

swift - 如何快速删除重复代码?

ios - 是否可以强制我的 iOS 应用程序仅使用某种类型的 UILocalNotification?

ios - PHAsset 视频压缩 iOS swift

ios - 为 `intentdefinition` 中定义的 Intent 自动生成的代码抛出 `No newline at end of file`

webview - 在 Safari 中快速打开链接

ios - 将数据从 uitableview 传递到其他 uiview

ios - 来自 Apple App Store 的 EXC_BREAKPOINT (SIGTRAP) 崩溃报告。

CONTROL\crashes 调用 getline

C# ListBox 从文本文件导入时崩溃