Bug 106700 - nested docx documents take long time to open or do not open at all
Summary: nested docx documents take long time to open or do not open at all
Status: RESOLVED DUPLICATE of bug 93635
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0 all versions
Hardware: All All
: high critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx, haveBacktrace
Depends on:
Blocks: DOCX
  Show dependency treegraph
 
Reported: 2017-03-22 15:05 UTC by Michal Stepniewski
Modified: 2020-01-20 11:17 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
example file (27.47 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-03-22 15:29 UTC, Michal Stepniewski
Details
GDB trace of crash with 5.4 master (71.19 KB, text/plain)
2017-03-30 17:11 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Stepniewski 2017-03-22 15:05:09 UTC
Description:
Documents created in MS Office saved in xml format - docx - with embeded documents do not open or it takes a considerable amount of time to have them opened by LibreOffice Writer 5.x. One can easily open them in LibreOffice Writer 4.1 for instance.

Steps to Reproduce:
1. Take a docx file with nested docx documents.
2. Open with LibreOffice Writer 5.x.
3. Wait and see.

Actual Results:  
After 10, 20, 30 minutes it might open but otherwise processor utilisation is under constant utilisation by libreoffice, disk is not doing much.

Expected Results:
LibreOffice Writer not resposive.


Reproducible: Always

User Profile Reset: Tried it on five different computers x32 and amd64 to no avail.

Additional Info:
I can send you an example file if you like.


User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:51.0) Gecko/20100101 Firefox/51.0
Comment 1 Xisco Faulí 2017-03-22 15:07:14 UTC
Hello Michal,

Thank you for reporting the bug.

it seems you're using an old version of LibreOffice.
Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 2 Michal Stepniewski 2017-03-22 15:29:52 UTC
Created attachment 132075 [details]
example file

