应用程序有时会崩溃,有时我无法重现这种情况。我正在尝试检查日志,找出导致崩溃的代码块。下面是我的主要威胁,它崩溃了。我认为是CFRunLoop Is Calling Out To A Source0 Perform Function行(第23行)导致了崩溃,但我不确定。如何查找相关函数?
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000185fa416c mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000185fa3fdc mach_msg + 72
2 CoreFoundation 0x0000000186fa1cec __CFRunLoopServiceMachPort + 192
3 CoreFoundation 0x0000000186f9f908 __CFRunLoopRun + 1132
4 CoreFoundation 0x0000000186ece048 CFRunLoopRunSpecific + 444
5 Foundation 0x00000001879dcb1c -[NSRunLoop+ 51996 (NSRunLoop) runMode:beforeDate:] + 304
6 MyAppTargetName 0x0000000100c05464 0x100084000 + 12063844
7 MyAppTargetName 0x0000000100b70408 0x100084000 + 11453448
8 MyAppTargetName 0x0000000100b7ef64 0x100084000 + 11513700
9 MyAppTargetName 0x000000010076b6e4 0x100084000 + 7239396
10 MyAppTargetName 0x000000010076aec0 0x100084000 + 7237312
11 MyAppTargetName 0x000000010076b11c 0x100084000 + 7237916
12 MyAppTargetName 0x0000000100569c28 0x100084000 + 5135400
13 UIKit 0x000000018d09e7ac -[UIApplication _sendWillEnterForegroundCallbacks] + 172
14 UIKit 0x000000018d0d9ccc -[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:] + 2140
15 UIKit 0x000000018d0d91fc -[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:] + 452
16 UIKit 0x000000018d0c48f8 __70-[UIApplication scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 152
17 UIKit 0x000000018d0c457c -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 888
18 UIKit 0x000000018d3f5e44 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 464
19 FrontBoardServices 0x0000000188b67b8c __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke.376 + 208
20 FrontBoardServices 0x0000000188b958bc __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36
21 FrontBoardServices 0x0000000188b95728 -[FBSSerialQueue _performNext] + 176
22 FrontBoardServices 0x0000000188b95ad0 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
23 CoreFoundation 0x0000000186fa2278 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
24 CoreFoundation 0x0000000186fa1bc0 __CFRunLoopDoSources0 + 524
25 CoreFoundation 0x0000000186f9f7c0 __CFRunLoopRun + 804
26 CoreFoundation 0x0000000186ece048 CFRunLoopRunSpecific + 444
27 GraphicsServices 0x0000000188951198 GSEventRunModal + 180
28 UIKit 0x000000018cea8628 -[UIApplication _run] + 684
29 UIKit 0x000000018cea3360 UIApplicationMain + 208
30 MyAppTargetName 0x0000000100523e68 0x100084000 + 4849256
31 libdyld.dylib 0x0000000185eb05b8 start + 4发布于 2020-02-07 22:13:10
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__的意思就是“最终运行循环调用它”。这相当于意味着“你的应用程序正在运行”。这不是错误的一部分。
错误在本节中,您需要对其进行符号化:
6 MyAppTargetName 0x0000000100c05464 0x100084000 + 12063844
7 MyAppTargetName 0x0000000100b70408 0x100084000 + 11453448
8 MyAppTargetName 0x0000000100b7ef64 0x100084000 + 11513700
9 MyAppTargetName 0x000000010076b6e4 0x100084000 + 7239396
10 MyAppTargetName 0x000000010076aec0 0x100084000 + 7237312
11 MyAppTargetName 0x000000010076b11c 0x100084000 + 7237916
12 MyAppTargetName 0x0000000100569c28 0x100084000 + 5135400但是,我对代码中立即出现的这一帧表示怀疑:
5 Foundation 0x00000001879dcb1c -[NSRunLoop+ 51996 (NSRunLoop) runMode:beforeDate:] + 304这可能意味着您的代码正在尝试直接处理runloop,这在技术上是合法的,但这是一种非常高级的技术,可能会产生重大问题。但在symbolication之后,您需要查看您自己的代码。
https://stackoverflow.com/questions/60113423
复制相似问题