Crash Report

Howdy, I’m a newb here, and have been enjoying Scrivener for several months. So much so that I imported my Big Writing project files and folders into it last week, and have been editing and revising all week.

Today, however, after waking my MacBook Pro from a sleep, Scrivener crashed, although I can’t find the crash report. I returned to my computer this evening, opened Scrivener up, and only one of the two projects I’d been working on loaded. I received the “improperly closed or running on another machine” message several times, but each time Scrivener hung and eventually quit after trying to synchronize search strings. After several attempts the application will no longer open at all.

Attached is the first of several crash reports. Am just joining this thread, so redirect me or request additional info, as needed.
scrivener_2009-12-16-010620.txt (144 KB)

Just tried to reopen after quitting all applications except my browser, Flock, TextEdit, Activity Monitor, and Console. Received error messages, Scrivener attempt to synchronize search threads, then, crash.

I just recalled that the last thing I did in the Scrivener project before it crashed was to put a 5-6 chapters into a single folder. Otherwise, I had primarily been reading PDFs in my research file.

Here is the crash report:

Hi,

I’ve split this off into its own thread as it’s unrelated to Carradee’s crash.

One of the PDF files in your project is causing Scrivener to crash during synchronisation (and it may have been responsible for the initial crash too). Scrivener uses Apple’s PDF kit (the same as Preview) to read PDFs, and there seems to be a bug in PDFKit that can cause a crash for occasional PDF files. During synchronisation, Scrivener reads all text and PDF files and re-indexes the text for searching. In the background, this involves selecting all the text of a PDF file to get is text content. Thus, to find the problematic file and get yourself back up and running, please try the following:

  1. In the Finder, ctrl-click on the .scriv file and select “Show Package Contents”.
  2. In the Finder window that opens showing the contents of the .scriv file, switch to list view if it is not already selected, and sort by “Kind”.
  3. Scroll down to find all PDF files.
  4. One by one, try opening each PDF file in Preview. Once opened, hit cmd-A to select all of the text in Preview.

My guess is that one of the files will cause Preview to choke when you try to select all of the text. If it does, then you know that one is causing Scrivener problems, too. Move it out of the project package and then try reopening Scrivener.

Let me know how you get on, and if you do find a PDF file causing the problems, please let me know if there is anything special about it (different sized pages for instance).

All the best,
Keith

Thanks for your response. I opened each of the PDF files and selected the text, per your advice. Preview didn’t choke on any of them, but I removed the PDFs for which the text wasn’t recognized (i.e. the scanned articles.) Scrivener was still unable to syncronize, so I removed all files >9MB (an image file and half a dozen PDFs.) That seemed to work, but just in case, I removed all the files from my research folder, and will re-add them a few at a time, as needed.

I know that doesn’t help to narrow down the type of file that may have caused the crash, but I’ll post another reply if it happens again.

Strange - the crash report definitely seemed to indicate the crash happening during PDF selection. Did it actually crash, or just freeze?

Image files should have no effect on synchronisation, as only text, web and PDF files are processed (because synchronisation is really just rebuilding the search indexes of documents containing text). I’ve recently been doing some work on this for 2.0, to improve things. 2.0 will only re-index files that have been changed since the program was last open (it will keep record of this) rather than all of them. That will make things quicker, but unfortunately won’t help too much in cases such as this as the problematic PDF file would still need re-indexing.

Would you mind trying the following?

  1. Set up a new project just for testing purposes.
  2. Drag all of the PDF documents that were in the other project into the research section of the new project.
  3. Click on each of the PDF documents in the binder, one-by-one (or use the arrow keys, as that will be quicker), taking mental note of the title of the PDF document you are about to click on.

I hope that when you click on one of the PDF documents, it will crash. If it does, do the following:

  1. Ctrl-click on the .scriv file in the Finder and select “Show Package Contents”.
  2. Open ui.xml in a plain text editor such as TextEdit or TextWrangler (ctrl-click on it and select “Open with” and you’ll probably need to choose “Other…”).
  3. Delete the contents of ui.xml and replace it with the following:

[code]<?xml version="1.0" encoding="UTF-8"?>

closedSuccessfully [/code]

(This will just force the project to open without re-synchronising.)

  1. Delete the other PDFs, except for the one that causes the crash, and double-check that the one you took mental note of does indeed cause a crash.
  2. Close the project and then, in the Finder, ctrl-click on it again and select “Compress…” to make a zipped up copy of it.
  3. Send me the zipped up copy.

I hope that this will allow you to send me an example of a project with a PDF that causes the crash.

Thanks and all the best,
Keith

Keith:

Initially, Scrivener crashed. After removing a number of PDF (none of which caused Preview to choke), Scrivener simply froze during the synchronization, so i forced quit.

Per your last message, I created a test project, imported all the PDFs from the original project, viewed each of them, and none caused a crash. Two of them were “empty”, in that Adobe was also unable to open them because the files had been corrupted. However, this didn’t caused Scrivener to crash; the main editor view simply remained a blank grey screen.

Now that I am aware of the potential problem, I’ll pay closer attention to future crashes and let you know what I learn.