ios应用程序崩溃,出现无法理解的错误

7hiiyaii  于 2022-12-15  发布在  iOS
关注(0)|答案(1)|浏览(188)

下午好。我收到了来自用户的应用程序崩溃报告。在报告-〉崩溃(Xcode -〉组织者)我找到了消息(logs)我需要之前,当点击“在项目中打开”时,Xcode在崩溃现场打开调试器并显示一条消息(如果是由于nil或其他原因)。但是现在它只显示了错误堆栈,就这样了。所需的类没有打开,更不用说崩溃的地方了。
我怀疑这次崩溃和一些ui事件有关,但是我不知道如何详细地破译它们,以前,我没有更详细地研究过崩溃,我不知道如何彻底地分析它们。
你能推荐一些教程或文章吗?你能建议什么可能导致错误吗?在用户删除应用程序之前,这个系列有几次崩溃。我在这个队列中附上了第一次崩溃的日志。

Thread 0 Crashed:
0   libobjc.A.dylib                 0x00000001ed766090 objc_opt_class + 36 (objc-object.h:237) 

1   UIKitCore                       0x00000001d70b37ac -[UIWindow _windowInterfaceOrientation] + 24 (UIWindow.m:4960)

2   UIKitCore                       0x00000001d7238030 -[UIWindow _sceneSafeAreaInsetsIncludingStatusBar:] + 52 (UIWindow.m:2591)

3   UIKitCore                       0x00000001d70adfec -[UIScrollView _baseInsetsForAccessoryOnEdge:hasCustomClientInsets:accessorySize:additionalInsetFromEdge:] + 212 (UIScrollView.m:12675)

4   UIKitCore                       0x00000001d739243c -[UIScrollView _effectiveHorizontalScrollIndicatorInsets] + 200 (UIScrollView.m:12795)

5   UIKitCore                       0x00000001d7287b9c -[UIScrollView _layoutHorizontalScrollIndicatorWithBounds:effectiveInset:contentOffset:fraction:additionalInset:cornerAdjust:showing:recalcSize:verticalIndicatorFrame:] + 384 (UIScrollView.m:9506)

6   UIKitCore                       0x00000001d72035c8 -[UIScrollView _adjustScrollerIndicators:alwaysShowingThem:] + 1296 (UIScrollView.m:9386)

7   UIKitCore                       0x00000001d72c1ddc -[UIScrollView _updateForChangedScrollIndicatorRelatedInsets] + 140 (UIScrollView.m:3606)

8   UIKitCore                       0x00000001d7153784 _UIScrollViewAdjustForOverlayInsetsChangeIfNecessary + 592 (UIScrollView.m:12877)

9   UIKitCore                       0x00000001d816293c -[UIScrollView _updateForChangedEdgesConvertingSafeAreaToContentInsetWithOldSystemContentInset:oldEdgesPropagatingSafeAreaInsets:adjustContentOffsetIfNecessary:] + 116 (UIScrollView.m:2467)

10  UIKitCore                       0x00000001d709cd9c -[UIScrollView setContentSize:] + 1816 (UIScrollView.m:2421)

11  UIKitCore                       0x00000001d70596d4 -[UIScrollView _applyConstrainedContentSizeIfNecessary] + 112 (UIScrollView.m:1443)

12  UIKitCore                       0x00000001d708362c -[UIScrollView layoutSubviews] + 60 (UIScrollView.m:1476)

13  UIKitCore                       0x00000001d7074844 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2592 (UIView.m:18426)

14  QuartzCore                      0x00000001d87ea1c0 CA::Layer::layout_if_needed(CA::Transaction*) + 532 (CALayer.mm:10116)

15  QuartzCore                      0x00000001d87dc5fc CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 136 (CALayer.mm:2479)

16  QuartzCore                      0x00000001d87f0f70 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 452 (CAContextInternal.mm:2612)

17  QuartzCore                      0x00000001d87f9e78 CA::Transaction::commit() + 704 (CATransactionInternal.mm:449)

18  UIKitCore                       0x00000001d70836d8 _UIApplicationFlushRunLoopCATransactionIfTooLate + 84 (UIApplication.m:2977)

19  UIKitCore                       0x00000001d7053a38 __processEventQueue + 7412 (UIEventDispatcher.m:2639)

20  UIKitCore                       0x00000001d7058c9c __eventFetcherSourceCallback + 172 (UIEventDispatcher.m:2668)

21  CoreFoundation                  0x00000001d4b33f04 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1972)

22  CoreFoundation                  0x00000001d4b44c90 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2016)

23  CoreFoundation                  0x00000001d4a7e184 __CFRunLoopDoSources0 + 268 (CFRunLoop.c:2053)

