A cautionary tale

This isn’t exactly (or maay not be) a bug report, which is why I post it here and not in the bug forum.
Howumso’er, this be what happened:

I use a G5 quad, which on occasion goes into airplane mode, running its fans up and being unresponsibe for no particular reason. Well, it’s the equivalent of a crash, so you reboot. This happened while I was using Scrivener, but no grief, because it saves files frequently, right. So I reboot, and open up my novel once again. Of course I get the warning that the project was not properly closed yadda yadda and that I should’nt have it open twice. No problem, I’m just opening it. So it patches up its search strings, and away we go for another couple of hours’ work, which included splitting a number of scenes (and so creating new files as noted in the binder.)

End of day:
I close the window, and lo an behold there is another window underneath it open to the same project, AS OF THE CRASH, with the files created since the crash not in the binder. Other files that had been changed in the top window DID have the changes and were OK, but lots of material was simply gone.

Because I knew how Scrivener stores files, I looked in the package. The missing files were there all right. So I made a backup, added to the binder, and copied the contents of the backup files into the project, then deleted the now redundant files that were not being referenced. Seems to me there oughta be an easier way–any files in the package but not referenced in the binder are automatically referenced in a section at the bottom so they can be moved into place as needed.

Anyhow, the caution is: If you ever get a warning that a project wasn’t closed properly, check to see if two windows have been opened before doing any work.

All that said, Scrivener has been a great piece of software, and I look forward to it becoming better still.

Rick

Hi,

The warning actually says this:

Whilst you didn’t have the project open on two machines, I wonder if you opened two copies of Scrivener somehow? That is, if you somehow had Scrivener open twice? One copy of Scrivener cannot open the same project in two windows as you describe (it’s simply not possible as it uses the OS X document system which does not allow this); however, if you somehow have Scrivener open twice, then you can open the same project in each version of Scrivener running, as they cannot know about each other.

I’m guessing that is what happened. If so, this is how your project lost the files:

• Scrivener A opens up the project.
• Scrivener B opens up the project and can tell that the project either hasn’t been closed properly OR is open somewhere else; it spews the warning.
• You OK the warning so Scrivener B opens the project too. Now the project is open in two places.
• You work in Scrivener B, adding files to the project. The files get saved as RTFD files into the .scriv package and the file maintaining the binder and other aspects of the interface also gets updated.
• You close Scrivener B, and it auto-saves before closing.
• Now you notice Scrivener A sitting open underneath it, knowing nothing of the changes you have made in Scrivener B.
• You quit Scrivener A and on so doing, Scrivener A auto-saves (Scrivener saves on close as a precaution). The auto-save saves the current state of the binder - which doesn’t have any of the new files in it. It does not touch the underlying RTFD files, though, as it knows nothing about them.
• At this point, the project has the underlying RTFD files inside the package, but they are not represented in the binder. If you reopen the project, they should appear in a _RecoveredFiles folder in the binder, though.

It sounds as though this is what happens. Unfortunately I’m not really sure of a way around this - it would happen with pretty much any program that you opened twice.

All the best,
Keith

I’ve seen this a couple of times, once immediately after restoring a SuperDuper backup, and I am sure I did not have a second copy of Scrivener open. Did not lose any work on either occaison. Just fyi.

Well, as the warning says, it can come up either if you have two copies of the same file open somehow, or if the project wasn’t closed properly. The latter applying to the backups you mention no doubt.
Best,
Keith

Yes, I was summarizing the warning.
No, there was only one copy of Scrivener running.
Yes, I realize it should have only been able to open one copy.
When I closed the copy I was working on, there it was, the other window, apparently hidden underneath all the time without me knowing, and in the same copy of Scrivener.

I don’t pretend to know HOW this happened, only that it did happen.

Oh, and I’ve been using computers (even built some) since the mid 1960s. I’ve seen many strange things that couldn’t possibly happen, happen anyway. Isn’t technology wonderful?

Rick

Were there any errors on the console? If you haven’t shut down the computer could you check the console messages around the time the problem occurred?
Thanks,
Keith

No, there are no console errors logged within two hours either side of the incident.