Bug 90488 - FILESAVE: cross reference in docx corrupted and cause a crash of LO
Summary: FILESAVE: cross reference in docx corrupted and cause a crash of LO
Status: CLOSED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.2.2 release
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: DOCX
  Show dependency treegraph
 
Reported: 2015-04-06 20:20 UTC by Orwel
Modified: 2017-02-27 12:53 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
original odt file (13.38 KB, application/vnd.oasis.opendocument.text)
2015-04-06 20:20 UTC, Orwel
Details
file saved as docx from the original odt file (8.16 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-04-06 20:21 UTC, Orwel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Orwel 2015-04-06 20:20:16 UTC
Created attachment 114658 [details]
original odt file

Cross reference in .docx files are saved in some bad way and causes LO to crash.

Replication steps:
1. create .odt file with cross-reference (I attach one simple).  Insert -> fields -> more fields -> Cross-References tab, numbered Paragraph -> Number and Number (no context. Save it.
2. Save the file as .docx (I attach mine).
3. Close the docx file BUT KEEP the original odt file open (IMPORTANT to reproduce behaviour of mine).
4. Reopen the docx file (seems to be ok).
5. Tools-Update-Update all (or F9 in my case although in menu there is F8 mentioned).
6. You see the cross reference broke.

Replication steps for crashing LO:
1.-2. the same as above
3. Close the whole LO (also Quickstarter if enabled). Open the docx file from Explorer.
4. LO crashes in my case (with attached docx file).

Environment: Win7, 64bit

In version 4.4.1.? the bug did not caused a LO crash as I can remember although the bug was present. As I can remember the bug was present also in  previous version (also with doc files), but I can not provide a good version of LO (I submitted the bug for .doc file as 33893 and after fixing it I used always the .doc format as it was working till 4.3.5. After installing 4.4.1 I recognized the problem with cross reference occurred again as with doc so with docx files. 4.4.2.2 has the doc problem fixed (see bug 89482), the problem persist with docx file.
Comment 1 Orwel 2015-04-06 20:21:14 UTC
Created attachment 114659 [details]
file saved as docx from the original odt file
Comment 2 Julien Nabet 2015-04-06 21:21:29 UTC
On pc Debian x86-64 with master sources updated today, I opened the second file attached and had no crash.
Perhaps Windows only bug?
Comment 3 Justin L 2015-04-07 05:19:14 UTC
Unable to reproduce crashing report.  
-Linux 12.04 base, LO 4.5dev, 4.4dev
-Win XP 4.4.2.2  (no quickstart, no open LO, double-clicking on file in explorer).

Able to reproduce  "Error: Reference source not found" on various links after closing and reopening.  More show up when pressing F9.
-Linux 12.04 base, LO 4.5dev and 4.4dev
-Win XP 4.4.2.2
-NOT seen in 4.3 bibisect (not seen in git checkout latest).
-NOT seen in Win 4.3.5
Comment 4 Justin L 2015-04-07 05:59:41 UTC
-NOT seen in 4.4bibisect.

I don't have 4.5bibisect - someone else will need to continue from here.
Comment 5 Justin L 2015-04-08 16:57:38 UTC
Assigning as NEW because of the Numbered Paragraph CrossRefs that go missing when you press F9. 

Bibisected and isolated to:  http://cgit.freedesktop.org/libreoffice/core/commit/?id=af64f430181088460d5c574683dd1fdfd377ebcd

author	Caolán McNamara <caolanm@redhat.com>	2014-12-08 16:11:41 (GMT)
committer	Caolán McNamara <caolanm@redhat.com>	2014-12-08 16:24:27 (GMT)
commit af64f430181088460d5c574683dd1fdfd377ebcd (patch)
tree cee7754e021d60de8cb8d0f796f28577b4c06fd5
parent 93913ce2a71c66f57c9fe6a4b12c12ca6f7f473e (diff)
writer won't allow us to enter multiple CrossRefBookmarks on the same node

(Before this commit, the situation was even worse.  This is a tricky situation because LO only allows one CrossRef while MSO allows multiple.)
Comment 6 Matthew Francis 2015-04-09 05:36:04 UTC
Commit identified in comment 5

Adding Cc: to caolanm@redhat.com; Could you possibly take a look at this one? Thanks
Comment 7 Xisco Faulí 2015-08-24 15:45:11 UTC
Reference source not found problem still present in

Version: 5.0.0.5
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: es-ES (es_ES)

on Windows 7 (64-bit)
Comment 8 Robinson Tryon (qubit) 2015-12-13 11:12:14 UTC Comment hidden (obsolete)
Comment 9 Xisco Faulí 2016-09-26 14:53:42 UTC
Adding Cc: to Caolán McNamara
Comment 10 Xisco Faulí 2017-02-27 09:53:19 UTC
I can't no longer reproduce the crash nor the cross reference problem in 

Versión: 5.3.0.3
Id. de compilación: 7074905676c47b82bbcfbea1aeefc84afe1c50e1
Subpr. de CPU: 1; Versión de SO: Windows 6.1; Repr. de IU: predet.; Motor de trazado: HarfBuzz; 
Configuración regional: es-ES (es_ES); Calc: group

Closing as RESOLVED WORKSFORME
Comment 11 Orwel 2017-02-27 12:37:13 UTC
I also confirm the problem does not persist in 5.2.5.1 (stable) an Win10.
Thank you.