24  CoreFoundation                  0x00000001d4a83b4c __CFRunLoopRun + 828 (CFRunLoop.c:2951)

25  CoreFoundation                  0x00000001d4a976b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)

26  GraphicsServices                0x00000001f0b31374 GSEventRunModal + 164 (GSEvent.c:2200)

27  UIKitCore                       0x00000001d73fce88 -[UIApplication _run] + 1100 (UIApplication.m:3511)

28  UIKitCore                       0x00000001d717e5ec UIApplicationMain + 364 (UIApplication.m:5064)

29  APPNAME                         0x0000000100cafc60 main + 68 (UIView.swift:13)

30  dyld                            0x00000001012f9ce4 start + 520 (dyldMain.cpp:879)
 

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x000000016030a130   x1: 0x000000021f701692   x2: 0x00000001012e1940   x3: 0x000000010133a328
    x4: 0x0000000000000000   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000f20
    x8: 0x010000022db9944f   x9: 0x000000021f701692  x10: 0x000000016cca86da  x11: 0x01ff00015e030400
   x12: 0x00000000000000bf  x13: 0x000000015e030fd0  x14: 0x0000000000000018  x15: 0x000000022db99448
   x16: 0x000000022db99448  x17: 0x000000022db99448  x18: 0x0000000000000000  x19: 0x000000016030a130
   x20: 0x0000000000000000  x21: 0x0000000000000004  x22: 0x000000021e8f47df  x23: 0x00000002838a6e00
   x24: 0x0000000000000000  x25: 0x00000000000005d0  x26: 0x000000022db84840  x27: 0x0000000000000460
   x28: 0x0000000000000068   fp: 0x000000016f153130   lr: 0x00000001d70b37ac
    sp: 0x000000016f153120   pc: 0x00000001ed766090 cpsr: 0x60000000
   esr: 0x92000047 (Data Abort) byte write Translation fault

Binary Images:
0x100ca8000 - 0x100e7ffff APPNAME arm64  <9132dc7750703059bb23bb964dc7c319> /private/var/containers/Bundle/Application/438CAE39-5E52-4E70-A046-55DC0EE12F36/APPNAME.app/APPNAME
0x1012e0000 - 0x101337fff dyld arm64e  <d16b72c0d6193e4892622c10a1d3066f> /usr/lib/dyld
0x1d4a78000 - 0x1d4ecdfff CoreFoundation arm64e  <d2716f2f688b3d51ba8b17e6553b209e> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x1d5296000 - 0x1d5756fff CFNetwork arm64e  <eae64611a84036fea69d5658f1bcf4d0> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x1d6266000 - 0x1d656efff Foundation arm64e  <feeef9b1b0e63561adfa3ef0302d23f8> /System/Library/Frameworks/Foundation.framework/Foundation
0x1d6ee9000 - 0x1d8783fff UIKitCore arm64e  <e6e89bb5b5863725bf8f4c85dcd443bd> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x1d87aa000 - 0x1d8ab9fff QuartzCore arm64e  <a491ae8b354b35c1ab22af42a96b6704> /System/Library/Frameworks/QuartzCore.framework/QuartzCore
0x1de07a000 - 0x1de0a4fff AudioSession arm64e  <37d438b9289d39b08b671b38de65305f> /System/Library/PrivateFrameworks/AudioSession.framework/AudioSession
0x1e405f000 - 0x1e675bfff WebCore arm64e  <49f330352d3a3aa5bf5a4f25ca8b8c77> /System/Library/PrivateFrameworks/WebCore.framework/WebCore
0x1ed760000 - 0x1ed79cfff libobjc.A.dylib arm64e  <a196a0f6cadb325bbc1f5965e670f9b6> /usr/lib/libobjc.A.dylib
0x1f0b30000 - 0x1f0b38fff GraphicsServices arm64e  <75a910dc87a43b3a8c0ea868b945f5d4> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x20c479000 - 0x20c4aefff libsystem_kernel.dylib arm64e  <c2fcc05874803c14b4790064a3f843e3> /usr/lib/system/libsystem_kernel.dylib
0x245a95000 - 0x245aa0fff libsystem_pthread.dylib arm64e  <b48efcbed4f7308ba3fa172e0ea78e33> /usr/lib/system/libsystem_pthread.dylib
sxissh06

sxissh061#

问题似乎是由于更改设备方向时UIScrollView的内容大小发生变化。https://www.raywenderlich.com/2805-demystifying-ios-application-crash-logs
这个关于理解崩溃日志的教程可能对你有帮助。
谢谢

相关问题