Possible Memory Leak Bug

Beta 12 has been working great for weeks. I’ve been working on a large project that will eventually be broken up into several books, but for now is a series of chapters with a total of 994 scenes and 956,000 words. I was working today when windows 10 rebooted for some reason. I suspected a windows update forced a reboot. Thanks Microsoft. But after I got Scrivener open and wrote a few more scenes I hit Ctrl + S to save and it took longer than normal. I wrote more and saved again and Scrivener became unresponsive. Windows rebooted again.

I opened task manager and sorted processes by memory and started Scrivener again. It opened my project and only used 442 MB of memory. I started typing away and everything was fine until I hit Ctrl + S. Everything froze for a couple minutes until it was over 1 GB of memory used by Scrivener, then it unfroze. As a test I typed one more word and hit Ctrl + S and Scrivener froze as it consumed all 10 GB or RAM until windows rebooted. Now every time I reopen this project and try to work on it, most actions trigger the memory issue and I have to kill the app before windows reboots.

This doesn’t happen on smaller projects, but my large project has become too big to be usable.

  • I hate to say this. If Windows rebooted mid-session, the installation may now be corrupt (although unlikely, it’s possible). Complete removal and reinstallation may be a good idea. (Complete = uninstall. Delete the directory it was installed in. Reinstall.) I’d do this first, before editing anything more. Clean reinstall.

  • Another possiblity is the project directory structure or files have become corrupt. Create a new project. IMPORT the old project, and see if that helps.

I turned off Windows Update for a reason. I turn it on every so often, or after some major critical bug announcement, but I only let it update when I’m ready to. If Update is running, I don’t edit anything critical, because while Update normally warns me about a reboot, sometimes it doesn’t, or I don’t pay attention because I’m in the middle of the flow of writing.

Try File > Save and Rebuild indexes and let me know how it goes afterwards. I am also interested in investigating deeper the behavior of the corrupted project. If you are comfortable sending an archived copy of the project before you run Save and Rebuild indexes please forward it to tiho at literatureandlatte.com.

I first tried Tiho’s suggestion to rebuild indexes only because I’m lazy and it looked simpler. This did not, however, resolve the issue.

Then I tried rwfranz’s idea of importing the project into a new one and that seemed to fix the issue. Scrivener is responsive and memory usage is stable around 633MB. :smiley:

Thank you for the speedy and excellent help. Now I can get back to creating the world’s longest run-on sentence.

Rebuilding an index would work under certain conditions (for example if Scrivener over time became gradually more and more unresponsive), and it is easier. A random reboot, though, while you’re editing, will probably break the file you’re editing, and might break the .scrivx file or folder in some way that would cause Scrivener to become unresponsive as it tries to figure out how to deal with the broken files/folders.

You may be missing some expected documents in the import because they were broken.