iOS 升级到XCode15运行项目导致XCode闪退
XCode升级到15之后运行现有的老项目会导致XCode闪退,这种闪退还很奇怪,运行第一次的时候不闪退,运行第二次的时候XCode闪退必现,这么神奇的现象着实让人摸不着头脑,XCode闪退时候的报错信息如下:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 CallstackAnalysis 0x7ffb101827f5 -[TPCSignatureStore isSignatureStoreUsable:] + 46
1 IDEPerformanceDebugger 0x1483fa4cf RuntimePerformanceIssueDebuggerAddition.populateSignatureStore() + 815
2 IDEPerformanceDebugger 0x1483f9dc8 closure #3 in closure #1 in RuntimePerformanceIssueDebuggerAddition.fetchLogs(bundleIdentifier:platform:) + 72
3 IDEPerformanceDebugger 0x1483fc64c partial apply for closure #3 in closure #1 in RuntimePerformanceIssueDebuggerAddition.fetchLogs(bundleIdentifier:platform:) + 12
4 libswiftDispatch.dylib 0x7ff819b72331 partial apply for thunk for @callee_guaranteed () -> (@out A, @error @owned Error) + 17
5 libswiftDispatch.dylib 0x7ff819b729c9 thunk for @callee_guaranteed () -> (@out A, @error @owned Error)partial apply + 9
6 libswiftDispatch.dylib 0x7ff819b6fcf8 closure #1 in closure #1 in OS_dispatch_queue._syncHelper<A>(fn:execute:rescue:) + 88
7 libswiftDispatch.dylib 0x7ff819b72291 partial apply for thunk for @callee_guaranteed () -> () + 17
8 libswiftDispatch.dylib 0x7ff819b6ba1e thunk for @escaping @callee_guaranteed () -> () + 14
9 libdispatch.dylib 0x7ff8037fb59a _dispatch_client_callout + 8
10 libdispatch.dylib 0x7ff803808513 _dispatch_async_and_wait_invoke + 98
11 libdispatch.dylib 0x7ff8037fb59a _dispatch_client_callout + 8
12 libdispatch.dylib 0x7ff8038078e1 _dispatch_main_queue_drain + 993
13 libdispatch.dylib 0x7ff8038074f2 _dispatch_main_queue_callback_4CF + 31
14 CoreFoundation 0x7ff803abee36 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
15 CoreFoundation 0x7ff803a7e065 __CFRunLoopRun + 2459
16 CoreFoundation 0x7ff803a7d102 CFRunLoopRunSpecific + 557
17 HIToolbox 0x7ff80e3559d9 RunCurrentEventLoopInMode + 292
18 HIToolbox 0x7ff80e3557e6 ReceiveNextEventCommon + 665
19 HIToolbox 0x7ff80e355531 _BlockUntilNextEventMatchingListInModeWithFilter + 66
20 AppKit 0x7ff80708b7b9 _DPSNextEvent + 880
21 AppKit 0x7ff807983f64 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1304
22 DVTKit 0x1047af914 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 366
23 AppKit 0x7ff80707cd32 -[NSApplication run] + 603
24 DVTKit 0x1047aea0f -[DVTApplication run] + 54
25 AppKit 0x7ff807050d41 NSApplicationMain + 816
26 dyld 0x7ff803618386 start + 1942
进过分析可能跟 TPCSignatureStore isSignatureStoreUsable: 这个方法的调用有关,但是又没找到该方法是哪个三方库里面的,所以,索性就不去管他,下面说一下我这里的两个解决方案:
- XCode回退到14版本,经过验证,不会有再有这样的闪退问题;
- 删除 ~/Library/Developer/Xcode/Products文件夹,然后重新运行,实测,该方法有效;