Bug report: Writing history miscount

I am on Scrivener on MacOS – the latest Scrivener update (yesterday, in fact) and the latest High Sierra release.

Yesterday, I had a terrific writing day, accomplishing way more than I expected. I don’t usually check the word counts daily but I went ahead near the end of my session and saw that I was well above 2,300 words for the day. I used the indicator that shows up in the search field top and center.

Today I decided to try to top yesterday. I checked the the writing history and THERE it said I’d written less than 200 words! The total word count appears to be the same. And there doesn’t seem to be any missing writing.

What gives? It appears the live tracking of the word count doesn’t match up t the daily statistics after the fact.

FWIW, I have my word count reset at 1 am each morning.

THANKS. Overall, a wonderful program.

That’s strange. Did you also delete lots of words? Was everything written on your Mac, or did you work on another device too?

Can reproduce the problem so that the Writing History again results in the wrong count?

Thanks and all the best,
Keith

I deleted almost nothing. And everything was written in the same file on the same Mac – no other Macs.

I double-checked by looking at a Time Machine back-up of the file from the time I stopped work yesterday. It had the same overall word count as the current file AND showed that, yes, I had done 2,000+ words. In other words, the only place that shows a difference is in the writing history log.

I’m not sure how I can reproduce this error other than to report it if it happens again.

BTW, is there a way to do a compare file between two different Scrivener files? (as opposed to a snapshot) I could do that with the backup to make triple sure. The last thing I want is to discover weeks down the road that I deleted 2,000 words by mistake. (And yes, I checked the trash folder).

Thanks.

Sorry for the late reply. Unfortunately there is probably no other way of finding out what happened other than for us to wait for someone to see it again and to gather as much information as we can as and when it happens.

There is no way to compare two Scrivener files other than to take a snapshot of one and then paste the other over the top of it and use the snapshot compare feature.

Thanks and all the best,
Keith

Just popping in to say I’ve had this issue. I wrote 9,000 words on Friday and Scrivener says I wrote 200. I will say that the program crashed (supposedly), which seems to be part of the issue. When it crashes, it retains all the words but the writing history is wiped out.

Was this crash experienced after an extended period of inactivity, and potentially over a period of time in which session resets would have been triggered? For example by default if a project has a session goal it will be around midnight when it triggers. We’ve been trying to track down a sporadic exception/crash that happens in the auto-save engine, and it seems to be related to these events.

What is odd is that the writing.history file is updated continuously as you work, as part of the regular auto-save queue, along with the actual text you are writing and so forth. So even say if there is a crash after writing 9,000 words, the record of that should be no more lost than the words you wrote themselves.

Now one aspect of this is that what I’m referring to above initially manifests as an exception, which is different from a crash in that the software can and often will keep running after it happens—and more importantly by default you won’t notice when they happen. There is a setting we can modify that would change that, and I’d recommend doing so. In the General: Warnings preference pane, enable the Show internal error alerts option. Now the moment something goes wrong with auto-save (or whatever), you will get a pop-up window with some diagnostic information. Upon receipt of this warning you will prompted to quit, or tidy up what you’re doing as carefully and quickly as possible and then restart.

My theory here is that you ran into an exception many hours prior, and that broke the recording of your writing history for some reason, so that it wasn’t kept up to date and when the software finally did crash from this malfunctioned condition, the record was lost.

This is exactly what happened to me several times, and I reported it several times. Every now and then words disappear from Writing History.

It did it again: yesterday I ended the day with 1342 words, wrote it down to my writing goal on beeminder.com, closed Scrivener on iMac as usual, this morning started to write on the iPad, and when I moved back to the desktop, only 128 words from yesterday are left in the Writing History.

Another thing is the irregular synchronization of the sessions between iPad and the desktop, where it is supposed to reset automatically at midnight. Sometimes when I start on the iPad and then move to the desktop, the desktop session includes the words written on the iPad, sometimes it doesn’t. Today it was the other way round: the iPad session in the morning showed 0 words, which probably means that it was synchronized with the desktop session, reset at midnight.

But I don’t think that there two problems are related, since sometimes words disappear from Writing History even if I don’t use iPad at all.

Yet another thing is that sometimes the Writing History shows smaller number of words of the current day than the daily session, which does not make any sense, it can be equal or bigger, but not smaller.

