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

时间:2015-01-29 17:21:54

标签: 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

1 个答案:

答案 0 :(得分:2)

通常,Apple建议找到问题的主题。你有明确的定义:

Crashed Thread:  0

然后他们建议阅读最上面的语句(最接近0),上面有你的应用程序名称(至少部分语句)。如果我没有弄错的话,这应该是问题方法:

Argus.AZPedometerStepsSync.updateStatsToCheckIn