Project crashes on load after creating style for image lines

Scriv version 3.5.2, Mac OS 15.7.3 on MacBook Pro M1 Max

My computer crashed, and now one of the projects I had open won’t open.

When I double click on it, Scrivener opens, and I get the file loading dialog, but it hangs at ~5-10%, and eventually Scrivener stops responding. for some reason, I only have one backup, and it’s from six days ago. That opens, but is missing six days worth of work.

Strangely, it opens fine on my iPhone. If I could export a copy from there

Things I have tried:

Copied the file to my the desktop. This gives the message that the project is open elsewhere. If I choose the option to create copy, it does so, then hangs as above. If I choose continue, it hangs as above.

Restarted computer again (why not?)

Deleted the ui-common.xml, and ui.xml files from the package (on a copy).

Deleted Scrivener’s prefs.

Used Rewind on Dropbox to revert to an earlier version.

Create a new project and tried to import the damaged project. That hangs as if I were opening the damaged project (but without the loading dialog).

Duplicated the project on my iPhone, then tried to open dupe on my MacBook. Same result.

I can import the data folders into a new project, but this project has a new file, and I’ve done a lot of editing over the past six days.

We may be able to repair the original project, which would be preferable to trying to recover its content into a new one (that process just imports content, not settings, metadata types and so forth). If it is something you’d be willing to let us try and fix, get in touch with us, and if the project is 10mb or smaller when zipped, send it as an attachment, or if larger, use a file sharing method.

Otherwise we could walk you through some recovery steps, but it might get a bit technical from the sounds of your symptoms. Basically it sounds like the system crashed while it was working on one or more files, which may now be corrupted. As it attempts to rebuild the index, it runs into that corruption and crashes again. Thus the trick will be to track down which items are failing, set them aside, let it rebuild without them, and then attempt to repair or recover the text from those items.

The iOS version will not have this problem as it works with the project in a much more minimal fashion. This is why any attempts to copy or duplicate, from any platform, are just repeating the problem.

Thank you!

I’ve sent the file.

Just to wrap this up, in case anyone else runs into this odd problem again:

AmberV figured out that it was my styles.xml file that was causing the issue.

I took a look at it and discovered that an entire image had been embedded in the file. When I had aligned an image, then created a style from that, the app had dropped the image data in with the style. All I had to do was delete that one style definition (it was the last style I’d created, so it was easy to find) and all was well.

If you ever have to deal with this (and what are the odds of that), make sure and backup at least styles.xml first, in case you mess up.

1 Like

Here’s my bug summary:

Under certain circumstances, a picture can end up embedded in styles.xml, and, if it’s a large enough image, cause scrivener to hang on opening the project.

Reproduction steps:

  1. Create a new project using the Novel template.
  2. Open the default scene and click into it for editing.
  3. From the Insert menu, choose “image from file…”
  4. Choose a large image from your hard drive (10MB was big enough for me)
  5. Select the paragraph containing the image.
  6. In your Styles palette, click “+” to create a new style.
  7. Make sure “Save all formatting” is selected and that the check boxes for preserve font size and preserve font family are checked.
  8. Give the style a name and click “OK”.
  9. Save the project and close it.
  10. Attempt to open the project.

I tried this a couple of times and it reproduced consistently. Some of those steps may be unnecessary, but I didn’t have the executive function to narrow it down further.

1 Like

Thank you for nailing that down! I had tried to reproduce this, even going to the point of intentionally crashing the software after saving the style, to see if it was a problem that only surfaced with temporary writes that get cleaned up on a safe close, but nope!

Turns out the secret ingredient is how you phrased the line selection. I have made many styles from lines with images before, but I’ve always just dropped the cursor after the image, since that’s all you need for it to copy all paragraph styles, fonts, etc. The trick to trigger the bug though is to fully select the image line.

I’ll get this written up. I’ve also adjusted the thread title to help others find it better, as it turned out the system crash was purely coincidental.

2 Likes