ios - 我的应用程序在 uikit 中崩溃,仅发生在 iPhone X 及以上异常名称 NSInternalInconsistencyException

标签 ios objective-c uiscrollview uikit iphone-x

无法从资源管理器加载资源名称的边界路径位图数据:BoundingPathBitmap-1125x2436-375x812-3.00x

崩溃发生在包含 UIScrollView 的 View Controller 打开时,仅发生在 iPhone X 及以上

我们使用 Storyboard开发应用程序 UI

    0 CoreFoundation    ___exceptionPreprocess + 228
    1 libobjc.A.dylib   objc_exception_throw + 56
    2 CoreFoundation    +[_CFXNotificationTokenRegistration keyCallbacks]
    3 Foundation    -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 112
    4 UIKitCore -[_UIScreenBezierBoundingPathUtilities _loadBitmapForScreen:type:] + 1124
    5 UIKitCore -[_UIScreenBezierBoundingPathUtilities initWithScreen:] + 144
    6 UIKitCore +[_UIScreenBoundingPathUtilities boundingPathUtilitiesForScreen:] + 108
    7 UIKitCore -[UIScreen _boundingPathUtilities] + 56
    8 UIKitCore -[UIWindow _boundingPath] + 168
    9 UIKitCore -[UIView(UIViewBoundingPathSupportInternal) _effectiveBoundingPathAndBoundingPathView:] + 256
    10 UIKitCore    -[UIView(UIViewBoundingPathSupport) _inscribedRectInBoundingPathByInsettingRect:onEdges:withOptions:] + 88
    11 UIKitCore    -[UIScrollView(UIScrollViewInternal) _baseInsetsForTrailingEdgeAccessoryWithBoundingPathEdgesToUse:safeAreaInsets:bounds:scale:accessoryWidth:additionalInsetFromEdge:] + 180
    12 UIKitCore    -[UIScrollView(UIScrollViewInternal) _baseInsetsForAccessoryOnEdge:hasCustomClientInsets:accessorySize:additionalInsetFromEdge:] + 1388
    13 UIKitCore    -[UIScrollView(UIScrollViewInternal) _effectiveVerticalScrollIndicatorInsets] + 152
    14 UIKitCore    -[UIScrollView _layoutVerticalScrollIndicatorWithBounds:effectiveInset:contentOffset:fraction:additionalInset:cornerAdjust:showing:recalcSize:] + 252
    15 UIKitCore    -[UIScrollView _adjustScrollerIndicators:alwaysShowingThem:] + 1040
    16 UIKitCore    -[UIScrollView _updateForChangedScrollIndicatorRelatedInsets] + 132
    17 UIKitCore    __UIScrollViewAdjustForOverlayInsetsChangeIfNecessary + 512
    18 UIKitCore    -[UIScrollView(UIScrollViewInternal) setSafeAreaInsets:] + 312
    19 UIKitCore    -[UIView(Geometry) _applyISEngineLayoutValuesToBoundsOnly:] + 1288
    20 UIKitCore    -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 124
    21 UIKitCore    -[UIScrollView(_UIOldConstraintBasedLayoutSupport) _resizeWithOldSuperviewSize:] + 52
    22 CoreFoundation   -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 464
    23 UIKitCore    -[UIView(Geometry) resizeSubviewsWithOldSize:] + 156
    24 UIKitCore    -[UIView(AdditionalLayoutSupport) _is_layout] + 152
    25 UIKitCore    -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 988
    26 UIKitCore    -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1380
    27 QuartzCore   0x00000001ca79e000 + 1309564
    28 QuartzCore   0x00000001ca79e000 + 1329972
    29 QuartzCore   0x00000001ca79e000 + 669080
    30 QuartzCore   0x00000001ca79e000 + 859848
    31 QuartzCore   0x00000001ca79e000 + 863536
    32 CoreFoundation   ___CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
    33 CoreFoundation   ___CFRunLoopDoObservers + 412
    34 CoreFoundation   ___CFRunLoopRun + 1264
    35 CoreFoundation   CFRunLoopRunSpecific + 436
    36 GraphicsServices GSEventRunModal + 100
    37 UIKitCore    UIApplicationMain + 212
    38 live main (main.mm:23)
    39 libdyld.dylib    0x00000001c5d2a000 + 2996

希望有人能给我一些建议,谢谢

最佳答案

我的应用程序中也发生了同样的崩溃。

当我关闭 Storyboard上的“显示水平指示器”和“显示垂直指示器”时,不再发生崩溃。

关于ios - 我的应用程序在 uikit 中崩溃,仅发生在 iPhone X 及以上异常名称 NSInternalInconsistencyException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55627370/

相关文章:

mysql - 当字符串包含空格时,应用程序仍未更新数据库

ios - 找不到 Project-Swift.h 文件

objective-c - 如何从被调用的 ViewController 修改发送者 ViewController?

swift - 无法正确隐藏到 UINavigationBar

ios - UIScrollView 中的 UITextView - 动态高度?

ios - 在 Swift 中重置结构变量

ios - 不支持的操作 - 不允许应用程序监听设备锁定通知

ios - webview 在 swift 3 中打开 native fb 应用程序?

iphone - 从 NSMutableArray 中拉出 NSArray

ios - 如何以编程方式将 UIView 添加到 Swift 中的 UIScrollView?