Scrivener crashes, over and over again

Dear Scrivener support person,

Scrivener crashed earlier today when I was working on my fairly large project. Every time I try to re-start it, it says that search strings need to be synchronized and after a few minutes it crashes again. Another technical support post recommended deleting the ui.xml file from the package contents. I tried that a few times (since a new ui.xml file seems to be created every time the search strings are synchronized), but with no success. Each time when I try to start up Scrivener, it crashes. I’m attaching the error report.

Please let me know how I should proceed.

Thank you very much!
-Daria
Scrivener Error Report.txt (37.6 KB)

Hi Daria,

The most usual suspect in situations like this is a corrupt PDF or perhaps some other file in the Research folder, so if you have PDFs, JPEGs or other similar files in your research folder, the thing to do is to open the .scriv package, by control- or right-button-clicking on it and choosing “show contents” from the drop-down menu.

Navigate to the research folder and in turn try opening all the files within in it in Preview or whatever. If you have a corrupt file there, it’ll fail to open or be clearly not as should be … that’ll be the culprit. Delete it, shut down the finder windows and try restarting Scrivener.

Of course, there may be more than one, so it might be an idea to try them all if there aren’t too many … Otherwise just repeat the process till you’ve found them all.

Mind you, I had a problem in trying to convert a 1.54 .scriv to 2.0 … that turned out to be an imported .doc that, unbeknownst to me — it was merely there for archive purposes — which had turned into gibberish.

Hope that helps.
Mark

There seems to be a problem with the report - could you please repost it? (Inline in your post is fine.) We’re all on Christmas vacation at the moment so I can’t promise a quick solution, I’m afraid, but if you repost the crash report I’ll try to take a look ASAP.
Thanks,
Keith

Here is the Error Report. The main problem is that I have over a thousand PDFs there, and it would be a pain to go through all of them. One solution that I tried to implement on my own is to uninstall Scrivener and download a new version from the website. The new version opened an old version of my project, but when I clicked on what I suspect to be one of the problematic PDFS, it crashed too. But now I have a couple extra issues:

  1. The new Scrivener version doesn’t recognize my serial number, so I’ll have to get a new one to have it work?
  2. The problematic PDF (at least one of them that I identified, there may be more) opens fine on a different computer, and I know I used it in Scrivener before. So what happened? I’m working mostly with PDFs, and I’m really concerned that this may become a recurring problem…

I appreciate your help!
Thanks,
Daria
Scrivener Error report2.txt (41 KB)

Regarding the serial number, if you have a 1.x serial number then yes, you will need to update to a 2.x serial number to use version 2.x (it’s $25 to update, or free if you bought 1x. on or after 1st August 2010).

On to the problem: the crash report confirms that a PDF file is causing the problem. I thought I’d managed to avoid these issues in 2.x (1.x suffered such problems even more), but clearly some PDF files are still causing problems. If you know which PDF file is causing the problem, could you please send it to me? (Just send it to support AT literatureandlatte DOT com and mark the subject “Attn. Keith”, and I’ll take a look at it after the holidays.

Here are some steps to locate, isolate and remove the exact PDF file in the project though, so that the project can open again:

  1. Ctrl-click on the .scriv file in the Finder and select “Show Package Contents”.

  2. A window will appear showing the contents of the .scriv file. Double-click on the “Files” subfolder to open it and then on the “Docs” subfolder.

  3. You will see lots of numbered files, many of them PDF files. Make sure you are using list view in the Finder and then sort by Kind, so that all of the PDF files are grouped together.

  4. Open another Finder window and somewhere else on your hard drive create a temporary folder (e.g. a folder called “TempPDFs” in your ~/Documents folder).

  5. Select all of the PDF files from the [project name].scriv/Files/Docs folder and drag and drop them into the temporary folder you created in step (4).

  6. At this point, you can try opening the project again - it should open fine because all of the PDF files have been removed (the documents will exist in the binder but will open nothing). Close the project again once you’ve confirmed it now opens fine.

  7. Now select a few PDF files in the temporary folder and drag and drop them back into the [project name].scriv/Files/Docs folder. How many you drag and drop will depend on how many you have, really. I’d recommend doing 10 at a time, but if you have 1,000 PDF files that would take ages so you may want to do 50 at a time. So, just drag a few - 5, 10, 50 or whatever - and move onto step 8.

  8. Now open the project again. If it opens fine, you know the PDF files you just dragged are fine and the one causing problems isn’t among them.

  9. Keep repeating steps (7) and (8) until the project won’t open (and crashes or whatever). At this point, you know that the problematic file was among the last batch you moved across.

  10. Move the last batch of PDF files (the last 5 or 10 or 50 or whatever) back to your temporary folder, and now repeat steps (7) and (8) again but this time move only one file at a time. When the project crashes or won’t open, you’ve found the problem file.

Once you’ve found the problematic PDF file, remove it again, and please send it to me so that I can test it.

Hope that helps.

All the best,
Keith

The first time you get the project open, you probably also want to check File>Backup>Exclude from Automatic Backups so that you don’t have to wait for Scrivener to make a backup of your project every time you open/close for this testing.

Another, perhaps faster, way to find the culprit is to move the files by halves; that is, start with 500 of your 1,000. If no crash, you know the problem is in the other 500 (and vice-versa), then remove 250 of the offending 500. Then 125, then 62, etc. until you’re down to the problem. Of course, if it is more than one, this will take a bit more finesse, but it will reduce the number of files to be examined rather quickly. (I call this the “20 Questions” way of focusing.)

Otherwise known as a binary search procedure!

I found the problematic PDF (by going through the files one-by-one in the scrivener docs folder and eventually one of them crashed Preview), removed it, but Scrivener still refuses to open! It’s endlessly rebuilding search indexes and then crashes. Any ideas on what to do now? In the 1.0 Scrivener version, it helped to delete the ui.xml file. There is no similarly named file in the 2.0 version. Perhaps it now acquired a different name?

Yeah, that file is now in the Settings folder within the project package. You’ll find it under ui.plist.

It sounds like there is another bad PDF file in there, so keep going through them - there may be more than one (please post the new crash report though so that I can confirm this). Also, please send any bad PDF files to us at support AT literatureandlatte DOT com (marked “Attn. Keith”) so that I can test them - I’d like to ensure that Scrivener doesn’t crash when presented with bad PDF files (although it may not be possible if Preview crashes too).
Thanks,
Keith