Incessant "cannot access file" errors

I’m trying to learn to use Scrivener 1.6.0.0 with Win7.

When I try to split a file (Ctrl + K), or even Add New Text, I frequently get a lengthy error message whose important part seems to be, “The process cannot access the file because it is being used by another process.”

The file in question isn’t, as far as I know - this happens even when I’m creating new doc in Scrivener. Sometimes I get two or more seemingly identical error-message pop-ups at a time.

Usually I can get past by clicking out of the error message and then entering Ctrl + S to save. A couple of times it’s lost the new data, though.

Can somebody help me straighten this out, please? Scrivener seems quite promising (and I don’t remember it doing this to me when I experimented with an earlier version a few months ago.) But I can’t use it when I’m constantly interrupted with error messages - much less risk losing my work.

The latest 1.6 version includes some new error checking and reporting to help give warning if there is a problem saving any of the files within the project, so it sounds like you’ve run into a such a case. If you can provide a few more details, that might help narrow down what specifically is causing the problem.

The error message should give you the title and full file path of the file that can’t be accessed, e.g. “Could not save project notes” and then a few lines down, "File: ‘C:/Users/VictorMilan/Documents/MyGreatNovel.scriv/Files/Project Notes/Note-10.rtf’’. Is the same file indicated each time you see the message, or is it a different file each time? What is the file?

You mentioned you also occasionally get multiple messages simultaneously. Are these the same text, same error, but different files, or are the errors slightly different? A screenshot of those would be great, an probably a lot easier than trying to copy down all the text in them. You can use the PrintScreen key to take the snapshot, then paste into MS Paint and save as a file to attach here.

Finally, are you getting this all happening in one project, or does it occur in all your projects, even a new one? I realise you may not have many older projects, since you mention you’re learning the program, but it would be helpful to know if you’re seeing this across projects, including a newly created one, or just in the specific one.

As for what to do now, a few things:

  1. Backup the project by making a copy of the project’s entire .scriv folder and save that in another location. I like to make a backup using the zip function (right-click the folder and choose “Send to \ Compressed (zipped) folder”) to avoid accidentally opening the backup copy and editing it.

  2. Restart Windows, if you haven’t. The error that the file is in use by another program suggests that it hasn’t been closed properly, perhaps part of a system glitch, and restarting may be sufficient to clear everything so Scrivener is able to write to the files properly.

  3. If you get the error again, after clicking OK to the message, rather than simply using the Save command, make a copy of the text and paste it into another program to save it. If the save routine isn’t working for this file because it appears to be locked to another program, then your changes aren’t actually making it to the file, they’re just being held in memory and will disappear once you close the project. Copying the text to another location won’t resolve the underlying problem, but it will at least preserve your work.

  4. After you’ve copied your work and made the backup of the project and so on, run Scandisk on your drive to check for and repair any problems. It may come up clean, but since there’s a chance that this sort of error could indicate bad sectors on the hard drive, it’s worth checking for that now just to be safe. Scandisk won’t necessarily cover everything, but it’s simple to run and a good start. Microsoft’s got a page with instructions here.

Thank you very much for your help, MM.

Tried everything, including multiple reboots and running Scandisk, as well as running Scrivener with no other programs open. Still get same issues.

The good news is, Scrivener does seem to save the data despite throwing an error message every time I first attempt it.

In three tries I have generated three distinct error messages:

===

1:

The following errors occurred while saving your project.

Could not save Binder.
Identity: ‘Scrivener Folder:Plain’
Location: ‘C:/Users/Victor/Documents/Scrivener Workings/Desolation Angels.scriv/’

To avoid losing your latest changes, make sure you have enough space and write access on your storage device.
You can create a copy of your project into another location using the menu File > SaveAs.
You might also try to Compile and Save to RTF or DOC format to avoid losing your latest changes.

2 (boilerplate snipped):

Could not save project notes.
Failed to open project notes file: ‘C:/Users/Victor/Documents/Scrivener Workings/Desolation Angels.scriv/Files/Project Notes/index.xml’
Error: The process cannot access the file because it is being used by another process.’

3 (boilerplate snipped):

Could not save project notes.
Could not generate project notes file
Failed to open project notes file: ‘C:/Users/Victor/Documents/Scrivener Workings/Desolation Angels.scriv/Files/Project Notes/index.xml’
Error: ‘Could not open RTF file for writing.
File: ‘C:/Users/Victor/Documents/Scrivener Workings/Desolation Angels.scriv/Files/ProjectNotes/Note-10.rtf’
Error: The process cannot access the file because it is being used by another process.’

===

As for theme common to the latter two - “the file … is being used by another process.” - I have no idea what process that might be.

I do have a prior project, which I started after some friends kindly bought me the Scrivener license for Christmas, although I found I couldn’t spare the time, energy, and attention to learn the program well enough to use it at the time. It seemed to work great then. Now it displays the same behavior, and throws similar errors.

What can I do now, please?

Thanks for grabbing the error messages and trying the earlier steps. We’ve had a couple other reports of this same error, so we’re still looking for a common factor that might be triggering the lock on these files.

A few new things to try, both to gather some information about the issue and potentially to resolve it:

  1. In Windows Explorer, navigate to the Note-10.rtf file indicated by the error message: C:/Users/Victor/Documents/Scrivener Workings/Desolation Angels.scriv/Files/ProjectNotes/Note-10.rtf. Right-click that folder, choose properties, and then look to see if it is marked “read-only” in the attributes. Do the same for the index.xml file there.

  2. Download and install a free tool like Unlocker, and when you next get the error message that the file is being used by another process, navigate in Windows Explorer to the file indicated in the error message, right-click the file, and run Unlocker on it to get a list of the processes accessing it and share that here.

  3. If you’re willing, the next time you encounter this error, create a zipped copy of the project (leave the project open in Scrivener and navigate to the .scriv folder, then right-click that to make the zip) and send that to windows.support AT literatureandlatte DOT com with reference to this thread. Examining the files in the project from that point might help us reproduce and discover the problem (and thence, a solution!).

  4. Again, if you’re willing, run the attached diagnostic tool to quickly compile a list of your installed software. A possible cause of the problem is some kind of software that’s conflicting with Scrivener, e.g. security software that’s monitoring files on the drive or backup software, so we’re looking for common applications across the users reporting this error. You can either attach the list here or send it to windows.support AT literatureandlatte DOT com.

  5. Try changing the auto-save interval from the default 2 seconds to something more like 10 seconds in the General tab of Tools > Options. This might not solve the issue, but at any rate it will cause the messages to occur less frequently. If your text is saving in spite of these errors–which makes sense, if you’re not writing in the Project Notes area, which is the only file implicated–that may help you get on with work, even if it’s just to copy or export text to work on elsewhere while we try to resolve this problem.

  6. As a final step, with the project closed, try right-clicking the project’s .scriv file, choosing Properties, and then deselecting “Read-Only” and applying the change to all the contents. If some of the files have been wrongly set to read-only, this should correct that and may let you work in the project normally, though without knowing yet why the files were set wrong and what caused that, I wouldn’t promise this as a long-term solution even if it works initially. Still, if it does work, you can be on alert in case the error occurs again, and you may be able to note some circumstance then that’s triggering the error.
    ScrivDiagTool1.zip (4.85 KB)

Thanks much, MM!

I’ll try those things and see what happens.

Also glad to know the L&L team is looking into the issue.

Just a quick note.

I followed MM’s suggestions and they helped. A lot. I still get the same kind of error message, but far less frequently.

Thanks!