Bug 89615 - ODF export: Writer saves invalid XML when there are multiple annotation ranges (style tag has two office:name attributes)
Summary: ODF export: Writer saves invalid XML when there are multiple annotation range...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: Other Linux (All)
: highest critical
Assignee: Caolán McNamara
URL:
Whiteboard: odf odf_validation target:4.4.4 targe...
Keywords: regression
: 90330 (view as bug list)
Depends on:
Blocks: ODF-export-invalid
  Show dependency treegraph
 
Reported: 2015-02-24 14:48 UTC by ts
Modified: 2017-05-28 14:17 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
testcase (28.89 KB, application/vnd.oasis.opendocument.text)
2015-08-06 10:51 UTC, ts
Details
Small document with changes and notes: example of an opening error. (23.88 KB, application/vnd.oasis.opendocument.text)
2015-08-13 19:44 UTC, Aron Boss
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ts 2015-02-24 14:48:06 UTC
After saving an .odt file in writer with lots of comments, the file cannot be opened anymore (Lesefehler: Formatfehler). 

After unzipping the file and editing content.xml, I discover that there is a "style" tag which has two "office:name" attributes with identical values.

This has happened twice with the same document. (I can provide the document but it is kind of semi-confidential, don't want to upload it here).

Please let me know if you need any further information!
Comment 1 ts 2015-02-24 14:49:43 UTC
Sorry, forgot to include version:

Version: 4.3.3.2
Build-ID: 430m0(Build:2)
on Ubuntu 14.10 64 bit, German language
Comment 2 Buovjaga 2015-02-28 09:34:10 UTC
(In reply to Titus Stahl from comment #0)
> This has happened twice with the same document. (I can provide the document
> but it is kind of semi-confidential, don't want to upload it here).

You could try this: https://wiki.documentfoundation.org/Anonymizing_a_document#Sanitize_file_text

Set to NEEDINFO.
Change back to UNCONFIRMED after you have an example file for us. Thanks.
Comment 3 ts 2015-08-06 10:51:59 UTC
Created attachment 117709 [details]
testcase

this is a testcase. basically, if I change anything in the document and save it, it cannot be opened anymore.

Version: 4.4.2.2
Build-ID: 40m0(Build:2)
Gebietsschema: de_DE
on Ubuntu 15.04, 64-bit
Comment 4 Aron Boss 2015-08-13 19:44:18 UTC
Created attachment 117902 [details]
Small document with changes and notes: example of an opening error.

This type of error is very common if you keep changes and notes in the same document. Changing notes will very, very often crash the document.
Went back from 5.0 to 4.4 because of the large number of crashes with documents like these.

Running on Ubuntu 15.04 64 bits.
Comment 5 Michael Stahl (allotropia) 2016-07-11 21:01:15 UTC
a regression from the AOO imported range annotation feature,
commit 0761f81643a6890457e9ef7d913ab5c88c2593a4

this was fixed in LO 4.4.4 by

commit 804ec2289115a65c74ddff478b7469801debf7e4
Author:     Caolán McNamara <caolanm@redhat.com>
AuthorDate: Wed Apr 22 14:10:38 2015 +0100

    fix assert on export of ooo63141-1.doc to odt

    if bAutoStyles is true then the mbDoSomething of the SvXMLElementExport is
    false, and the ctor/dtor doesn't do anything so any attributes added to the
    exporter are not cleared by the SvXMLElementExport dtor

    so only add the attribute if bAutoStyles if false and might as well extend the  
    block to cover the use of SvXMLElementExport and use the other ctor which
    defaults mbDoSomething on
Comment 6 Michael Stahl (allotropia) 2016-07-11 21:02:33 UTC
*** Bug 90330 has been marked as a duplicate of this bug. ***