Bug 65363 - FILESAVE non well formed/corrupted content.xml file: duplcate attribute office:currency on table:cell - saved spreadsheet cannot be opened
Summary: FILESAVE non well formed/corrupted content.xml file: duplcate attribute offic...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.0.0.beta1
Hardware: Other All
: high critical
Assignee: Not Assigned
URL:
Whiteboard: odf odf_validation
Keywords:
: 65297 68543 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-06-04 16:36 UTC by Pierre-Eric Pelloux-Prayer
Modified: 2016-07-04 19:05 UTC (History)
6 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 Pierre-Eric Pelloux-Prayer 2013-06-04 16:36:31 UTC
The attached spreadsheet was created with LibreOffice 4.1.0.0.beta1 (build id: 410m0 (build: 0)), using Debian/experimental package.

LibreOffice fails to open the document:
Read-Error
Format error discovered in the file in sub-document content.xml at 2,10046(row, col)

xmllint --format content.xml outputs the following error multiple times:
content.xml:2: parser error : Attribute office:currency redefined
ency="EUR" office:value="92" calcext:value-type="currency" office:currency="EUR"

From content.xml :
<table:table-cell table:style-name="ce4" office:value-type="currency" office:currency="EUR" office:value="89" calcext:value-type="currency" office:currency="EUR">


                                                                               ^
Comment 2 Pierre-Eric Pelloux-Prayer 2013-06-04 21:08:19 UTC
Thanks, marking as resolved then.
Comment 3 retired 2013-06-07 15:44:37 UTC
I'm seeing a similar issue with LO 4.1b2 on OS X 10.8.4:
http://cl.ly/image/1j0h1y351B2i (the error is basically identical, just the number of the col differs).

Re-opening.
Comment 4 retired 2013-06-07 15:47:47 UTC
*** Bug 65297 has been marked as a duplicate of this bug. ***
Comment 5 retired 2013-06-07 15:50:55 UTC
changing platform to "all" since now this is happening on Linux and OS X.
Comment 6 retired 2013-06-07 15:55:19 UTC
Example file attached here https://bugs.freedesktop.org/show_bug.cgi?id=65297

still produces said error with LO 4.1b2.

