Yesterday I merged a fix for Writer’s tdf#165094. Not that it was something exceptional; something that often happens when we change the huge code: a regression. Something that we try to do for them: a fix. Why mention it here?
It happens to show something, that people underestimate. The complexity of what they call “proper testing” – you know, that “I found a bug! Do you even try to test your software???” rant you often see in discussions. Let’s look at this case.
The problem was, that in some specific document, where there was a manually inserted page break, that page break, defined in a hidden paragraph, disappeared after an upgrade. Sounds easy? Should be caught immediately in the release testing? But other page breaks weren’t lost.
Debugging showed, that the bug would only occur when all of the following happened:
- The page break was defined in a hidden paragraph (something already known from the reporter – thank you Gabor!), and
- There were at least 26 paragraphs before that hidden paragraph, all on the same page, and
- The page break defined a paragraph style, and
- That page break defined a page number, and
- That assigned new page number happened to be the same “oddity” as the current one (i.e., either the number of that page with 26+ paragraphs was odd, and the new page number was odd; or the number of that page with 26+ paragraphs was even, and the new page number was even), and
- After the hidden paragraph (which defined the page break), a table immediately followed.
I suppose, that’s a combination of factors, that any QA engineer would naturally test first, don’t you agree? (Disclaimer: no I don’t think so.)
Note that the complexity of this constellation of causing factors is, again, not uncommon in our codebase. In fact, it only needed less than ten features to take their specific forms, from thousands of features and options that the suite offers.
But it is completely unsurprising, that the bug, that requires such a constellation of factors, actually appeared in our bug tracker. Given the tens of millions of users, who work with who knows how many documents, every low-probability event will happen, sooner or later. This is good; and we are thankful to everyone who files bugs.
And let me say, that we at Collabora Productivity are glad to do many good things to make the office suite better for everyone.