Bug 141940 - ODS File Corrupted. Error found in content.xml.
Summary: ODS File Corrupted. Error found in content.xml.
Status: RESOLVED DUPLICATE of bug 137945
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.0.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: dataLoss
Depends on:
Blocks:
 
Reported: 2021-04-27 18:18 UTC by matchstickman
Modified: 2021-05-01 05:02 UTC (History)
2 users (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 matchstickman 2021-04-27 18:18:11 UTC
Description:
I was mid way through modifying an .ods spreadsheet when Calc slowed to a crawl and became unresponsive. I believe this may have been due to it auto-saving, and at the time my system was under a heavy load. I was processing some videos files in the software VidCoder, version 5.21. This may have been the moment when this corruption occurred to the file. After a short while Calc became responsive again. I was able to finish doing what I was doing and saved the file.

However, whenever I have subsequently tried to open the file, Libre just goes blank and doesn't respond. I have left it in this state for a number of hours without any further progression.

Looking online I learnt about changing the ods file to a zip, so as to gain access to the xml files and such. I have compared the content.xml file to another which was saved at an earlier date and was eventually able to pinpoint where the fault seems to lie.

Under the <table:content-validation line there were a number of values which had been changed for <text:s text:c=

Most of these had been changed to <text:s text:c="67108864"/>
Some had been changed to <text:s text:c="33554432"/>
And some entries which didn't even exist in my older file had been added as <text:s text:c="16777216"/>

I don't even know what these values are used for, but I thought I should make a report as the numbers may be an indicator of what has caused the problem. Of course the obvious thing which pops out is that

16777216 * 2 = 33554432
33554432 * 2 = 67108864

Replacing all of the data within <table:content-validation with that from my earlier file, I was able to fix the file. Also, it should be noted that all the cells containing these Data Validation entries are located on one sheet within this spreadsheet. I don't believe I even viewed that sheet yet alone made any modifications to it when this issue occurred.

System

Processor	Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz   4.00 GHz
Installed RAM	16.0 GB (15.7 GB usable)
System type	64-bit operating system, x64-based processor
Edition	Windows 10 Pro
Version	20H2
OS build	19042.928
Experience	Windows Feature Experience Pack 120.2212.551.0

Actual Results:
-

Expected Results:
-


Reproducible: Didn't try


User Profile Reset: No



Additional Info:
-
Comment 1 Aron Budea 2021-04-29 03:03:06 UTC
I'm inclined to think this is the same as bug 137945, in which case it should be fixed in 7.1, can you give that version a try?
Comment 2 matchstickman 2021-04-29 15:10:56 UTC
I believe you are correct. I've tested what was said in the other bug report and saving the file is causing this value to double each time. As I noted previously, I am not even sure exactly what this value dictates, but looks like it has something to do with spaces? In order to reach a value of 67108864 I must have saved the spreadsheet 25 times, which sounds about right.

Any idea why this value went up to 8388608, 16777216, 33554432, no problems. And then 67108864, and it's bingo, suddenly the file no longer responds what-so-ever. Why is that I wonder?

And why is this version of the program still being offered as the stable release when this problem is known about? I would have thought there would be a lot of people regularly using spreadsheets containing cells with such Data Validation. If all it takes to make a file corrupt is to re-save the spreadsheet 25 times, I would think there are a whole lot of people who can no longer open important files and don't have any idea for the reason why not. I spent a lot of time searching the internet to try and figure out where the problem might lie while looking to the answer to my own problem, and never saw any mention of this issue.

Lastly, is there any way that files which have been effected by this issue can be corrected in some later release, automatically? ie. Reverting the value of 67108864, or whatever it may be, back to it's normal level of 4, or 8, or whatever it probably should be. I can't imagine the average user modifying content.xml even if they were aware this issue may have effected their file.
Comment 3 Aron Budea 2021-04-29 20:37:00 UTC
(In reply to matchstickman from comment #2)
> And why is this version of the program still being offered as the stable
> release when this problem is known about? I would have thought there would
> be a lot of people regularly using spreadsheets containing cells with such
> Data Validation. If all it takes to make a file corrupt is to re-save the
> spreadsheet 25 times, I would think there are a whole lot of people who can
> no longer open important files and don't have any idea for the reason why
> not. I spent a lot of time searching the internet to try and figure out
> where the problem might lie while looking to the answer to my own problem,
> and never saw any mention of this issue.
This problem was triaged earlier today, and there is already a fix for it. I don't know why not more iser have encountered the problem, perhaps those who have upgraded to 7.0 while it was still a "fresh" release, haven't used data validation much.

I'm afraid I can't really answer the deep technical details, possibly after the continuous doubling in the value, it's too much to handle after a while.
Looking at the ODF specs, this is also related to the spaces, and denotes the number of spaces a <text:s> element represents:
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#attribute-text_c

I'm marking this as duplicate of bug 137945 for now. Thanks for reporting!

*** This bug has been marked as a duplicate of bug 137945 ***
Comment 4 matchstickman 2021-05-01 05:02:43 UTC
Thanks for your help and quick responses Aron.