Created attachment 203449 [details] ooo52593-1.odt The attached ODT, ooo52593-1.odt is from an old AOO bug report. Save it into DOCX, and try opening it in Word. => Word will hang or crash trying to open the DOCX. Observed with LO 26.2.0.0.alpha0+ (8ea8e254a3151f5390f3a10ff156fcaf8e7c5d5c), 7.0.0.3 / Windows. This is a regression from the following commit in 7.0 https://git.libreoffice.org/core/commit/2150fdc7d0f63288ac56c33cb898589512057642 author Attila Bakos <bakos.attilakaroly@nisz.hu> Thu Apr 09 17:10:22 2020 +0200 committer László Németh <nemeth@numbertext.org> Tue Apr 28 10:18:08 2020 +0200 "tdf#131539 DOCX export: fix position of OLE objects" In the saved DOCX before the change, in word/document.xml, one can find the following: <v:shape id="ole_rId2" style="width:35.3pt;height:17.05pt" o:ole=""> This changes with the fix: <v:shape id="ole_rId2" style="position:absolute;margin-left:10.8pt;margin-top:9.2pt;width:35.3pt;height:17.05pt;mso-position-horizontal-relative:text;mso-position-vertical-relative:text" o:ole=""> Such changes are the cause of the hang/crash.
One could argue -> NOTOURBUG :/ Anyhow, would make sense to specify what version of Word/OS is concerned.
(In reply to fpy from comment #1) > One could argue -> NOTOURBUG :/ Office generally saves files in a way that doesn't crash their software, and Writer should produce such documents as well, as the main purpose of using DOCX format is interoperability. Tested with Word 2013 and 2019.
Created attachment 204984 [details] ooo52593-1RT70.docx: not actually corrupt... (In reply to Aron Budea from comment #2) > (In reply to fpy from comment #1) One could argue -> NOTOURBUG :/ > Office generally saves files in a way that doesn't crash their software, I would tend to agree with fpy on this one. It looks and sounds like a layout bug. LO does this all the time - it saves files in a way that crashes when it is loaded because of a layout loop or whatever. It really has nothing to do with "the way it is saved". However, before the blamed commit, the document was NOT opening up cleanly in MS Word. So perhaps in fixing more 'root' issues, we can also avoid the hang as well.
(In reply to Aron Budea from comment #2) > (In reply to fpy from comment #1) One could argue -> NOTOURBUG :/ > Office generally saves files in a way that doesn't crash their software, I would tend to agree with fpy on this one. It looks and sounds like a layout bug. LO does this all the time - it saves files in a way that crashes when it is loaded because of a layout loop or whatever. It really has nothing to do with "the way it is saved". Simply removing frame3's position:absolute out of the style="..." avoids the hang. However, so does removing frame2 altogether... so that pretty much proves that the style="..." is not the problem.
(In reply to Justin L from comment #4) > It looks and sounds like a layout bug. LO does this all the time - it saves > files in a way that crashes when it is loaded because of a layout loop or > whatever. It really has nothing to do with "the way it is saved". I don't think the conclusion that sometimes your saved files can't be opened afterwards is an acceptable resolution to such problems. Sure, in LO you have the option to tweak any part of the software, and tweaking the layout code is the most straightforward place (albeit still complicated), but with MSO you obviously don't have that option. Which leaves us with tweaking the export code as the only option, provided we can figure out what part causes the problem, and what is the smallest adjustment to avoid it. > However, so does removing frame2 altogether... so that pretty much proves > that the style="..." is not the problem. The problem is that the result crashes Word, and the change can be anything that keeps the file close to the original, while not freezing or crashing Word. Let me reopen this, because even though a layout loop in Word isn't our bug, the bug will never go away. I guess someone could report this to MS and see if they react... either way, let's just track this issue here for now.
(In reply to Aron Budea from comment #5) > The problem is that the result crashes Word, and the change can be anything > that keeps the file close to the original Any change you make is going to break valid/necessary properties for some other document. You never 'fix a document'. You always 'fix something wrong'. Of course, it is always possible that something really is wrong here, but good luck finding it.