Also setting to "Critical" since this means users cannot open their files. In my case I'm stuck with an important file I need to get some financial stuff done.
Comment 7 Anton Derbenev 2013-07-08 07:55:37 UTC
Users in my org got similar problem (specifically 2 times I've been called about that, both times it was LO 4.0.3).
They are getting error message during saving, telling there was an "error saving file" (nothing specific).

Saved file zip headers and CRC are corrupt. It can be partially recovered, short of contents.xml.
In their settings, "Backup always" checked, but backup is corrupt either!

So if they get this error during saving, the only way to save data is to copy everything to another document. If it hasn't been done, whole document is lost in non-recoverable way.

That's very frustrating, and causes more and more users demand MSO installed.
Comment 8 retired 2013-08-26 12:29:28 UTC
Raising to "high" singe if data is lost this is imo more than "medium" importance.
Comment 9 Maxim Monastirsky 2013-08-26 13:30:10 UTC
This bug is already fixed as said in comment 1, and indeed it's reproducible with 4.1.0beta1 but not with 4.1.0.4. So changing back to RESOLVED FIXED.

@James: It means that LO doesn't create such corrupted files anymore, but You can't except that LO will open your file, because your file is already *corrupted*.
Comment 10 Maxim Monastirsky 2013-08-26 13:39:31 UTC
*** Bug 68543 has been marked as a duplicate of this bug. ***
Comment 11 polzin 2014-01-06 18:28:18 UTC
Should be reopened: I get repeatedly corrupted .ods files with duplicate tags in libreoffice calc 4.1.4.2.

I have not found a specific editing action that triggers the corruption.

I use two simple vba-macros, 'Conditional Format', shared documents.


xmllint gives:

content.xml:2: parser error : Attribute table:id redefined
e:cell-content-change><table:cell-content-change table:id="ct82" table:id="ct83"
                                                                               ^
content.xml:2: parser error : Attribute table:id redefined
e:cell-content-change><table:cell-content-change table:id="ct97" table:id="ct98"
                                                                               ^
content.xml:2: parser error : Attribute table:id redefined
cell-content-change><table:cell-content-change table:id="ct111" table:id="ct112"
                                                                               ^
content.xml:2: parser error : Attribute table:id redefined
cell-content-change><table:cell-content-change table:id="ct122" table:id="ct123"
                                                                               ^
content.xml:2: parser error : Attribute table:id redefined
cell-content-change><table:cell-content-change table:id="ct130" table:id="ct131"
                                                                               ^
content.xml:2: parser error : Opening and ending tag mismatch: table-row line 2 and table-cell
ffice:value="0" calcext:value-type="float"><text:p>0</text:p></table:table-cell>
                                                                               ^
content.xml:2: parser error : Opening and ending tag mismatch: table line 2 and table-row
-cell><table:table-cell table:number-columns-repeated="1014"/></table:table-row>
                                                                               ^
content.xml:2: parser error : Opening and ending tag mismatch: spreadsheet line 2 and table
s.E6"/></calcext:conditional-format></calcext:conditional-formats></table:table>
                                                                               ^
content.xml:2: parser error : Opening and ending tag mismatch: body line 2 and spreadsheet
"true" table:orientation="column"/></table:database-ranges></office:spreadsheet>
                                                                               ^
content.xml:2: parser error : Opening and ending tag mismatch: document-content line 2 and body
rientation="column"/></table:database-ranges></office:spreadsheet></office:body>
                                                                               ^
content.xml:2: parser error : Extra content at the end of the document
rientation="column"/></table:database-ranges></office:spreadsheet></office:body>
                                                                               ^
Comment 12 Maxim Monastirsky 2014-01-06 20:12:15 UTC
@polzin: That's another problem. Please open a new bug for it.
Comment 13 polzin 2014-01-06 20:45:39 UTC
Okay. I was now able to reproduce the problem. Probably, it's not worth opening a new bug, because the root was a VBA-macro doing an insert of a partial row with shifting of lines. This is forbidden in the GUI when tracking of changes is enabled, but the macro was able to do this and broke the content.xml. If you think it's valuable opening a bug, I will do it.
Comment 14 Maxim Monastirsky 2014-01-06 20:52:37 UTC
(In reply to comment #13)
> Okay. I was now able to reproduce the problem. Probably, it's not worth
> opening a new bug, because the root was a VBA-macro doing an insert of a
> partial row with shifting of lines. This is forbidden in the GUI when
> tracking of changes is enabled, but the macro was able to do this and broke
> the content.xml. If you think it's valuable opening a bug, I will do it.
While not familiar with this issue, I'm sure that LO shouldn't save corrupted files in any case.
Comment 15 Yousuf Philips (jay) (retired) 2014-06-08 11:26:13 UTC
*** Bug 73335 has been marked as a duplicate of this bug. ***
Comment 16 Yousuf Philips (jay) (retired) 2014-06-08 11:27:55 UTC
Confirmed its still available on Linux in 4.2.4 and 4.3 beta 2.
Comment 17 Sergey Leschenko 2014-07-02 08:54:28 UTC
Confirmed in 4.2.5.2
Comment 18 Maxim Monastirsky 2014-07-03 14:44:53 UTC
(In reply to comment #17)
> Confirmed in 4.2.5.2
What exactly confirmed? Did you still see the error from comment 0? (I guess you're talking about your Bug 80793? If so, it's not related to this one.)

For anyone reading this bug: There are many reasons why a document might be corrupted, and it's a bad idea to handle them all in one bug. This one is fixed as indicated in comment 1. For any other case please open a new bug.