了解Crashlytics中的Swift堆栈跟踪

时间:2016-08-29 18:26:35

标签: ios swift uiscrollview crashlytics

因此,作为一名新手IOS开发人员,我发现很难确定这种异常的情况。

案例:IOS应用程序有UIScrollView,允许用户向下拖动以与Web服务同步 - 就像在邮件应用程序中构建一样。

偶尔,野外用户会遇到应用程序崩溃。在崩溃论中,我看到:

Crashed: com.apple.main-thread:  EXC_BREAKPOINT 0x00000000e7ffdefe
0  myApp                      0xba760 specialized WeekPlanController.scrollViewWillBeginDragging(UIScrollView) -> () (WeekPlanController.swift:428)
1  myApp                      0xba4a0 specialized WeekPlanController.scrollViewWillBeginDragging(UIScrollView) -> () (WeekPlanController.swift:428)
2  myApp                      0xb702c @objc WeekPlanController.scrollViewWillBeginDragging(UIScrollView) -> () (WeekPlanController.swift)
3  UIKit                          0x2cee4ad3 -[UIScrollView _updatePanGesture] + 282
4  UIKit                          0x2ced206b _UIGestureRecognizerSendActions + 294
5  UIKit                          0x2cd810f9 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 668
6  UIKit                          0x2d19af9b ___UIGestureRecognizerUpdate_block_invoke661 + 46
7  UIKit                          0x2cd4a181 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 216
8  UIKit                          0x2cd4805f _UIGestureRecognizerUpdate + 2926
9  UIKit                          0x2cd7f4d9 -[UIWindow _sendGesturesForEvent:] + 784
10 UIKit                          0x2cd7eddd -[UIWindow sendEvent:] + 524
11 UIKit                          0x2cd54fe5 -[UIApplication sendEvent:] + 196
12 UIKit                          0x2cfcb8fb _UIApplicationHandleEventFromQueueEvent + 14414
13 UIKit                          0x2cd539f9 _UIApplicationHandleEventQueue + 1352
14 CoreFoundation                 0x296c5faf __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
15 CoreFoundation                 0x296c53bf __CFRunLoopDoSources0 + 218
16 CoreFoundation                 0x296c3a25 __CFRunLoopRun + 772
17 CoreFoundation                 0x29610201 CFRunLoopRunSpecific + 476
18 CoreFoundation                 0x29610013 CFRunLoopRunInMode + 106
19 GraphicsServices               0x30eef201 GSEventRunModal + 136
20 UIKit                          0x2cdb4a59 UIApplicationMain + 1440
21 myApp                      0x5d084 main (AppDelegate.swift:14)
22 libdyld.dylib                  0x37f3daaf start + 2

这是来自控制器的代码:

func scrollViewWillBeginDragging(scrollView: UIScrollView){
        if Settings.isSyncActive {

            if let lastSyncDate = Settings.lastSyncedDate { // ln 427
                self.refreshControl.attributedTitle = NSAttributedString(string: "Last sync \(lastSyncDate.relativeTimeToString()) ago") // ln 428
            } // ln 429
            else{
                self.refreshControl.attributedTitle = NSAttributedString(string: "")

            }

        }
    }

赞赏任何提示或提示

0 个答案:

没有答案