RC18: Word counts for sections not updating properly until I type inside them

After a power outage I noticed my project target was lower than I thought.

4 out of 6 sections had more or less the expected word count (based on the word count at the bottom of the screen). One section listed 0 words despite the text on the screen. Selecting the entire section showed the expected amount of words (763).

For the other misbehaving section, the text at the bottom showed 1088 words instead of the expected 2518.

In both cases, I fixed the issue by typing a word at the start of the section and then erasing it. Word counts went to normal, the project target went to normal and my session target jumped up to 2193. The project writing history shows up with the 2193 figure (although word count at this point should be zero).

I am using the latest version (RC18/2.9.9.18) on Windows 10, 64-bit version. I am using Dropbox; I don’t think syncing is an issue here as I didn’t lose power until the next morning. I also do not appear to have lost any data. The compile targets all show up as they should. This file dates back to November of 2019, and may or may not have started out in the previous stable version of Scrivener on Windows.

I don’t think the crash is an issue either, as I believe I ran into this over the weekend but didn’t really notice (I am unfortunately sure that I did not write 1889 words on the 20th as the project writing history suggests).

We are aware of the problem, but could not reproduce it. Could you please upload in this thread a demo project showing the problem. Please, send it as a private message or to my work email, if you feel like the project has sensitive data, as I am aware this might not be easy to reproduce in any blank/default project. Thanks!

Let me try to duplicate it.

Okay, I managed to duplicate it and I have sent a non-sensitive project via PM.

My uneducated guess is that Scrivener is not doing something to update whatever file or buffer it stores the word count in prior to a crash. Closing Scrivener manually does update it properly, which makes it difficult to duplicate.

(The sad thing is that I have a UPS; I just don’t have enough outlets for the PC.)