Bug 114409 - FILESAVE DOCX Invalid XML gets written when saving particular document
Summary: FILESAVE DOCX Invalid XML gets written when saving particular document
Status: RESOLVED DUPLICATE of bug 114882
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks:
 
Reported: 2017-12-11 15:26 UTC by Gabor Kelemen (allotropia)
Modified: 2018-01-09 01:01 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
The problematic document (49.76 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-12-11 15:26 UTC, Gabor Kelemen (allotropia)
Details
Same file saved from LO 6 (21.01 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-12-11 15:27 UTC, Gabor Kelemen (allotropia)
Details
First error on reopening the Writer-saved file (11.79 KB, image/png)
2017-12-11 15:33 UTC, Gabor Kelemen (allotropia)
Details
Second error on opening the Writer-saved file (7.78 KB, image/png)
2017-12-11 15:34 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2017-12-11 15:26:54 UTC
Created attachment 138370 [details]
The problematic document

Attached document is a reduced version of a 200+ pages user document we got.

This contains a table inside a text box after some empty paragraphs.
When saved from Writer an extra XML tag gets written, on reload I get this error message:

SAXException: [word/document.xml line 2]: Opening and ending tag mismatch: txbxContent line 0 and sdtContent 
 
Then when pressing "No": 

SAXParseException: '[word/document.xml line 2]: Opening and ending tag mismatch: txbxContent line 0 and sdtContent
', Stream 'word/document.xml', Line 2, Column 2356(row,col).

We see that in word/document.xml there are two sdtContent tags in the original file and three in the one saved from Writer.
Comment 1 Gabor Kelemen (allotropia) 2017-12-11 15:27:30 UTC
Created attachment 138371 [details]
Same file saved from LO 6

Version: 6.0.0.0.beta1+
Build ID: 29228e83df009cf76ac819ed024527be1092f065
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:libreoffice-6-0, Time: 2017-12-04_23:15:34
Locale: hu-HU (hu_HU); Calc: group threaded
Comment 2 Gabor Kelemen (allotropia) 2017-12-11 15:33:43 UTC
Created attachment 138372 [details]
First error on reopening the Writer-saved file
Comment 3 Gabor Kelemen (allotropia) 2017-12-11 15:34:21 UTC
Created attachment 138373 [details]
Second error on opening the Writer-saved file
Comment 4 Gabor Kelemen (allotropia) 2017-12-11 15:35:19 UTC
Also we noticed that deleting the second, right aligned paragraph before saving causes Writer to create a syntactically correct file.
Comment 5 Xisco Faulí 2017-12-11 19:44:40 UTC
Reproduced in

- Version: 6.1.0.0.alpha0+
Build ID: 3af500580b1c82eabd60335c9ebc458a3f68850c
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

-Version: 5.2.0.0.alpha1+
Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e
CPU Threads: 4; OS Version: Linux 4.10; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8)

- Version: 5.0.0.0.alpha1+
Build ID: 0db96caf0fcce09b87621c11b584a6d81cc7df86
Locale: ca-ES (ca_ES.UTF-8)

@Mike, one for you?
Comment 6 Gabor Kelemen (allotropia) 2018-01-09 01:01:18 UTC
No longer reproduced in:

Version: 6.1.0.0.alpha0+
Build ID: acb43c0b8efbfb841e7b40603d75a8432eb21f21
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: en-US (hu_HU.UTF-8); Calc: group threaded

Thanks Mike!

*** This bug has been marked as a duplicate of bug 114882 ***