奇怪的EXC_BREAKPOINT迅速

时间:2016-05-22 15:29:39

标签: ios swift crashlytics nsexception

我收到了以下崩溃报告:

Crashed: com.apple.main-thread
EXC_BREAKPOINT 0x00000001000b6b44

0  Spersy                         0x1000b6b44 specialized BL_BaseTabBarController.(setUpTabBar in _D18ECB1BE2DA6194F4E8C8A0FD1C1668)(BL_BaseTabBarController) -> (forSelectedActionSignContainer : UIImageView) -> () (BL_BaseTabBarController.swift)
1  Spersy                         0x1000b3ae0 @objc BL_BaseTabBarController.cameraControllerSelected(BL_BaseTabBarController) -> () -> () (BL_BaseTabBarController.swift:112)
2  UIKit                          0x186050be8 -[UIApplication sendAction:to:from:forEvent:] + 100
3  UIKit                          0x186050b64 -[UIControl sendAction:to:forEvent:] + 80
4  UIKit                          0x186038870 -[UIControl _sendActionsForEvents:withEvent:] + 436
5  UIKit                          0x186050454 -[UIControl touchesEnded:withEvent:] + 572
6  UIKit                          0x186008c0c _UIGestureRecognizerUpdate + 8988
7  CoreFoundation                 0x180e70728 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
8  CoreFoundation                 0x180e6e4cc __CFRunLoopDoObservers + 372
9  CoreFoundation                 0x180e6e8fc __CFRunLoopRun + 928
10 CoreFoundation                 0x180d98c50 CFRunLoopRunSpecific + 384
11 GraphicsServices               0x182680088 GSEventRunModal + 180
12 UIKit                          0x186082088 UIApplicationMain + 204
13 Spersy                         0x1000ed850 main (AppDelegate.swift:19)
14 libdispatch.dylib              0x1809368b8 (Missing)

传播到代码,用户tapps tabbar按钮(我使用自定义tabbar):

@IBAction func cameraControllerSelected()
{
    setUpTabBar(forSelectedActionSignContainer: cameraSign)
}

以下代码执行:

private func setUpTabBar ( forSelectedActionSignContainer imageView : UIImageView ) -> Void
{

    var viewControllerIndex = 0

    if ( imageView == feedSign )
    {
        feedSign.hidden = false
        exploreSign.hidden = true
        cameraSign.hidden = true
        chatSign.hidden = true
        profileSign.hidden = true
        viewControllerIndex = 0
    }
    if ( imageView == exploreSign )
    {
        feedSign.hidden = true
        exploreSign.hidden = false
        cameraSign.hidden = true
        chatSign.hidden = true
        profileSign.hidden = true
        viewControllerIndex = 1
    }
    if ( imageView == cameraSign )
    {
        feedSign.hidden = true
        exploreSign.hidden = true
        cameraSign.hidden = false
        chatSign.hidden = true
        profileSign.hidden = true
        viewControllerIndex = 2
    }
    if ( imageView == chatSign )
    {
        feedSign.hidden = true
        exploreSign.hidden = true
        cameraSign.hidden = true
        chatSign.hidden = false
        profileSign.hidden = true
        viewControllerIndex = 3
    }
    if ( imageView == profileSign )
    {
        feedSign.hidden = true
        exploreSign.hidden = true
        cameraSign.hidden = true
        chatSign.hidden = true
        profileSign.hidden = false
        viewControllerIndex = 4
    }


   if ( !shouldDismissTopOrReload(viewControllerAtIndex: viewControllerIndex))
   {
        displayViewController(atIndex: viewControllerIndex)
        signOnScreen = imageView
   }
}

它只出现在发布版本上,调试一切都很好。是优化编译器问题吗?因为我有相同的程序setUpTabbar()没有参数。其他功能 - 例如shouldDismissTopOrReload(viewControllerAtIndex: viewControllerIndex)displayViewController(atIndex: viewControllerIndex)是可靠的,并且通过测试很好地覆盖。有任何想法吗?我有近200次崩溃!!

0 个答案:

没有答案