4

Since yesterday, my 10.9 Preview.app always crashes when opening any file.
When I open it, it asks whether to reopen older windows; If I choose yes it crashes. If I choose not to and select a file it also crashes. As it does when I double click any pdf or image.

What can I do?

Here is the log:

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

As @agtoever suggested, I opened Preview from Terminal and got a lengthy log with the crash. I think the important part is:

Preview[2676:410618] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderSet initWithObjects:count:]: attempt to insert nil object from objects[0]'
3
  • 2
    Have you tried removing ~/Library/Preferences/com.apple.preview* file(s)?
    – radex
    Nov 3, 2014 at 10:50
  • 2
    It appears that a system routine throws an exception and kills the preview app for that. Sometimes the application provides more context about the exception that is thrown if you start the application from a terminal. Please open a Terminal and execute Preview from there (probably: /Applications/Preview.app/Contents/MacOS/Preview) and append any relevant output to your question.
    – agtoever
    Nov 5, 2014 at 13:32
  • 4
    You could also try to delete ~/Library/Containers/com.apple.Preview/.
    – Lri
    Nov 7, 2014 at 17:03

6 Answers 6

2
+50

Based on your input in the question and in the comments, it looks like the Preview app became corrupted. This sometimes happens on very rare occasions. I think you have two options from this point on:

  1. Adventurous route: extract and re-install Preview from the installation download
  2. Possibly impactful route: re-install OSX

I recommend you try the first route first and if that fails, try the second one.

1. Adventurous route: extract and re-install Preview from the installation download

  • Download and install Pacifist, a tool to extract software from OSX installation files.
  • Get your OSX installation DVD or (if you don't have any) download OSX from the App Store.
  • Use Pacifist to browse the downloaded OSX installation image. Navigate to: "Contents of Essentials.pkg" > "Applications" > "Preview.app" and click to (re)install it.

2. Possibly impactful route: re-install OSX

  • Get your OSX installation DVD or (if you don't have any) download OSX from the App Store.
  • Start the installation (I'm not exactly sure if this works if Yosemite is already installed; I think it's ok. Would be nice of someone could confirm this!)
  • When your Mac reboots during installation, select the "Re-install OSX" option.

Note that using option 2 your data and settings should be preserved, but don't depend on it. Always make a backup of your files and settings before upgrading your OS.

10

I just had a similar problem and as mentioned in one of the comments deleting ~/Library/Containers/com.apple.Preview/ worked for me.

4
  • This is really a comment and not an answer to the original question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post.
    – DavidPostill
    Apr 3, 2015 at 4:46
  • 2
    I tried every other answer in this question and only your solution solved it for me.
    – carlosdc
    Apr 7, 2015 at 21:15
  • Worked for me also - thank you. After installing the OSx El Capitan 10.11 beta I could no longer open Preview - executing rm -rf ~/Library/Containers/com.apple.Preview/* in a Terminal fixed it for me.
    – joensson
    Jun 9, 2015 at 12:13
  • For me it was enough to delete "~/Library/Containers/com.apple.Preview/Data/Library/Saved Application State"
    – cachius
    Apr 24, 2023 at 13:07
3

I was also having this crash with the same stack trace. It was caused by a font that I had removed from my system, which was also the last font I had used in Preview's annotation tool.

The workaround was to install the font again, open Preview, change the font in the annotation tool to a different one and then remove the font. Filed rdar://problem/20094667

1

I was having this issue for a couple days and I started to really worry about by computer. After trying countless things to relieve the problem of text edit and preview crashing, I finally solved the issue with one simple fix.

What solved the problem was a simple SMC reset of my computer (Macbook Pro)

What I understand is that this temporarily takes power away from everything inside the computer so that when the computer turns back on all things have been restored to proper settings.

Follow the link below on instructions on how to do this, making sure you follow the instructions that apply to your model of computer.

Hope this helps!

http://support.apple.com/en-us/HT201295

1

Other similar threads around the web tipped me off that it may be related to fonts being missing or corrupted.

In my particular case, I had previously installed and subsequently removed Microsoft Office and it's associated fonts.

I reinstalled just Office's fonts and Preview started working again, even after once again removing the Office fonts.

1

I had the same problem, after remove the font set of Microsoft Office from my mac. The problem might be caused by conflicting font files, inhibiting Preview from starting up.

I fixed the problem by removing the folder in the Terminal with rm -rf ~/Library/Containers/com.apple.Preview/* and the fixing the fonts with the Font Book App, preinstalled on OSX. In the Font Book App, went through all grey (disabled) font entries and selected from the context menu "validate font" and "enable font". The Preview started up without problems.

See also here how to fix fonts on OSX: http://www.macissues.com/2014/04/18/how-to-troubleshoot-font-problems-in-os-x/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .