Bug 120428 - LOSS OF DATA - Eror message when opening a file
Summary: LOSS OF DATA - Eror message when opening a file
Status: RESOLVED DUPLICATE of bug 118237
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.2.1 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-08 16:55 UTC by J22Gim
Modified: 2018-10-09 15:40 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Error message (29.74 KB, image/jpeg)
2018-10-08 16:56 UTC, J22Gim
Details
2nd error message (17.24 KB, image/jpeg)
2018-10-08 17:02 UTC, J22Gim
Details
This is how it looked like. (31.08 KB, application/pdf)
2018-10-09 14:19 UTC, J22Gim
Details
This is the problematic file (11.15 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-10-09 14:25 UTC, J22Gim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description J22Gim 2018-10-08 16:55:36 UTC
Description:
I received a DOCX file, made some changes, saved (as DOCX as well) with a different name. One second later I try to open the new file and I get the attached error message, where I can see only the first pages. The file (and all my work) is basically lost. It happened two times using the same original file to start working from. So I guess it is related to that file (which opens and show without any problem or warning). The second time, I printed as PDF before saving the DOCX file and the PDF looks OK (at least I didn't lose my hours twice!!)

Unfortunately for privacy reasons I can't provide the original file as is (I tried to delete some contents but the error is gone), is there anything else I can provide to better diagnose this?

Steps to Reproduce:
I can't provide the original file. It was sent to me as DOCX and opens perfectly well in Writer. Can be printed and saved without problems. 

Actual Results:
I get the following message:

An error occurred during opening the file. This may be caused by incorrect file contents.
The error details are:
SAXException: [word/document.xml line 2]: Attribute w:themeColor redefined

Proceeding with import may cause data loss or corruption, and application may become unstable or crash.

Do you want to ignore the error and attempt to continue loading the file?

Expected Results:
The file opens without problems...


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.1.2.1
Build ID: 1:6.1.2~rc1-0ubuntu0.14.04.4
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: group threaded
Comment 1 J22Gim 2018-10-08 16:56:50 UTC
Created attachment 145483 [details]
Error message
Comment 2 J22Gim 2018-10-08 17:01:41 UTC
This is the next error message I get if I press "No"
Comment 3 J22Gim 2018-10-08 17:02:05 UTC
Created attachment 145484 [details]
2nd error message
Comment 4 Timur 2018-10-09 09:32:46 UTC
You can either attach the DOCX sanitized in MSO using https://wiki.documentfoundation.org/QA/Bugzilla/Sanitizing_Files_Before_Submission (or ask someone else to do it) or mark as a duplicate of Bug 118237 (confirming it has a similar history).
Comment 5 J22Gim 2018-10-09 14:19:57 UTC
Created attachment 145526 [details]
This is how it looked like.
Comment 6 J22Gim 2018-10-09 14:25:54 UTC
Created attachment 145531 [details]
This is the problematic file
Comment 7 J22Gim 2018-10-09 14:36:59 UTC
OK after extensive testing and tries, I was able to narrow down the problematic part of the file to a single statement (although I suspect there are more of these further down the text document).

The problem is definitely related to track changes. When I accept the changes (I tried that as part of the "sanitizing") the problem is gone. 

In order to remove the name of the reviewer I had to manually edit the "/word/document.xml" file. I took care of not changing absolutely anything else.

I hope my effort is useful as I spend a few hour in this in order to see exactly what was the problem and cleaning private information later. Las time I had data loss was back in 2002 when writing a thesis, and I had to abandon (at that time was OpenOffice) for several years. LibreOffice is at another level today, so I wish it stays robust and stable..
Comment 8 Timur 2018-10-09 14:51:12 UTC
Thank you. I'll mark as a duplicate.

*** This bug has been marked as a duplicate of bug 118237 ***
Comment 9 Timur 2018-10-09 15:01:52 UTC
Here and there we have a problem that we don't have exact steps to reproduce bug, i.e. to create wrong file from good one. 
Good is your received DOCX but we don't know how exactly to get wrong DOCX.
I understand you made quite an effort to get minimal wrong DOCX, but that's not complete without source DOCX and steps needed to get the wrong one. 
What I do in bug hunting cases like these is take original DOCX and during work, after each major change, save with new name, close and reopen until I'm able to pinpoint the issue. Then you have "last good", steps and "wrong DOCX".
Comment 10 Timur 2018-10-09 15:12:56 UTC
To be clear: since you already invested time, please try to recreate or attach if you already have "source docx" for you previous attachment containing this "Poonm (P) ( )".
Comment 11 J22Gim 2018-10-09 15:40:58 UTC
Hi Timur, thanks for your comments.

The problem is, I did not generate the original file. As I mentioned in my original post, I received a DOCX file (via email). That is the problematic file. I can open the file, save it as ODT and then open it without problems. But when I open it and save it as DOCX again, the error appears (it doesn't make a difference if I edit anything or not). Thus, I don't have the error-free version "before the problem". Does it make sense?