Bug 165674 - Word count becomes unreliable
Summary: Word count becomes unreliable
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-10 15:56 UTC by Luke Kendall
Modified: 2026-01-26 19:47 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Kendall 2025-03-10 15:56:29 UTC
TL/DR: indications of a transient Writer memory corruption issue.

---

The word count for my document has become unreliable.
I noticed that when I edited a comment, the word count changed (to 27,336 words and 154,625 characters, for what that information is worth).

Clicking back into the main document, the word count and character count on the bottom status bar didn't change.

Jumping to a point about 80% into the document, the numbers changed to 30,830 words and 175,405 chars.

Saving the document refreshes the counts to the correct figures: 147,345 words and 847,090 characters.

Clicking in and out of a comment at this point, and back into the current page, did not change the counts.

Going to the end of the doc and clicking into a comment did not change the numbers.  But adding a character and then backspacing to erase the character *did* change the numbers: to 27,336 words, 154,625 chars.

Saving the doc refreshed the numbers to the correct values. Going back to my 80% mark, clicking into the comment, and adding a space did not change the numbers. Backspacing to delete the space in the comment did change the numbers:
26,720 words and 148,093 characters.

Saving the doc refreshes the numbers to the correct values.

This is weird and disturbing behaviour, especially the similar but different wrong numbers produced by adding and backspacing in a comment.
In fact, I just added 5 spaces in a comment, and backspaced over them one by one. The wc/cc totals were:

58,105/332,749 (61,632/352,679)
64,133/367,116 (66,070/378,101)
68,893/394,301 (70,520/404,132)
79,828/457,565 (85,535/478,758)
89,954/516,853 (92,370/530,770)

The pairs in the parentheses are what these numbers jumped to when I clicked into the comment after changing focus to this browser window to type in the numbers. I.e. the numbers jumped (once only) after changing focus back to the Writer doc, after adding to this bug report.

More worrying still: exiting from the document and reopening it, this bizarre behaviour stopped.

I suspect this means some Writer data structures had become corrupted.  That's a very frightening thought.

But I doubt this bug report will be useful as now *I* can't reproduce the problem myself.
Comment 1 Olivier Hallot 2025-03-11 13:45:20 UTC
Without a sample document where the issues clearly shows up it becomes extremely difficult to follow.
Comment 2 Luke Kendall 2025-03-12 13:54:48 UTC
I agree.

It also just started happening again, so I'm now installing LibreOffice_25.2.1.2.

I'll see what happens.
Comment 3 QA Administrators 2025-11-25 15:25:18 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2025-11-25 15:38:15 UTC Comment hidden (obsolete)