从昨天开始,我的 10.9 Preview.app 在打开任何文件时总是崩溃。
当我打开它时,它会询问是否重新打开旧窗口;如果我选择是,它就会崩溃。如果我选择不重新打开并选择文件,它也会崩溃。就像我双击任何 pdf 或图像时一样。
我能做些什么?
以下是日志:
Process: Preview [1960]
Path: /Applications/Preview.app/Contents/MacOS/Preview
Identifier: com.apple.Preview
Version: 8.0 (859)
Build Info: Preview-859000000000000~1
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Preview [1960]
User ID: 501
Date/Time: 2014-11-02 19:56:52.700 +0100
OS Version: Mac OS X 10.10 (14A388a)
Report Version: 11
Anonymous UUID: AB39FEBF-7960-770F-2DE8-1D5525096B1A
Time Awake Since Boot: 6900 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderSet initWithObjects:count:]: attempt to insert nil object from objects[0]'
terminating with uncaught exception of type NSException
abort() called
Application Specific Backtrace 1:
0 CoreFoundation 0x00007fff8def064c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff89e2b6de objc_exception_throw + 43
2 CoreFoundation 0x00007fff8dda782f -[__NSPlaceholderSet initWithObjects:count:] + 399
3 CoreFoundation 0x00007fff8de23e5f +[NSSet setWithObject:] + 47
4 AnnotationKit 0x000000010170934c -[AKAttributeController _updateStateOnSenderFromSelf:] + 304
5 AnnotationKit 0x00000001017084f3 -[AKAttributeController _updateStateOnSender:] + 135
6 AnnotationKit 0x0000000101704eb6 -[AKAttributeController validateAttributeSender:] + 213
7 AnnotationKit 0x0000000101709add -[AKActionController validateSender:] + 206
8 AnnotationKit 0x00000001016cb837 -[AKTextAttributesViewController validateUserInterfaceItems] + 116
9 AnnotationKit 0x00000001017479be -[AKToolbarViewController_Mac revalidateItems] + 411
10 AnnotationKit 0x0000000101707467 -[AKAttributeController _syncAttributesFromSelectedAnnotationsToUI] + 82
11 AnnotationKit 0x0000000101704f69 -[AKAttributeController setModelControllerToObserveForSelections:] + 143
12 AnnotationKit 0x00000001016d9c98 -[AKController observeValueForKeyPath:ofObject:change:context:] + 887
13 Foundation 0x00007fff8b871c73 NSKeyValueNotifyObserver + 382
14 Foundation 0x00007fff8b870e48 NSKeyValueDidChange + 463
15 Foundation 0x00007fff8b8759ad -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] + 118
16 Preview 0x0000000101457f2a Preview + 110378
17 Preview 0x0000000101451e57 Preview + 85591
18 Preview 0x0000000101448f99 Preview + 49049
19 AppKit 0x00007fff8c12d637 -[NSWindowController _windowDidLoad] + 586
20 AppKit 0x00007fff8c1147f2 -[NSWindowController window] + 110
21 Preview 0x0000000101446fb6 Preview + 40886
22 AppKit 0x00007fff8c115971 -[NSWindowController showWindow:] + 36
23 Preview 0x000000010144843a Preview + 46138
24 Foundation 0x00007fff8b899fac -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 954
25 Foundation 0x00007fff8b899ab0 -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 131
26 Preview 0x0000000101448363 Preview + 45923
27 Preview 0x0000000101447160 Preview + 41312
28 Preview 0x000000010153b3fd Preview + 1041405
29 libdispatch.dylib 0x00007fff85840323 _dispatch_call_block_and_release + 12
30 libdispatch.dylib 0x00007fff8583bc13 _dispatch_client_callout + 8
31 libdispatch.dylib 0x00007fff85847cbf _dispatch_main_queue_callback_4CF + 861
32 CoreFoundation 0x00007fff8de43c59 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
33 CoreFoundation 0x00007fff8de002ef __CFRunLoopRun + 2159
34 CoreFoundation 0x00007fff8ddff838 CFRunLoopRunSpecific + 296
35 HIToolbox 0x00007fff900e543f RunCurrentEventLoopInMode + 235
36 HIToolbox 0x00007fff900e51ba ReceiveNextEventCommon + 431
37 HIToolbox 0x00007fff900e4ffb _BlockUntilNextEventMatchingListInModeWithFilter + 71
38 AppKit 0x00007fff8beeb821 _DPSNextEvent + 964
39 AppKit 0x00007fff8beeafd0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
40 AppKit 0x00007fff8bedef73 -[NSApplication run] + 594
41 AppKit 0x00007fff8beca424 NSApplicationMain + 1832
42 libdyld.dylib 0x00007fff846455c9 start + 1
43 ??? 0x0000000000000001 0x0 + 1
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff90e6e282 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff868ceb73 abort + 129
2 libc++abi.dylib 0x00007fff8f285a21 abort_message + 257
3 libc++abi.dylib 0x00007fff8f2ad9d1 default_terminate_handler() + 267
4 libobjc.A.dylib 0x00007fff89e2f6c6 _objc_terminate() + 103
5 libc++abi.dylib 0x00007fff8f2ab0a1 std::__terminate(void (*)()) + 8
6 libc++abi.dylib 0x00007fff8f2ab113 std::terminate() + 51
7 libobjc.A.dylib 0x00007fff89e2f4ef objc_terminate + 9
8 libdispatch.dylib 0x00007fff8583bc27 _dispatch_client_callout + 28
9 libdispatch.dylib 0x00007fff85847cbf _dispatch_main_queue_callback_4CF + 861
10 com.apple.CoreFoundation 0x00007fff8de43c59 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
11 com.apple.CoreFoundation 0x00007fff8de002ef __CFRunLoopRun + 2159
12 com.apple.CoreFoundation 0x00007fff8ddff838 CFRunLoopRunSpecific + 296
13 com.apple.HIToolbox 0x00007fff900e543f RunCurrentEventLoopInMode + 235
14 com.apple.HIToolbox 0x00007fff900e51ba ReceiveNextEventCommon + 431
15 com.apple.HIToolbox 0x00007fff900e4ffb _BlockUntilNextEventMatchingListInModeWithFilter + 71
16 com.apple.AppKit 0x00007fff8beeb821 _DPSNextEvent + 964
17 com.apple.AppKit 0x00007fff8beeafd0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
18 com.apple.AppKit 0x00007fff8bedef73 -[NSApplication run] + 594
19 com.apple.AppKit 0x00007fff8beca424 NSApplicationMain + 1832
20 libdyld.dylib 0x00007fff846455c9 start + 1
Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff90e6f22e kevent64 + 10
1 libdispatch.dylib 0x00007fff8583ea6a _dispatch_mgr_thread + 52
Thread 2:
0 libsystem_kernel.dylib 0x00007fff90e6e946 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff87cae4a1 start_wqthread + 13
Thread 3:
0 libsystem_kernel.dylib 0x00007fff90e6e946 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff87cae4a1 start_wqthread + 13
Thread 4:
0 libsystem_kernel.dylib 0x00007fff90e6e946 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff87cae4a1 start_wqthread + 13
Thread 5:
0 libsystem_kernel.dylib 0x00007fff90e6e946 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff87cae4a1 start_wqthread + 13
Thread 6:: Dispatch queue: AK_buildFontFamilyMenuOperationQueue :: NSOperation 0x6000006427f0 (QOS: USER_INITIATED)
0 libsystem_kernel.dylib 0x00007fff90e6952e mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff90e6869f mach_msg + 55
2 libFontRegistry.dylib 0x00007fff911f84cc XTSendCopyPropertiesForFontsMatchingRequestSandboxed + 160
3 libFontRegistry.dylib 0x00007fff912065bb TGlobalFontRegistrySandboxedImp::CopyPropertiesForFontsMatchingRequest(__CFDictionary const*, __CFSet const*, TFontQueryOptions const&) const + 247
4 libFontRegistry.dylib 0x00007fff911e8c8c XTCopyFontsWithProperties + 161
5 com.apple.CoreText 0x00007fff8cca15a1 TDescriptorSource::CopyDescriptorsForRequest(__CFDictionary const*, __CFSet const*, CFComparisonResult (*)(void const*, void const*, void*), void*, unsigned long, TCFRef<__CFArray const*>*) const + 867
6 com.apple.CoreText 0x00007fff8cc4ecda TDescriptorSource::CopyDescriptorForRequest(__CFDictionary const*, __CFSet const*, CFComparisonResult (*)(void const*, void const*, void*), void*, unsigned long) const + 138
7 com.apple.CoreText 0x00007fff8cc23488 TDescriptor::CreateMatchingDescriptorInternal(__CFSet const*, bool) const + 600
8 com.apple.CoreText 0x00007fff8cc2311c TDescriptor::InitBaseFont(bool) + 38
9 com.apple.CoreText 0x00007fff8cc831e2 CTFontDescriptorsCopyAttributesInternal(__CFArray const*, __CFSet const*, unsigned int, bool) + 466
10 com.apple.CoreText 0x00007fff8cc82ff2 CTFontDescriptorsCopyAttribute + 70
11 com.apple.CoreText 0x00007fff8cc954de TCollection::CopyFontAttribute(__CFString const*, unsigned int) const + 40
12 com.apple.AnnotationKit 0x00000001016cdcb4 __54-[AKTextAttributesViewController _buildFontFamilyMenu]_block_invoke + 135
13 com.apple.Foundation 0x00007fff8b9a52e8 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
14 com.apple.Foundation 0x00007fff8b891905 -[NSBlockOperation main] + 97
15 com.apple.Foundation 0x00007fff8b87059c -[__NSOperationInternal _start:] + 653
16 com.apple.Foundation 0x00007fff8b8701a3 __NSOQSchedule_f + 184
17 libdispatch.dylib 0x00007fff8583bc13 _dispatch_client_callout + 8
18 libdispatch.dylib 0x00007fff8583f365 _dispatch_queue_drain + 1100
19 libdispatch.dylib 0x00007fff85840ecc _dispatch_queue_invoke + 202
20 libdispatch.dylib 0x00007fff8583e6b7 _dispatch_root_queue_drain + 463
21 libdispatch.dylib 0x00007fff8584cfe4 _dispatch_worker_thread3 + 91
22 libsystem_pthread.dylib 0x00007fff87cb06cb _pthread_wqthread + 729
23 libsystem_pthread.dylib 0x00007fff87cae4a1 start_wqthread + 13
Thread 7 and so on
正如 @agtoever 所建议的,我从终端打开了预览,并得到了一份很长的崩溃日志。我认为重要的部分是:
Preview[2676:410618] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderSet initWithObjects:count:]: attempt to insert nil object from objects[0]'
答案1
根据您在问题和评论中输入的信息,预览应用似乎已损坏。这种情况有时会在极少数情况下发生。我认为从现在起您有两个选择:
- 冒险路线:从安装下载中提取并重新安装预览版
- 可能影响的路线:重新安装OSX
我建议您先尝试第一条路线,如果失败,再尝试第二条路线。
1. 冒险路线:从安装下载中提取并重新安装预览版
- 下载并安装和平主义者,一个从 OSX 安装文件中提取软件的工具。
- 获取 OSX 安装 DVD 或(如果没有)下载App Store 中的 OSX。
- 使用 Pacifist 浏览已下载的 OSX 安装映像。导航至:“Essentials.pkg 的内容”>“应用程序”>“Preview.app”,然后单击以(重新)安装它。
2.可能影响的路线:重新安装OSX
- 获取 OSX 安装 DVD 或(如果没有)下载App Store 中的 OSX。
- 开始安装(如果已经安装了 Yosemite,我不确定这是否有效;我认为没问题。如果有人能确认这一点就好了!)
- 当您的 Mac 在安装过程中重新启动时,选择“重新安装 OSX”选项。
请注意,使用选项 2 时,您的数据和设置应该被保存下来,但不依赖它。升级操作系统之前,请务必备份文件和设置。
答案2
我刚刚遇到了类似的问题,正如其中一条评论中提到的,删除 ~/Library/Containers/com.apple.Preview/ 对我有用。
答案3
我也遇到了同样的崩溃,堆栈跟踪也相同。这是由我从系统中删除的字体引起的,这也是我在 Preview 的注释工具中使用的最后一个字体。
解决方法是重新安装字体,打开预览,将注释工具中的字体更改为其他字体,然后删除该字体。归档 rdar://problem/20094667
答案4
网络上的其他类似帖子提示我,这可能与字体丢失或损坏有关。
就我的具体情况而言,我之前安装了 Microsoft Office 及其相关字体,随后又删除了它。
我重新安装了 Office 的字体后,即使再次删除 Office 字体后,预览仍然开始工作。