Bug 88126 - FILEOPEN Writer hangs on opening a docx that MSO says corrupt but Open XML Productivity Tools finds no validation errors
Summary: FILEOPEN Writer hangs on opening a docx that MSO says corrupt but Open XML Pr...
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:
Keywords: filter:docx, haveBacktrace, perf
Depends on:
Blocks: DOCX-Opening
  Show dependency treegraph
 
Reported: 2015-01-06 19:43 UTC by Jos van den Oever
Modified: 2023-11-05 03:13 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
file that hangs libreoffice when opened (39.69 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-01-06 19:43 UTC, Jos van den Oever
Details
xslt used for greeking the original file (616 bytes, text/xml)
2015-01-06 19:43 UTC, Jos van den Oever
Details
debug WinDBG from procdump (12.16 KB, text/text)
2017-07-19 12:21 UTC, Timur
Details
Word 2016 repaired bugdoc (39.02 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-02-06 15:31 UTC, Luke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jos van den Oever 2015-01-06 19:43:17 UTC
Created attachment 111867 [details]
file that hangs libreoffice when opened

The attached file causes LibreOffice Writer to hang when it is opened. The CPU is stuck at 100% and memory use keeps increasing.

The problem is reproducible.

The file is a greeked version of the original. The file was greeked by unzipping and running the attached xslt over the contents of the xml files. This replaced all [a-zA-Z0-9] with 'a'. This changed file also hangs LibreOffice.
Comment 1 Jos van den Oever 2015-01-06 19:43:48 UTC
Created attachment 111868 [details]
xslt used for greeking the original file
Comment 2 Jos van den Oever 2015-01-06 19:44:06 UTC
Version: 4.3.3.2
Build ID: 430m0(Build:2)
Comment 3 Robinson Tryon (qubit) 2015-01-07 00:42:45 UTC Comment hidden (obsolete)
Comment 4 Robinson Tryon (qubit) 2015-01-07 00:51:50 UTC
TESTING with Ubuntu 14.04 (x86-64) + 
LO Version: 4.5.0.0.alpha0+
  Build ID: 5c60dab390d66a4d5abeaf548efecf3913b90839
  TinderBox: Linux-rpm_deb-x86_64@46-TDF
  Branch:master
  Time: 2014-12-31_00:20:30
  Locale: en_US

(In reply to Jos van den Oever from comment #0)
> Created attachment 111867 [details]
> file that hangs libreoffice when opened
> 
> The attached file causes LibreOffice Writer to hang when it is opened. The
> CPU is stuck at 100% and memory use keeps increasing.

CONFIRMED -- 100% CPU and memory creeping upwards
I only let it go for about 45 seconds.

Status -> NEW

It's possible that this is a performance issue, but I'm not sure. I'll test on a beefier machine (this machine is a Core2duo T8300 @2.4GHz + 4G RAM)
Comment 5 Robinson Tryon (qubit) 2015-01-07 01:01:49 UTC
(In reply to Robinson Tryon (qubit) from comment #4)
> [test with] attachment 111867 [details]
> > file that hangs libreoffice when opened
> > 
> > The attached file causes LibreOffice Writer to hang when it is opened. The
> > CPU is stuck at 100% and memory use keeps increasing.
> ..
> It's possible that this is a performance issue, but I'm not sure. I'll test
> on a beefier machine (this machine is a Core2duo T8300 @2.4GHz + 4G RAM)

Hangs on a Mac Mini as well (quad-core i7 + 16G RAM).

Platform -> All
Whiteboard -> perf
Comment 6 Jos van den Oever 2015-08-23 21:07:01 UTC
This is still a problem in LibreOffice 5.0.0.5.
Opening bug.docx hangs one cpu core at 100% for at least a minute.
Comment 7 Robinson Tryon (qubit) 2015-12-09 18:07:57 UTC Comment hidden (obsolete)
Comment 8 Timur 2017-07-19 12:21:54 UTC
Created attachment 134734 [details]
debug WinDBG from procdump
Comment 9 Timur 2017-07-19 13:23:23 UTC
When someone submits a bug, always need to be asked how document was created. Hpw was original created (MSO or LO) and how attached docx was created.
If this DOCX was saved or changed by LO then it's another FILESAVE bug, that can be fixed only if reproducible with steps. 
Othwerwise, this FILEOPEN bug is useless and can be closed as INVALID. 
This DOCX cannot be open with MSO, says the file is corrupt. 
What's not clear is how Open XML Productivity Tools finds no validation errors.
So I set back to Needinfo.
Comment 10 Jos van den Oever 2017-07-19 19:44:50 UTC
I do not the original file anymore. The file was created with MS Office. It was greeked to hide confidential information.
Comment 11 Timur 2017-07-20 11:55:29 UTC
I guess we may change this bug from ability to open file to message that file is corrupt and cannot be open, maybe repaired. Hang is not acceptable.
Comment 12 QA Administrators 2018-07-21 02:40:23 UTC Comment hidden (obsolete)
Comment 13 Timur 2018-07-23 10:23:25 UTC
Repro 6.2+.
Comment 14 Luke 2019-02-06 15:31:05 UTC
Created attachment 148955 [details]
Word 2016 repaired bugdoc
Comment 15 NISZ LibreOffice Team 2020-10-30 11:01:30 UTC
No longer hangs in 7.0 since:

https://git.libreoffice.org/core/+/8b13da71aedd094de0d351a4bd5ad43fdb4bddde

author
László Németh <nemeth@numbertext.org> Tue Jan 28 14:32:54 2020 +0100 
committer
László Németh <nemeth@numbertext.org> Wed Jan 29 11:00:34 2020 +0100 

tdf#128959 DOCX import: fix missing text lines in tables

*** This bug has been marked as a duplicate of bug 128959 ***
Comment 16 Commit Notification 2020-10-30 15:34:51 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/60dbe21f59a45889c433727d0862c9a4274d94d2

tdf#88126: sw_ooxmlexport15: Add unittest

It will be available in 7.1.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Xisco Faulí 2021-02-15 09:18:01 UTC
This issue is happening again since

author	László Németh <nemeth@numbertext.org>	2021-02-10 00:12:52 +0100
committer	László Németh <nemeth@numbertext.org>	2021-02-12 18:27:31 +0100
commit 9b39ce0e66acfe812e1d50e530dc2ccdef3e1357 (patch)
tree f1bb0d9c24dbe6a40e82837f0ff5632a90799530
parent 3380163bc0fb9dab7f289cc36b0eeb0c9b3ddaa9 (diff)
tdf#76260 DOCX import: fix slow footnote import

it was only working by accident...
Comment 18 Kevin Suo 2021-11-04 12:07:26 UTC
(In reply to Xisco Faulí from comment #17)
I see you committed a unit test for this, was it removed by someone? If the unit test worked then this should not be broken again.
Comment 19 Xisco Faulí 2021-11-04 14:39:07 UTC
(In reply to Kevin Suo from comment #18)
> (In reply to Xisco Faulí from comment #17)
> I see you committed a unit test for this, was it removed by someone? If the
> unit test worked then this should not be broken again.

See the commit message in
https://cgit.freedesktop.org/libreoffice/core/commit/?id=9b39ce0e66acfe812e1d50e530dc2ccdef3e1357
Comment 20 Kevin Suo 2021-11-04 15:03:51 UTC
Then maybe we can find the commit which caused the "accident". No matter what, we should never hang or crash. If the file is corrupted, then tell the user and try to repair; if repair fails, then exit.
Comment 21 QA Administrators 2023-11-05 03:13:24 UTC
Dear Jos van den Oever,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug