macOS Scrivener suddenly crashing at launch for existing and new projects (nothing changed on system, sudden issue)

Hi, I’m having a sudden issue with Scrivener out of nowhere on macOS when I have been using it without issue for ages; today every single project, existing or brand new, causes a “Scrivener Internal Error” dialogue to pop up with options to either “crash” or “continue.” This happens when opening existing projects or creating new ones. Holding down shift to get to the Project Templates initial menu works, I can poke around in the unlocked options there, but the moment I try to open a project it crashes. I tried reinstalling and have nuked the support folder completely, I’ve restored it from a backup, I’ve tried to open backup projects — nada. The errors I get are either:

Exception Name: NSInvalidUnarchiveOperationException
Description: The data couldn’t be read because it isn’t in the correct format.
User Info: {
NSUnderlyingError = “Error Domain=NSCocoaErrorDomain Code=4864 “value for key ‘NS.objects’ was of unexpected class ‘NSCoreUIImageRep’ (0x1fe0a6f58) [/System/Library/Frameworks/AppKit.framework].\nAllowed classes are:\n {(\n “‘NSPDFImageRep’ (0x1fe0aa120) [/System/Library/Frameworks/AppKit.framework]”,\n “‘NSCGImageSnapshotRep’ (0x1fe0a95e0) [/System/Library/Frameworks/AppKit.framework]”,\n “‘NSString’ (0x1fe0863d8) [/System/Library/Frameworks/Foundation.framework]”,\n “‘NSCachedImageRep’ (0x1fecf9890) [/System/Library/Frameworks/AppKit.framework]”,\n “‘NSArray’ (0x1fe076760) [/System/Library/Frameworks/CoreFoundation.framework]”,\n “‘NSBitmapImageRep’ (0x1fe0aad50) [/System/Library/Frameworks/AppKit.framework]”,\n “‘NSNumber’ (0x1fe0861a8) [/System/Library/Frameworks/Foundation.framework]”\n)}” UserInfo={NSDebugDescription=value for key ‘NS.objects’ was of unexpected class ‘NSCoreUIImageRep’ (0x1fe0a6f58) [/System/Library/Frameworks/AppKit.framework].\nAllowed classes are:\n {(\n “‘NSPDFImageRep’ (0x1fe0aa120) [/System/Library/Frameworks/AppKit.framework]”,\n “‘NSCGImageSnapshotRep’ (0x1fe0a95e0) [/System/Library/Frameworks/AppKit.framework]”,\n “‘NSString’ (0x1fe0863d8) [/System/Library/Frameworks/Foundation.framework]”,\n “‘NSCachedImageRep’ (0x1fecf9890) [/System/Library/Frameworks/AppKit.framework]”,\n “‘NSArray’ (0x1fe076760) [/System/Library/Frameworks/CoreFoundation.framework]”,\n “‘NSBitmapImageRep’ (0x1fe0aad50) [/System/Library/Frameworks/AppKit.framework]”,\n “‘NSNumber’ (0x1fe0861a8) [/System/Library/Frameworks/Foundation.framework]”\n)}}”;
}