I will add my first post to the forum to say that I’ve seen this same problem occur.

I wrote about 1100 words last Sunday, but the next day and subsequently, when I came back into Scrivener the Project History reported I’d only written 13 words the previous day!

Was looking for possibly causes or reasons, and reading above I do think I had a crash on startup the next day. I went to open Scrivener and it hung for some time. I had to force shutdown and then start it again after I’d restarted the computer (and after I’d shut some of the 100+ tabs I had open in Chrome!)

So I suspect that has something to do with it. I definitely didn’t lose any words from the project, but the history count seems out.

Was the reason for this ever found?

I just had the same problem, wrote over 2000 words yesterday and the writing history says I wrote 0. The draft total on writing history is also missing the words I wrote yesterday, although on project targets it still says the correct word count.

I see someone wrote that it happened after their Scrivener crashed, but mine didn’t crash or do anything unusual.

Likewise, I’m having an issue with Writing History under-counting my words the last few days. The software hasn’t crashed. Yesterday, I wrote about 580 words and Writing History reflected this. Today, I opened the project again and while yesterday’s words are still in the draft, Writing History says I wrote zero yesterday. It was accurately keeping up with today’s word count until I duplicated the scene I was working on, deleted the roughly 800 words in it, and started writing new content. Now it’s like it tracked the cut but not the additions, and says I wrote -843 words today.

The issue is still there.

I wrote 1066 words today; Scrivener insists it’s only a bit over 400.
I know this because I stopped relying on Scrivs count a long time ago since it always goes wrong as soon as I start copy/pasting things or moving scenes around. I use a spreadsheet instead.

…and again (1068 words yesterday, not 16).

Just want to report I’ve been experiencing this as well. I noticed it a couple times but kind of ignored it because I figured I was just remembering wrong, or had deleted something I forgot about.

Now however I actually have two copies of the project to compare - a backup copy I made last night, and the project file I opened this morning. The only difference is that I renamed some binder item names and added some bookmarks.

I exported the full draft of both project files and compared them in Word, and there are no differences. Yet the word count for yesterday has changed overnight.

Not sure if it’s related, but the “Draft total” shows as zero from last night, and the one from this morning is not correct. It shows as 98911 in the Writing History, but 100170 in the draft.

(The left project is from this morning, the right is from last night.)

Since you have these two projects, in a state where one result can become the other, have you managed to find a way to get from A to Z from the backup copy? If so we’d be very interested in taking a look at that, if you can share the project with us.

More than two years later since I first reported this bug nothing changed: the words keep disappering.

I had this issue tonight. I usually plug my word counts into a Pacemaker.press project each day after I finish writing for the day, but I missed two days (Sunday and Monday) so was going back to update. I wrote ~1500 words each of those two days, but when I checked back in the writing history, it showed 1 word written for Saturday (I wrote around 1700 that day and logged it in Pacemaker), and ZERO written for Sunday. So I plugged in the 1515 word total that it showed for Monday, saved and closed the file, then reopened it. After reopening the total for Monday is now only 4.

Nothing changed between closing & reopening. The program didn’t crash or anything either. All the words are there - the writing history is just completely off for those three days. I didn’t delete any words either.

What I did do, however, was open another project and add a few words to that project. The Monday word total for my Monday project is the same as the Monday word total for the project with the incorrect count… 4. I don’t know if that’s a coincidence or not but figured it was worth mentioning.

This has been happening to me, too. I would love to see an update correcting this. Thank you.

Scrivener: 3.2.1 (14481)
MacOS Catalina: 10.15.7

FWIW I’m tracking this issue on my own machine because it’s REALLY annoying me. It might help if I had a little more information, but I’ll share what I have learned so far. Here’s an example snippet from a writing.history file from a project I use to keep a journal:

