Chapters go missing under heavy load

I’ve noticed a peculiar bug a couple of times now. I’m not sure whether this happens on Windows too or only when running the Windows version in Wine, but it seems like poor handling of an unexpected error condition.

What happens is that I’m running Scrivener in Wine and I’m running something CPU and disk-intensive in another workspace, for example transcoding a video file. I select a different scene in Scrivener and I get a dialog box saying something like ‘Scrivener cannot read RTF file’ and then the scene is blank. I quit and reopen it and the scene is still blank.

However, the actual RTF file is fine; I can open it in Open Office and the text is all there so I can then copy and paste it back into Scrivener. It seems to have somehow flagged the file as empty even though the contents are still there.

I’ve no idea what causes that error dialog to appear, but you might want to investigate what causes Scrivener to forget about the contents of the RTF file when the box does appear; that’s presumably going to affect the code running on real Windows even if you can’t trigger the error dialog in the same way.

Edit: one other thing, when I diff the Scrivener files after the bug against the previous version it looks like the text for that scene has been deleted from a file called search.indexes; I’m not sure whether that’s why the scene appears to be empty even though the RTF is valid.

Huh, it could be a memory thing. I’ve had Scrivener (WINE) open while playing games (also on WINE), and I’ve had no issues. HOw much RAM do you have?

Also, I’ve noticed some strangeness with other WINE programs running, even when they’re installed to a separate wine prefix. For instance, Scrivener running used to crash Steam.

Can you open the file when you’re not doing video transcoding? Can you compile or export the files? It sounds like some sort of corruption happened. Can you delete the files that don’t show up and readd them? (That is, restore it from the RTF.)

I’ve actually had this on the Windows version as well when running other programs, usually near the end of a session close to logging off time.

The “blank edit screen” effect happened to me with Scrivener installed on Linux Mint 12 KDE, on a P-4 'desktop box with 1.2 GB RAM. I used the .deb pkg to install. I was never able to get Scrivener running under Wine. Blank screen of frustration was last straw. Scrivener is a “make or break” application for me, so Linux went away and I’m back on a clean install of XP.

<Add update –

Another thread explained that the appearance settings got changed to all gray … and resetting them solved the problem. Meanwhile, I’ve discovered CrunchBang linux, a debian version that simply flies on my old Dell 5K laptop and so far proves to be rock solid and a joy to use. The .deb pkgs of Scrivener install and run beautifully. For any writer who enjoys keyboard desktop navigation, free of the mouse tyranny, try #! (CrunchBang). =GB=

OUt of curiosity, how much RAM do y’all have? What about swap (if applicable)? CPU? What else are you running when Scrivener does that? I can’t make it blank.

I have 3 GB of Ram and a duo core processor. It tends to happen when Windows is installing an update or I have lots of other programs open.

I’ve got 6GB here and 1GB of swap space which has never been used so far. I just remembered that I posted this because I hit the problem again today :slight_smile:.

Geez. That should be more than enough. I’ve got 4GB and I think I forgot swap, and I haven’t found that problem, and I’ve got one project at about 75,000 words.

What else were you running? Were you running any other WINE apps? If you’re running Scrivener in a different wineprefix from the other app, it can cause some issues. For instance, Steam will crash with Scrivener running.

TV (via USB), a graphics-intensive video game (via WINE), and Scrivener running at the same time doesn’t cause issues for me. Scrivener was kind of slow and my FPS was crap, but nothing disappeared.

I don’t believe I had anything else running in Wine. The CPU was at about 50% from video transcoding and the disk was getting hammered reading the video file and writing the transcoded file back out.

Hrm. Do you have a halfway decent video card? Although I’m not sure how much of that is offloaded to the GPU.

Do chapters disappear when you aren’t transcoding video? I’m thinking your computer’s just getting hammered.

It’s an Nvidia GT330M, which plays even modern games on medium graphics quality and older ones on high. So yes, it’s pretty decent for a laptop.

The thing is, the chapters don’t disappear. The chapters are still in the RTF file. Scrivener just claims it can’t read the file and then displays it as a blank page. That wouldn’t matter if it re-read the RTF file next time I opened the document, but instead it still displays it as a blank page even though the text is still in the RTF file.

It’s more like Scrivener times out when there’s a delay opening the file because the hard disk is getting hammered by the video transcoding, and then it sets a flag somewhere saying the file is empty and never tries to read it again.