gpt4 book ai didi

cocoa - NSApplicationMain() 中的 strlen 发生奇怪的 cocoa 崩溃

转载 作者:行者123 更新时间:2023-12-03 17:13:09 34 4
gpt4 key购买 nike

几天前我关闭了我的 xcode 项目,当我回来时,它一直崩溃!我没有更改任何代码,所以我不知道发生了什么。我在 NSApplicationMain() 方法内的 strlen 上收到 EXC_BAD_ACCESS (code=1, address=0x0) 并查看错误堆栈,看起来我的应用程序没有甚至推出了!

这是错误堆栈

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_c.dylib 0x000000010847a650 strlen + 16
1 libsystem_c.dylib 0x00000001084c8067 strdup + 21
2 com.apple.Foundation 0x0000000104d018fb _compatDecodeValueOfObjCType + 763
3 com.apple.Foundation 0x0000000104c04da6 newDecodedValue + 1162
4 com.apple.Foundation 0x0000000104c22a09 _decodeObjectBinary + 2741
5 com.apple.Foundation 0x0000000104c21db4 _decodeObject + 226
6 com.apple.AppKit 0x000000010575991b __copyCarbonDictionariesFromRecords_block_invoke_0 + 372
7 com.apple.AppKit 0x00000001057caa35 _NSMapAndFilter + 233
8 com.apple.AppKit 0x0000000105807be2 copyCarbonDictionariesFromRecords + 30
9 com.apple.AppKit 0x000000010580799d +[NSPersistentUIManager(NSCarbonMethods) copyPersistentCarbonWindowDictionariesForBundleID:] + 144
10 com.apple.HIToolbox 0x000000010b009821 _HIPersistentUICopyPersistentCarbonWindowDictionariesForBundleID + 73
11 com.apple.HIToolbox 0x000000010b0097c7 GetPersistenceDictionariesAtLaunch() + 52
12 com.apple.HIToolbox 0x000000010b00978c WindowStateInitFirstEventTime() + 9
13 com.apple.HIToolbox 0x000000010b00915c _FirstEventTime + 50
14 com.apple.HIToolbox 0x000000010b008ffc RunCurrentEventLoopInMode + 41
15 com.apple.HIToolbox 0x000000010b008d84 ReceiveNextEventCommon + 166
16 com.apple.HIToolbox 0x000000010b008cd3 BlockUntilNextEventMatchingListInMode + 62
17 com.apple.AppKit 0x0000000105806613 _DPSNextEvent + 685
18 com.apple.AppKit 0x0000000105805ed2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
19 com.apple.AppKit 0x00000001057fd283 -[NSApplication run] + 517
20 com.apple.AppKit 0x00000001057a1cb6 NSApplicationMain + 869
21 com.littleendiangamestudios.Alone 0x0000000104b54592 main + 34 (main.m:13)
22 com.littleendiangamestudios.Alone 0x0000000104b54564 start + 52

Thread 1:
0 libsystem_kernel.dylib 0x00000001085fa6d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x000000010848eeec _pthread_workq_return + 25
2 libsystem_c.dylib 0x000000010848ecb3 _pthread_wqthread + 412
3 libsystem_c.dylib 0x0000000108479171 start_wqthread + 13

Thread 2:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00000001085fad16 kevent + 10
1 libdispatch.dylib 0x00000001083f2dea _dispatch_mgr_invoke + 883
2 libdispatch.dylib 0x00000001083f29ee _dispatch_mgr_thread + 54

Thread 3:
0 libsystem_kernel.dylib 0x00000001085fa6d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x000000010848eeec _pthread_workq_return + 25
2 libsystem_c.dylib 0x000000010848ecb3 _pthread_wqthread + 412
3 libsystem_c.dylib 0x0000000108479171 start_wqthread + 13

Thread 4:
0 libsystem_kernel.dylib 0x00000001085fa6d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x000000010848eeec _pthread_workq_return + 25
2 libsystem_c.dylib 0x000000010848ecb3 _pthread_wqthread + 412
3 libsystem_c.dylib 0x0000000108479171 start_wqthread + 13

Thread 5:
0 libsystem_kernel.dylib 0x00000001085fa6d6 __workq_kernreturn + 10
1 libsystem_c.dylib 0x000000010848eeec _pthread_workq_return + 25
2 libsystem_c.dylib 0x000000010848ecb3 _pthread_wqthread + 412
3 libsystem_c.dylib 0x0000000108479171 start_wqthread + 13

最佳答案

您的应用程序的持久状态似乎已以某种方式损坏。如果您进入 ~/Library/Saved Application State/ 目录并删除您的应用程序的目录,它应该会修复它。

关于cocoa - NSApplicationMain() 中的 strlen 发生奇怪的 cocoa 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15333079/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com