0 CoreFoundation 0x0000000191e7f8fc __exceptionPreprocess + 176
1 libobjc.A.dylib 0x0000000191956418 objc_exception_throw + 88
2 Foundation 0x00000001940e7a54 -[NSSecureUnarchiveFromDataTransformer reverseTransformedValue:] + 0
3 AppKit 0x00000001967e9fb8 -[NSBinder valueForBinding:resolveMarkersToPlaceholders:] + 144
4 AppKit 0x0000000196c02820 -[NSObjectParameterBinder _updateObject:observedController:observedKeyPath:context:] + 792
5 AppKit 0x0000000196a0a82c -[NSObject(NSKeyValueBindingCreation) bind:toObject:withKeyPath:options:] + 484
6 Scrivener 0x0000000100b940c8 Scrivener + 2228424
7 Scrivener 0x00000001009e8288 Scrivener + 475784
8 Scrivener 0x00000001009b3930 Scrivener + 260400
9 AppKit 0x00000001962f8754 -[NSWindowController _windowDidLoad] + 620
10 AppKit 0x00000001962f6d34 -[NSWindowController window] + 100
11 Scrivener 0x0000000100981cec Scrivener + 56556
12 AppKit 0x000000019692404c __102-[NSDocumentController _openDocumentWithContentsOfURL:requestedBySourceApp:display:completionHandler:]_block_invoke.368 + 188
13 CoreFoundation 0x0000000191e32614 CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 28
14 CoreFoundation 0x0000000191e32554 __CFRunLoopDoBlocks + 396
15 CoreFoundation 0x0000000191e313b4 __CFRunLoopRun + 848
16 CoreFoundation 0x0000000191eebf3c _CFRunLoopRunSpecificWithOptions + 532
17 HIToolbox 0x000000019e99c790 RunCurrentEventLoopInMode + 316
18 HIToolbox 0x000000019e99fab8 ReceiveNextEventCommon + 488
19 HIToolbox 0x000000019eb29b64 _BlockUntilNextEventMatchingListInMode + 48
20 AppKit 0x000000019674e014 _DPSBlockUntilNextEventMatchingListInMode + 236
21 AppKit 0x000000019624be48 _DPSNextEvent + 588
22 AppKit 0x0000000196d12f08 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
23 AppKit 0x0000000196d12c14 -[NSApplication(NSEventRouting) nextEventMatchingMask:untilDate:inMode:dequeue:] + 72
24 AppKit 0x0000000196244780 -[NSApplication run] + 368
25 AppKit 0x00000001962306dc NSApplicationMain + 880
26 dyld 0x00000001919c9d54 start + 7184

which accompanies creating brand new files most of the time (but also does happen when opening old ones). The other is:

Exception Name: SCRInvalidBinder
Description: The standard root items could not be located in the binder - project may be corrupt.
User Info: (null)

0 CoreFoundation 0x0000000191e7f8fc __exceptionPreprocess + 176
1 libobjc.A.dylib 0x0000000191956418 objc_exception_throw + 88
2 CoreFoundation 0x0000000191e9aed4 _CFBundleGetValueForInfoKey + 0
3 Scrivener 0x0000000104cf882c Scrivener + 2361388
4 Scrivener 0x0000000104cf7190 Scrivener + 2355600
5 Scrivener 0x0000000104ac9c84 Scrivener + 72836
6 Scrivener 0x0000000104aca744 Scrivener + 75588
7 Scrivener 0x0000000104acaf58 Scrivener + 77656
8 Foundation 0x000000019365e634 __NSFireDelayedPerform + 372
9 CoreFoundation 0x0000000191e4119c CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 32
10 CoreFoundation 0x0000000191e40e5c __CFRunLoopDoTimer + 980
11 CoreFoundation 0x0000000191e409d4 __CFRunLoopDoTimers + 280
12 CoreFoundation 0x0000000191e3177c __CFRunLoopRun + 1816
13 CoreFoundation 0x0000000191eebf3c _CFRunLoopRunSpecificWithOptions + 532
14 HIToolbox 0x000000019e99c790 RunCurrentEventLoopInMode + 316
15 HIToolbox 0x000000019e99fab8 ReceiveNextEventCommon + 488
16 HIToolbox 0x000000019eb29b64 _BlockUntilNextEventMatchingListInMode + 48
17 AppKit 0x000000019674e014 _DPSBlockUntilNextEventMatchingListInMode + 236
18 AppKit 0x000000019624be48 _DPSNextEvent + 588
19 AppKit 0x0000000196d12f08 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
20 AppKit 0x0000000196d12c14 -[NSApplication(NSEventRouting) nextEventMatchingMask:untilDate:inMode:dequeue:] + 72
21 AppKit 0x0000000196244780 -[NSApplication run] + 368
22 AppKit 0x00000001962306dc NSApplicationMain + 880
23 dyld 0x00000001919c9d54 start + 7184

I have done absolutely nothing differently with my computer, I was literally working earlier this afternoon for several hours, went to have dinner, and when I opened Scrivener again this all started. I’ve never experienced this before, but it’s happening with literally every single project.

