Bug 67478 - FILEOPEN: General Error for Word 2003 XML document of filetype DOC or XML (just DOCX works)
Summary: FILEOPEN: General Error for Word 2003 XML document of filetype DOC or XML (ju...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard: BSA interoperability
Keywords: filter:docx
Depends on:
Blocks: MSO-XML2003
  Show dependency treegraph
 
Reported: 2013-07-29 14:18 UTC by Razvan Calugarasu
Modified: 2023-12-17 19:05 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Word document that can't be oppened (518.31 KB, application/msword)
2013-07-29 14:18 UTC, Razvan Calugarasu
Details
stderr output when opening this file (5.89 KB, text/plain)
2013-09-23 11:28 UTC, Maxim Monastirsky
Details
Word2013 "fixed" example (63.68 KB, text/xml)
2016-02-19 17:41 UTC, Dennis Roczek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Razvan Calugarasu 2013-07-29 14:18:05 UTC
Created attachment 83205 [details]
Word document that can't be oppened

Problem description: 

I try to open an word document an I get:

General Error.
General input/output error.

Steps to reproduce:
1. open attached document

Current behavior: Do not open document

Expected behavior: To open document

              
Operating System: Windows 7
Version: 4.1.0.4 release
Comment 1 Jorendc 2013-08-02 10:54:43 UTC
Thanks for reporting!

I can confirm this behavior, tested using Windows 8 with LibreOffice 4.1.0.4. Also reproducible using LibreOffice Version: 4.2.0.0.alpha0+
Build ID: 2f6cbe13e61c44d4bab8192a4708b698d3d9da33
TinderBox: Win-x86@6-debug, Branch:master, Time: 2013-07-25_00:00:21

Kind regards,
Joren
Comment 2 Mike Kaganski 2013-09-23 04:48:45 UTC Comment hidden (obsolete)
Comment 3 Maxim Monastirsky 2013-09-23 11:27:33 UTC Comment hidden (obsolete)
Comment 4 Maxim Monastirsky 2013-09-23 11:28:01 UTC
Created attachment 86357 [details]
stderr output when opening this file
Comment 5 Maxim Monastirsky 2013-09-23 11:40:25 UTC
(In reply to comment #3)
> It's not a duplicate of bug 67699, as bug 67699 is already fixed as of
> 4.1.2.2, while this bug is still reproducible.
Also the whole point of bug 67699 is that LO should detect file type according to its contents, not just according to file suffix. As of the current bug - it doesn't open even if you'll rename it to *.xml
Comment 6 Mike Kaganski 2013-09-23 11:42:16 UTC
Mea culpa - this is not about opening files with wrong extension (as I mistakingly assumed), but about MSO 2003 XML format; maybe this one has something in common with bug 64423?
Comment 7 Urmas 2013-09-23 22:30:12 UTC
The document can be opened if terrific whitespaces are cut out.
Comment 8 QA Administrators 2015-04-01 14:40:39 UTC Comment hidden (obsolete)
Comment 9 Buovjaga 2015-04-22 11:58:51 UTC
Read error with 5.0 & 3.5.0.

3.3.0 gives ascii filter options dialog.

Win 7 Pro 64-bit Version: 5.0.0.0.alpha0+ (x64)
Build ID: 211c12b9c64facd1c12f637a5229bd6a6feb032a
TinderBox: Win-x86_64@42, Branch:master, Time: 2015-04-18_01:51:17
Locale: fi_FI

Ubuntu 14.10 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4

LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 10 Dennis Roczek 2016-02-19 17:41:08 UTC
Created attachment 122808 [details]
Word2013 "fixed" example

This file was original the same structure. I opened it with Word2013 and simply saved it (and replaced content with lorem ipsum)

Writer simply does a "text import" with LibreOffice 5.1 release.
Comment 11 gerhard oettl 2016-09-20 17:35:35 UTC
I tried to open the file from 2013-07-29 (Word document that can't be oppened) with the same result as the original poster:

general error
general input/ouptut error

libreoffice 5.1.4.2
ubuntu 16.04.1

The bug is also still present.
Comment 12 Urmas 2016-09-27 12:30:35 UTC
The saved file from Word 2013 is not a Word XML document. It is some kind of flat OOXML file.
Comment 13 Dennis Roczek 2016-09-27 14:35:10 UTC
@urmas, yes, see https://en.wikipedia.org/wiki/Microsoft_Office_XML_formats

@beluga do we have a separated keyword for that file type shouldn't we separate the two file formats?
Comment 14 Buovjaga 2016-09-27 18:12:59 UTC
(In reply to Dennis Roczek from comment #13)
> @urmas, yes, see https://en.wikipedia.org/wiki/Microsoft_Office_XML_formats
> 
> @beluga do we have a separated keyword for that file type shouldn't we
> separate the two file formats?

We do have filter:ooxml, but I don't think we should add it to this report as the file was produced by your test in MSO 2013.
Comment 15 Xisco Faulí 2017-09-29 08:49:28 UTC Comment hidden (obsolete)
Comment 16 Dennis Roczek 2017-10-08 15:06:11 UTC
still repro with 
Version: 5.4.1.2 (x64)
Build-ID: ea7cb86e6eeb2bf3a5af73a8f7777ac570321527
CPU-Threads: 4; Betriebssystem:Windows 6.19; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: group
Comment 17 Timur 2018-11-01 17:50:59 UTC
Repro 6.2+. Sample is DOC. If saved in MSO as XML also cannot be open. Just if saved in MSO as DOCX it works.
Comment 18 QA Administrators 2019-11-02 03:45:09 UTC Comment hidden (obsolete)
Comment 19 Timur 2019-11-04 14:40:38 UTC Comment hidden (obsolete)
Comment 20 Timur 2021-04-08 13:54:27 UTC
Repro 7.2+.
Comment 21 QA Administrators 2023-04-09 03:26:20 UTC Comment hidden (obsolete)
Comment 22 Dennis Roczek 2023-09-22 13:26:03 UTC
still repro with

Version: 7.6.1.2 (X86_64) / LibreOffice Community
Build ID: 60(Build:2)
CPU threads: 4; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Ubuntu package version: 4:7.6.1~rc2-0ubuntu0.22.04.1~lo2
Calc: threaded
Comment 23 Matt K 2023-12-16 20:21:53 UTC
The code catches itself doing infinite recursion at line 2343 of workdir\UnpackedTarball\libxslt\libxslt\transform.c in function xsltApplySequenceConstructor:

"/*
* Check for infinite recursion: stop if the maximum of nested templates
* is excceeded. Adjust xsltMaxDepth if you need more.
*/
if (ctxt->depth >= ctxt->maxTemplateDepth) {
"

The callstack just has the following frames repeated:

	libxslt.dll!xsltApplySequenceConstructor(_xsltTransformContext * ctxt, _xmlNode * contextNode, _xmlNode * list, _xsltTemplate * templ) Line 2351	C
 	libxslt.dll!xsltApplyXSLTTemplate(_xsltTransformContext * ctxt, _xmlNode * contextNode, _xmlNode * list, _xsltTemplate * templ, _xsltStackElem * withParams) Line 3211	C
 	libxslt.dll!xsltCallTemplate(_xsltTransformContext * ctxt, _xmlNode * node, _xmlNode * inst, _xsltElemPreComp * castedComp) Line 4788	C
 	libxslt.dll!xsltApplySequenceConstructor(_xsltTransformContext * ctxt, _xmlNode * contextNode, _xmlNode * list, _xsltTemplate * templ) Line 2752	C
 	libxslt.dll!xsltChoose(_xsltTransformContext * ctxt, _xmlNode * contextNode, _xmlNode * inst, _xsltElemPreComp * comp) Line 5269	C
 	libxslt.dll!xsltApplySequenceConstructor(_xsltTransformContext * ctxt, _xmlNode * contextNode, _xmlNode * list, _xsltTemplate * templ) Line 2752	C
 	libxslt.dll!xsltIf(_xsltTransformContext * ctxt, _xmlNode * contextNode, _xmlNode * inst, _xsltElemPreComp * castedComp) Line 5375	C

So, it looks like this is a bug in the library.  Maybe a bug should be opened at https://gitlab.gnome.org/GNOME/libxslt/-/issues ?

Marking as NOTOURBUG
Comment 24 Aron Budea 2023-12-17 19:05:09 UTC
Even if the bug is in a library used by LibreOffice, if/when it gets fixed, the library still needs to be updated in LibreOffice, ie. there's something to do on the side of LO. Let's keep this open until that.