I cannot open it in LibreOffice Writer 5.0 and 5.1 and 5.2 and 5.3 on MS Windows x32 and x64 but it works fine with LibreOffice Writer 4.1.
Comment 3 Michal Stepniewski 2017-03-22 15:31:51 UTC
(In reply to Xisco Faulí from comment #1)
> Hello Michal,
> 
> Thank you for reporting the bug.
> 
> it seems you're using an old version of LibreOffice.
> Could you please try to reproduce it with the latest version of LibreOffice
> from https://www.libreoffice.org/download/libreoffice-fresh/ ?
> I have set the bug's status to 'NEEDINFO'. Please change it back to
> 'UNCONFIRMED' if the bug is still present in the latest version.

The situation repeats itself with 5.0 and 5.1 and 5.2 and 5.3. I can open such files in LibreOffice 4.1.
Comment 4 Michal Stepniewski 2017-03-28 10:13:57 UTC
(In reply to Xisco Faulí from comment #1)
> Hello Michal,
> 
> Thank you for reporting the bug.
> 
> it seems you're using an old version of LibreOffice.
> Could you please try to reproduce it with the latest version of LibreOffice
> from https://www.libreoffice.org/download/libreoffice-fresh/ ?
> I have set the bug's status to 'NEEDINFO'. Please change it back to
> 'UNCONFIRMED' if the bug is still present in the latest version.

I've attached such a document to this bug. You can test the process using it.
Will you be so kind as to let me know if you are going to look into it?
Regards,

Michal
Comment 5 Xisco Faulí 2017-03-28 10:18:03 UTC
Hello Michal,
I'm sorry. Your response went unnoticed to me.
The document opens instantly in

Version: 5.4.0.0.alpha0+
Build ID: 193f8966135064a32164c9da08d01dab9c1fc15d
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

and

Versión: 5.3.1.1
Id. de compilación: 72fee18f394a980128dc111963f2eefb05998eeb
Subpr. de CPU: 1; SO: Windows 6.1; Repr. de IU: predet.; Motor de trazado: HarfBuzz; 
Configuración regional: es-ES (es_ES); Calc: group
Comment 6 Michal Stepniewski 2017-03-28 11:10:05 UTC
The situation is persistent across whole 5.x branch: 5.1, 5.2, 5.3...
Comment 7 Michal Stepniewski 2017-03-28 11:11:06 UTC
I've checked it on Mac OS X Sierra with Libreoffice 5.3.1. It does not open the file.
Comment 8 Buovjaga 2017-03-30 12:33:58 UTC
(In reply to Michal Stepniewski from comment #2)
> Created attachment 132075 [details]
> example file
> 
> I cannot open it in LibreOffice Writer 5.0 and 5.1 and 5.2 and 5.3 on MS
> Windows x32 and x64 but it works fine with LibreOffice Writer 4.1.

So you are unable to open it normally on Windows or Mac? I was able to open on Windows just fine. I can test with macOS later.

Win 7 Pro 64-bit, Version: 5.3.1.2 (x64)
Build ID: e80a0e0fd1875e1696614d24c32df0f95f03deb2
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine: new; 
Locale: fi-FI (fi_FI); Calc: CL
Comment 9 Michal Stepniewski 2017-03-30 13:10:13 UTC
(In reply to Buovjaga from comment #8)
> (In reply to Michal Stepniewski from comment #2)
> > Created attachment 132075 [details]
> > example file
> > 
> > I cannot open it in LibreOffice Writer 5.0 and 5.1 and 5.2 and 5.3 on MS
> > Windows x32 and x64 but it works fine with LibreOffice Writer 4.1.
> 
> So you are unable to open it normally on Windows or Mac? I was able to open
> on Windows just fine. I can test with macOS later.
> 
> Win 7 Pro 64-bit, Version: 5.3.1.2 (x64)
> Build ID: e80a0e0fd1875e1696614d24c32df0f95f03deb2
> CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine:
> new; 
> Locale: fi-FI (fi_FI); Calc: CL

I'm not able to create a proper attachment file in bugzilla so I've put one on my web site. You can download it from:

https://1-2.pl/pub/example.docx

It has a size of 22MB. It does not compress much but here you are a compressed version:

https://1-2.pl/pub/example.docx.zip

This file is being easily opened by LibreOffice 4.1 on Windows and Mac.
It cannot be opened by LibreOffice 5.1, 5.2, 5.3 on either of the platforms.
Comment 10 Michal Stepniewski 2017-03-30 13:13:42 UTC Comment hidden (obsolete)
Comment 11 Buovjaga 2017-03-30 17:11:33 UTC
Created attachment 132286 [details]
GDB trace of crash with 5.4 master

(In reply to Michal Stepniewski from comment #9)
> https://1-2.pl/pub/example.docx

I get a crash on opening. Got a trace.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha0+
Build ID: 0d658dfc8ffdc91f3dcb2bd34dde1dbae76ad8ae
CPU threads: 8; OS: Linux 4.10; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on March 30th 2016
Comment 12 Buovjaga 2017-03-30 17:13:20 UTC
3.6 doesn't crash.

Arch Linux 64-bit
Version 3.6.7.2 (Build ID: e183d5b)
Comment 13 raal 2017-04-05 19:19:37 UTC
This seems to have begun at the below commit.
Adding Cc: to Miklos Vajna ; Could you possibly take a look at this one?
Thanks


cc44ace348bc71b8e0411f3c4a3dbcec4852c8a5 is the first bad commit
commit cc44ace348bc71b8e0411f3c4a3dbcec4852c8a5
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Sun Mar 15 01:57:21 2015 +0800

    source-hash-41aa970b3120837ca9cadb12997a53ad322145a4
    
    commit 41aa970b3120837ca9cadb12997a53ad322145a4
    Author:     Miklos Vajna <vmiklos@collabora.co.uk>
    AuthorDate: Wed Aug 27 15:24:37 2014 +0200
    Commit:     Miklos Vajna <vmiklos@collabora.co.uk>
    CommitDate: Wed Aug 27 15:34:41 2014 +0200
    
        DOCX import: fix handling of embedded DOCX files
    
        The problem was that SwXTextEmbeddedObject::getEmbeddedObject() returned
        an empty reference for those embedded objects, so the HTML filter
        couldn't extract their content when it wanted to do so.
    
        It turns out the reason for this was that the DOCX importer only handled
        the replacement image + raw native data for the object. Fix this by
        creating the embedded object with the correct CLSID and import the
        raw data into the empty embedded document model.
    
        This is similar to what is done for XLSX-in-PPTX in
        oox::drawingml::ShapeExport::WriteOLE2Shape(), just for the import part.
    
        Change-Id: Ieb1dcb1774d2d4da00117e3a35160053066c78aa
Comment 14 Miklos Vajna 2017-04-07 18:34:54 UTC
If you want faster import, just go to Tools -> Options -> Load/Save -> Microsoft Office and untick the Load column at the "WinWord to LibreOffice" row. I don't think this is a regression; the binary DOC import always did this "embedded DOC" -> "embedded Writer document" conversion, and it's consistent that with the above commit the DOCX import does the same.
Comment 15 QA Administrators 2018-08-25 02:42:52 UTC Comment hidden (obsolete)
Comment 16 Timur 2020-01-20 11:17:11 UTC
Large sample is not available anymore.
Those who have it, please attach.
Anyway, looks like a duplicate of bug 93635.
If you disagree, please explain.

*** This bug has been marked as a duplicate of bug 93635 ***