ETA: I’m on the latest version of Tahoe (26.3.1 (a)) on an M2 Max MacBook Pro.

Any help? I can’t get into any of my projects across literal decades, and to say I’m panicked is an understatement. Thanks so much.

Specifically, what is the folder name where your the projects stored on your computer. I’m wondering if you have them in a folder which is synched with a third party cloud service, and that the sync is incomplete, thus the project files are not recognised. If so, check that you have that folder set to be “offline” (or whatever nomenclature that service uses). Or some other corruption of the files. Or maybe the error message is erroneous.

It’s not syncing with anything and it’s a variety of different projects across a variety of different locations and folders. This suddenly started happening out of nowhere without me doing anything on my end with a project that I was literally working in only a few hours before — every single Scrivener project won’t open, including brand new ones being created on the spot. It also still happens even after fully deleting Scrivener and its application data and starting over “fresh.”

I just tested and I am able to open them in the iPad version of Scrivener, thankfully, so the data is all still there and the same project file works fine — trying to copy this back and open it on my MacBook (after it was opened on the iPad) doesn’t work though so this is something weird happening out of nowhere on the macOS end. But I haven’t done any updates or installed anything and in this specific project’s case I was working on it and came back only a couple hours later to discover this issue. So I’m very, very confused.

Ok. Three more question then I’m out of ideas, other than maybe disk is failing on Mac,

  • how do you copy the files between the iPad and Mac?
  • are files you restore from the Scrivener automatic backups ok?
  • are files that you restore from the system back up ok?

I don’t usually use the iPad version of Scrivener and nothing is wrong with the MacBook, this is not how hardware failure presents itself anyway.

I copied several different projects both by copying them directly to the device via Finder as well as putting them on iCloud and opening the project directly on my iPad that way. They open fine on the iPad; the same projects do not on the MacBook. This includes backups, existing projects, or completely brand new ones. Scrivener itself opens fine. The moment it tries to do anything at all with any sort of project, it gives me a crash dialogue.

Well, … if it were me I’d delete the Scrivener app, then reinstall. Might help. I’d also use Disk Utility to do “First Aid”. Can’t hurt.

Not something I’d do especially if when relying on iCloud to get the updated version of all the Scrivener files and folders safely back on MacBook. Incomplete syncs may lead to file corruption. Your mileage may vary. Since you say all the projects are scattered around and hence maybe not in iCloud folders, not sure if this your issue, but mentioning it anyway.

I keep all my Scrivener project files in one folder on the MacBook. That folder synced with Dropbox servers, these in turn synced with iPhone and iPad.

Respectfully, I already said — twice — I had fully deleted and reinstalled the app, nor does my method of project organisation have anything to do with the issue when, as I also said several times, this affects completely blank projects too.

I don’t keep anything in iCloud — that was only to get copies of the projects onto the iPad in order to test whether or not the project themselves were corrupted as I don’t have another Mac to test on. The projects are not corrupted, so this is another issue entirely.

I’ve re-read you posts, and I don’t see where your said even once that you deleted the Scrivener app and reinstalled. My bad, I guess. I see only a reference to removing and restoring the “support” folder–which is sort of piecemeal approach. Not something I’d do unless suggested by Scrivener support.

Good luck. I have no more ideas.

To the devs: for shits and giggles testing I installed Scrivener under both Crossover (which utilises a fork of Wine) and Parallels; the same file doesn’t seem to want to load in Crossover, but it does open just fine in the Windows version being virtualised under Parallels. I don’t know if that helps with any bug tracing but I can at least confirm that all of the data is there even if I don’t want to be using the Windows version through virtualisation.

A test that might help determine whether it is the Mac version of Scrivener specifically that is struggling to open the project would be to create a new test account on your Mac, and copy one of the projects into the /Users/Shared folder so you can transfer it to the other account. I recommend using a zipped copy of the project, so that it can be copied and unzipped into the test account with minimal permission issues (if you just copy the project raw into that folder, in my experience it won’t allow you to open it from the other account).

