Xcode 在使用 EXC_ARITHMETIC (SIGFPE) / TPCSignatureStore 进行第二次构建时崩溃

问题描述 投票:0回答:1

发生在第二次构建,意味着
启动 Xcode → 构建 → 确定
更改一行 → 构建 → Xcode 崩溃

下面堆栈跟踪的开始

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               Xcode [64511]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               15.4 (22622)
Build Info:            IDEApplication-22622000000000000~2 (15F31d)
Code Type:             X86-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2024-07-31 16:18:09.2869 +1000
OS Version:            macOS 14.1.1 (23B81)
Report Version:        12
Anonymous UUID:        390641C9-2924-838D-3E81-861399026A69


Time Awake Since Boot: 11000 seconds

System Integrity Protection: disabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_ARITHMETIC (SIGFPE)
Exception Codes:       0x0000000000000001, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 8 Floating point exception: 8
Terminating Process:   exc handler [64511]

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   CallstackAnalysis                   0x7ffb0f9677f5 -[TPCSignatureStore isSignatureStoreUsable:] + 46
1   IDEPerformanceDebugger                 0x303a0e4af RuntimePerformanceIssueDebuggerAddition.populateSignatureStore() + 815
2   IDEPerformanceDebugger                 0x303a0dda8 closure #3 in closure #1 in RuntimePerformanceIssueDebuggerAddition.fetchLogs(bundleIdentifier:platform:) + 72
3   IDEPerformanceDebugger                 0x303a1062c partial apply for closure #3 in closure #1 in RuntimePerformanceIssueDebuggerAddition.fetchLogs(bundleIdentifier:platform:) + 12
4   libswiftDispatch.dylib              0x7ff81b7d4331 partial apply for thunk for @callee_guaranteed () -> (@out A, @error @owned Error) + 17
5   libswiftDispatch.dylib              0x7ff81b7d49c9 thunk for @callee_guaranteed () -> (@out A, @error @owned Error)partial apply + 9
6   libswiftDispatch.dylib              0x7ff81b7d1cf8 closure #1 in closure #1 in OS_dispatch_queue._syncHelper<A>(fn:execute:rescue:) + 88
7   libswiftDispatch.dylib              0x7ff81b7d4291 partial apply for thunk for @callee_guaranteed () -> () + 17
8   libswiftDispatch.dylib              0x7ff81b7cda1e thunk for @escaping @callee_guaranteed () -> () + 14
9   libdispatch.dylib                   0x7ff80552159a _dispatch_client_callout + 8
10  libdispatch.dylib                   0x7ff80552e513 _dispatch_async_and_wait_invoke + 98
11  libdispatch.dylib                   0x7ff80552159a _dispatch_client_callout + 8
12  libdispatch.dylib                   0x7ff80552d8e1 _dispatch_main_queue_drain + 993
13  libdispatch.dylib                   0x7ff80552d4f2 _dispatch_main_queue_callback_4CF + 31
14  CoreFoundation                      0x7ff8057e4056 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
15  CoreFoundation                      0x7ff8057a32b5 __CFRunLoopRun + 2459
16  CoreFoundation                      0x7ff8057a2352 CFRunLoopRunSpecific + 557
17  HIToolbox                           0x7ff8100449d9 RunCurrentEventLoopInMode + 292
18  HIToolbox                           0x7ff8100447e6 ReceiveNextEventCommon + 665
19  HIToolbox                           0x7ff810044531 _BlockUntilNextEventMatchingListInModeWithFilter + 66
20  AppKit                              0x7ff808db2885 _DPSNextEvent + 880
21  AppKit                              0x7ff8096a6348 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1304
22  DVTKit                                 0x17e217914 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 366
23  AppKit                              0x7ff808da3dfa -[NSApplication run] + 603
24  DVTKit                                 0x17e216a0f -[DVTApplication run] + 54
25  AppKit                              0x7ff808d77e10 NSApplicationMain + 816
26  dyld                                0x7ff8053403a6 start + 1942
ios xcode crash
1个回答
0
投票

花了几个小时尝试解决这个问题以便我可以再次编写代码后,我发现

  1. 重置 Xcode 首选项(
    ~/Library/Preferences/com.apple.dt.Xcode.plist
    已删除)时不会出现此问题
  2. plist中影响是否崩溃的行都在这个块内
"DVTAnalytics.AnalyticsDirectHangPointSource.lastRefreshAttemptDate" =     {
    DVTUserDefaultsCachingCache =         {
        "<bundle id> 5.0.5 2838 com.apple.platform.iphoneos" = "2024-07-31 13:12:12 +0000";
        "<bundle id> 5.0.6 2843 com.apple.platform.iphoneos" = "2024-07-31 07:15:22 +0000";
        "<bundle id> 5.1.0 2844 com.apple.platform.iphoneos" = "2024-07-31 04:42:07 +0000";
    };
    DVTUserDefaultsCachingKeysRecentlyUsed =         (
        "<bundle id> 5.1.0 2844 com.apple.platform.iphoneos",
        "<bundle id> 5.0.6 2843 com.apple.platform.iphoneos",
        "<bundle id> 5.0.5 2838 com.apple.platform.iphoneos"
    );
};

其中 5.1.0 等是应用程序版本,2844 等是构建版本

在这方面花了太多时间来进一步挖掘,但分享以上内容以防对某人有所帮助。 为了避免每次都刷新首选项,解决方法是删除带有
的部分

defaults delete com.apple.dt.Xcode "DVTAnalytics.AnalyticsDirectHangPointSource.lastRefreshAttemptDate"

可能需要读取默认值才能在 Xcode 中读取它们,因为有些缓存的行为非常不一致

defaults read com.apple.dt.Xcode

如果您遇到与我在谷歌搜索中没有发现任何内容相同的问题,请分享您对此的任何发现

© www.soinside.com 2019 - 2024. All rights reserved.