Crash generating PDF

After upgrading to Catalina and Scrivener 3.1.4, I have regular crashes when trying to generate PDF documents. I tested with several known-good projects (i.e. they worked before the upgrade). All of them now crash. In testing, it appears to perhaps be size-related, but I’m not sure. Attached is the crash log.
Scrivener Crash.txt (141 KB)

I note from your report you appear to be using a beta version? I’m not seeing anything like this on my test partition running 15.0, but if it is size related then I might not be testing with anything large enough to trigger it. I may also be not doing whatever it is you are doing to generate a PDF—I presume you mean you are pressing ⌘P with the Corkboard view open, printing index cards and then clicking the PDF button from the print dialogue to save it to PDF?

Something I like to try is create a quick empty Mac test account, copy the problematic project over to it, and ensure the problem happens there as well.

Thanks for any additional information you can provide.

Sorry, no - I’m using ‘compile’. This happens both on my Catalina production machine and my Catalina beta machine. I happened to post the crash from the laptop running the beta because I wanted to see if it was related to the Catalina gold release.

The successfully generated PDF is 9.8MB. The .scriv project is 11MB. The book is 640,000 weds in 100 chapters.

That is a lot of words, I wasn’t anywhere near that. :slight_smile:

So I took the Scrivener user manual (which is around half that if you lump both Win and Mac text together), and duplicated the entire Draft, which gave me more like what you’re working with. I also left its extensive screenshot repository out of the picture, as your total size numbers indicate your work is largely just text with few, if any, illustrations.

I monitored Scrivener’s memory usage throughout, using Activity Monitor, and while it did get close to 2gb, I wouldn’t call that out of line for a job of this magnitude. This got all the way through the compile phase, and entered the portion where it hands the job over to the Mac’s PDF infrastructure, to assemble all of the data into a single file. In the GUI, you’ll know you’ve hit that phase if it gets to the pop-up progress bar which says something like “Saving Pages”, and is printing out a live reading of the pagination progress. I looked away for a moment, and at some point that’s what crashed, taking Scrivener down with it. I got a very similar crash report, all primarily involving Cocoa print stuff via AppKit.

If that correlates with what you’re seeing, I’m not sure if that’s something we can actually fix! This more like saying your print driver crashed halfway through printing—the host software that started the process is just that, a host waiting for it to finish its job. This appears to be part of 10.15, which is evidently not as robust as it was in 10.14.

My recommendation for the moment would be to compile to RTF instead, and pass the final PDF generation off to another tool—preferably one with its own engine rather than another that may depend upon Apple infrastructure. Word and LibreOffice will probably be the best bets. Alternatively, if you can cut this up into smaller jobs, and compile say three PDF files instead of one, gluing them together in Acrobat later on, that could work.

We can take a closer look at with debugging tools, but like I say, I’m not hopeful that any modification to Scrivener’s code will change what happens when you feed the Mac a +1,800 page document and tell it to make a PDF out of it.

That is exactly what happened. I did run an RTF through Pages to get pdf to my early readers, so I have a workaround for the moment. I’ll look to see if there’s an updated printer driver (though not sure that will help).

Just FYI, that’s just one of 25 books of similar length I’ve written in the last four years. :slight_smile: