美文网首页
iOS崩溃解决记录

iOS崩溃解决记录

作者: 洛洛爱吃肉 | 来源:发表于2017-07-31 09:30 被阅读191次

Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 40]

栈信息打印如下:

2015-10-20 10:01:12.871 Putaoji[49129:1691777] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 40]'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010df49f65 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x000000010d244deb objc_exception_throw + 48
    2   CoreFoundation                      0x000000010df49e9d +[NSException raise:format:] + 205
    3   QuartzCore                          0x000000010cc2f7e6 _ZN2CA5Layer12set_positionERKNS_4Vec2IdEEb + 152
    4   QuartzCore                          0x000000010cc2f959 -[CALayer setPosition:] + 44
    5   QuartzCore                          0x000000010cc2ffbd -[CALayer setFrame:] + 650
    6   UIKit                               0x000000010e9673f7 -[UIView(Geometry) setFrame:] + 356
    7   UIKit                               0x000000010ec50422 -[UIButton _setFrame:deferLayout:] + 125
    8   UIKit                               0x000000010ec50522 -[UIButton setFrame:] + 178
    9   Putaoji                             0x000000010ae41132 -[PTJInviteFriendsViewController createShareButtonWithFrame:atIndex:title:imageName:] + 690
    10  Putaoji                             0x000000010ae4004b -[PTJInviteFriendsViewController setupUI] + 2715
    11  Putaoji                             0x000000010ae3f5a4 -[PTJInviteFriendsViewController viewDidLoad] + 228
    12  UIKit                               0x000000010ea59931 -[UIViewController loadViewIfRequired] + 1344
    13  UIKit                               0x000000010ea5f923 -[UIViewController __viewWillAppear:] + 120
    14  UIKit                               0x000000010ea8f18a -[UINavigationController _startCustomTransition:] + 1177
    15  UIKit                               0x000000010ea9e7c7 -[UINavigationController _startDeferredTransitionIfNeeded:] + 712
    16  UIKit                               0x000000010ea9f67d -[UINavigationController __viewWillLayoutSubviews] + 57
    17  UIKit                               0x000000010ec3763d -[UILayoutContainerView layoutSubviews] + 248
    18  UIKit                               0x000000010e97f11c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 710
    19  QuartzCore                          0x000000010cc3836a -[CALayer layoutSublayers] + 146
    20  QuartzCore                          0x000000010cc2cbd0 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
    21  QuartzCore                          0x000000010cc2ca4e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
    22  QuartzCore                          0x000000010cc211d5 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
    23  QuartzCore                          0x000000010cc4e9f0 _ZN2CA11Transaction6commitEv + 508
    24  UIKit                               0x000000010e8f853a _afterCACommitHandler + 174
    25  CoreFoundation                      0x000000010de759d7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
    26  CoreFoundation                      0x000000010de75947 __CFRunLoopDoObservers + 391
    27  CoreFoundation                      0x000000010de6b59b __CFRunLoopRun + 1147
    28  CoreFoundation                      0x000000010de6ae98 CFRunLoopRunSpecific + 488
    29  GraphicsServices                    0x0000000112b04ad2 GSEventRunModal + 161
    30  UIKit                               0x000000010e8ce676 UIApplicationMain + 171
    31  Putaoji                             0x000000010af306ff main + 111
    32  libdyld.dylib                       0x000000010fe9d92d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

解决方法:
意思是说程序崩溃是CALayer的位置中含有不存在的数,说白了就是你的View.frame 中计算的时候,有的地方除以0了。

相关文章

  • iOS崩溃解决记录

    Terminating app due to uncaught exception 'CALayerInvalid...

  • crash

    iOS Crash文件的解析(一)教你如何对ios崩溃(crash)日志做符号化IOS本地日志记录解决方案友盟统计...

  • # iOS进阶 # 崩溃与日志分析

    在iOS开发中经常需要靠记录日志来调试应用程序、解决崩溃问题等,整理常用的日志输出和崩溃日志分析。最新更新:201...

  • iOS13 ERROR

    IOS13 hook UICollectionView Delegate崩溃会报 解决:

  • iOS 崩溃记录

    1、语法糖nil的情况。如果imageUrl的value为nil,会crash 2、连续presentViewCo...

  • iOS/Swift crash文件分析

    App作为易崩溃、难实时解决崩溃的开发来说,崩溃简直太让人头大,纵览某盟等的三方记录崩溃平台,有时的崩溃记录很容易...

  • Library not loaded: /usr/lib/lib

    iOS 8 iOS 9 项目里同时使用swift 和 oc ,会崩溃 解决办法 sudo mkdir '/Libr...

  • Xcode 13 - iOS 12.5 libswift_Con

    Xcode 13 在 iPhone 6,iOS 12.5 真机上面运行发生崩溃,崩溃信息如下: 解决方法 参考 X...

  • CALayer renderInContext: Crash

    记录一个问题, CALayer renderInContext: 在 iOS 8 或者 iOS9 上可能会导致崩溃...

  • AVPlayer在iOS10.3 replaceCurrentI

    AVPlayer在iOS10.3 replaceCurrentItem 崩溃问题的解决办法 AVPlayer在实现...

网友评论

      本文标题:iOS崩溃解决记录

      本文链接:https://www.haomeiwen.com/subject/pqyllxtx.html