That said, you mention getting to the template chooser, but crashing once you try to create a test project—so I don’t think it’s a content problem in your projects. For example, a common-ish problem is having the last thing you viewed in a project be corrupted, like a bad PDF. So whenever you try to load the project, it tries to load the PDF and crashes. But if you can’t even make a “Blank” project without crashing, that won’t be the issue—and there is every indication the projects are fine (from your mobile and Windows VM tests).

The test account check will still be useful though I think, because if it you can open your existing project there, or make new ones, then we at least know that it is something gone off in your user account itself. While you may not have done anything explicitly, software updates that run automatically might change the landscape, including OS updates, which themselves may break other things that haven’t updated. Old plugins, utilities and so forth are a very common indirect cause for instability in other programs on a Mac, given how closely things can work together. Since a test account will have none of your normal tools running, it provides a clean test, letting us see how Scrivener runs without your environment.

1 Like

Just for interest, I have Scrivener running happily under Crossover. Have you deleted/renamed the texttospeech .dlls in the Crossover installation of Scrivener? If not, they cause Scrivener to exit immediately after loading fonts.

:slight_smile:
Mark

1 Like

What version of Scrivener, and what version of Mac OS?

Latest versions of both.

I haven’t yet had the chance to test the different user account suggestion, I haven’t been back at my computer, but I would be very doubtful that it was a system update or anything — there was a space of a couple hours between me working without issue and going to have dinner then relaunching Scrivener and having this crashing happen. The MacBook didn’t even get a reboot in between much less run an update of anything. But I’ll give it a try later when I am at my desk again. Otherwise this, came out of nowhere and I’m very perplexed.

Is there any chance that you embedded an image file like in HEIC format?

The error message is about a problem deserializing an image.

There’s no image in the project and as I have said this crash affects any and every project, including brand new ones created from the template chooser.

@AmberV @kewms I tested a new user and, perhaps unsurprisingly, Scrivener does open the existing files that don’t work in my main one — which is interesting and unhelpful considering only a couple of hours passed between Scrivener working and it no longer doing so (without any reboots, logouts, or other changes to my system in that time as far as I’m directly aware). I’m really confused by this coming literally out of nowhere, but at least it narrows that down. Does Scrivener store anything anywhere other than Application Support? Deleting the Scrivener folder there doesn’t get me back to the “brand new installation” state that I saw in the fresh user (or the VM and Crossover, for that matter) so I’m not sure if there’s something being retained?

ETA: just in case it helps with anything: I have just discovered that if I quick-look the files that won’t open properly, I can see contents of the project (what appears to be a short summary of the first couple of files in the draft folder based on what I know is in there) anyway.

@xiamenese I wasn’t aware of needing to do that for Crossover but I’ve deleted both the texttospeech folder as well as a Qt6TextToSpeech.dll file and it still crashes immediately on trying to open a file — including creating blank ones. I can get past the “loading fonts” stage to get to the template chooser menu whether or not the texttospeech folder and files are present or deleted, it’s crashing when I try to open a project or create a new one.

AH HA. I googled further and saw that there is a preference file saved in ~/Library/Preferences, when I deleted that (and to be safe deleted my old Application Support/Scrivener file again and the .app as well) and launched Scrivener, I got the fresh-start-enter-license dialogue I had seen on other tests. This allowed me to create a blank project and, more importantly, open the existing ones that kept crashing. It’s definitely the preference file as moving my old Application Support/Scrivener directory back in still let me open or make new projects just fine and the moment I copied the old preferences file the crash comes back.

I am very confused what could have happened to the preferences file but that seems to be the issue. It’s probably not the end of the world nuking that and starting over rebuilding my preferences from scratch but let me know if you want me to test anything else with the backup of the old file.

2 Likes

Glad you got things working!

It could be absolutely nothing you did. Apple’s preference file writer has been fragile since the release of Mac OS X 10.0.0, frankly, and so much so that deleting your preferences is a very typical reboot/reinstall level troubleshooting step. They can just corrupt themselves in normal daily usage. I didn’t think to suggest it this time as the crash log was so strange, but there you go. Never underestimate trying that. :slight_smile:

If it’s an individual project that crashes on load, rather than everything, then the other place the preference writer runs is when writing project interface settings. So that also has a frequently used checklist.

3 Likes