<Day dwc="364" dcc="2130" dtwc="241607" owc="0" occ="0" dtcc="1319507">2019-10-08</Day> <Day dwc="31" dcc="153" owc="0" occ="0">2019-10-20</Day> <Day dwc="452" dcc="2276" dtwc="0" owc="0" occ="0" dtcc="0">2019-11-01</Day> <Day dwc="1308" dcc="7136" dtwc="0" owc="0" occ="0" dtcc="0">2019-11-05</Day> <Day dwc="178" dcc="863" dtwc="245872" owc="0" occ="0" dtcc="1342270">2019-11-07</Day> <Day dwc="92" dcc="1103" dtwc="0" owc="0" occ="0" dtcc="0">2019-11-10</Day> <Day dwc="0" dcc="-4" owc="0" occ="0">2019-11-17</Day> <Day dwc="2529" dcc="13520" dtwc="248493" owc="0" occ="0" dtcc="1356889">2020-11-21</Day> <Day dwc="2" dcc="12" dtwc="248495" owc="0" occ="0" dtcc="1356901">2020-11-22</Day> <Day dwc="1200" dcc="6167" dtwc="0" owc="0" occ="0" dtcc="0">2020-11-23</Day> <Day dwc="1172" dcc="6440" owc="0" occ="0">2020-11-24</Day>

Based on this, the writing history isn’t just losing daily word counts, it is scrambling all kinds of data. I am assuming the following:
dwc = Draft Word Count (for the day)
dcc = Draft Character Count (for the day)
dtwc = Draft Total Word Count
dtcc = Draft Total Character Count
owc = “Other” Word Count
occ = “Other” Character Count

In the example above, you can see that sometimes, the dtwc is recorded correctly. Sometimes, it is present, but erroneously set to 0. Sometimes, the attribute is missing entirely. The dtcc and dtwc seems to pair consistently: either both are present and correct, both are absent, or both are present and set to zero. Likewise the dwc and dcc seem to sync: when words are missing from dwc, characters also appear missing from dcc. However, I have found no case (yet) where the dtwc is miscounting the actual total when it is present and non-zero.

I don’t know for sure if Scrivener is dropping counts in this project, because I mostly don’t care about word counts in the journal, but now I am on the lookout.

Here’s a second example from a screenplay I just started working on (this one complete since it has a short history):

<WritingHistory>
    <Day dwc="1990" dcc="10660" dtwc="0" owc="0" occ="0" dtcc="0" s="4166" st="w">2020-11-19</Day>
    <Day dwc="1026" dcc="5559" dtwc="3016" owc="0" occ="0" dtcc="16219" s="4364" st="w">2020-11-20</Day>
    <Day dwc="1112" dcc="6134" dtwc="4128" owc="0" occ="1" dtcc="22353" s="4698" st="w">2020-11-21</Day>
    <Day dwc="449" dcc="2448" dtwc="4577" owc="0" occ="0" dtcc="24801" s="5096" st="w">2020-11-22</Day>
    <Day dwc="3" dcc="15" owc="0" occ="0" s="1000" st="w">2020-11-23</Day>
</WritingHistory>

Yesterday I closed the project and manually edited the file to correct the 2020-11-22 entry, which showed only 15 words when I had in fact written 449. Today, I see that it has lost yesterdays work as well. I had 833 words at the end of the day. Only 3 made it to the history (at the time of this writing). Also, at some point earlier, the number in history read “820” while the session had 833 words. I have no idea when or why it changed.

This throws off the totals as well. See the attached image. The draft counter shows 5,410 words. The history shows only 4,580, the difference being the 830 unrecorded words from yesterday.

The first time I noticed this, I had left the project open overnight. Since my session counter for this project resets at midnight, I wondered if having the project open at midnight might be the cause. I made it a point to close the project last night before midnight, but words were still dropped, so that’s not the issue. I plan to try changing the session reset to “on project close” to see if this has any effect. (If it stops happening, there might be a timezone bug in writing.history, having a different idea of when midnight is, but relying on the session counter to match it.)

I noticed that the project that uses screenwriting mode has a pair of additional attributes, s=“some-number” st=“w”; I don’t know what the “s” attribute is supposed to be tracking (the number doesn’t correlate with any stat I have found) so I have no idea if it is accurate or not. Can anyone tell me what it tracks?

After reading this thread, I have activated “Show internal error alerts” in the preferences. If I learn anything new, I’ll drop another post here.

Sad that I have to go back to manually recording my word count separately. This was a great feature for a minute. Sigh.

[attachment=0]Screen Shot 2020-11-24 at 15.39.10.jpg[/attachment]