Bug 59884 - FILEOPEN: Crash when opening a particular docx file with an image
Summary: FILEOPEN: Crash when opening a particular docx file with an image
Status: RESOLVED DUPLICATE of bug 46547
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: high critical
Assignee: Not Assigned
URL:
Whiteboard: BSA (target:4.3.0) Confirmed:4.2.0.2:...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-26 03:37 UTC by webofht-libreofficebugs002
Modified: 2014-02-19 17:03 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshots showing lost image (146.93 KB, application/vnd.oasis.opendocument.graphics)
2013-01-26 03:37 UTC, webofht-libreofficebugs002
Details
A backtrace of crash openning the file (21.31 KB, text/x-log)
2014-01-15 15:13 UTC, Alexandr
Details
A small part of the original file that demonstrates the problem (164.36 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-01-22 18:29 UTC, Alexandr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description webofht-libreofficebugs002 2013-01-26 03:37:54 UTC
Created attachment 73665 [details]
Screenshots showing lost image

Problem description: In a particular file, page 2 does not show an image as expected.

Steps to reproduce:
1. The operating system used is Linux debian 2.6.32-5-686 #1 SMP Sun Sep 23 09:49:36 UTC 2012 i686 GNU/Linux.
2. The LibreOffice versions involved are:
- LibreOffice Version 3.6.4.3 (Build ID: 2ef5aff) (LO3.6.4.3)
- LibreOffice Version 4.0.0.2 (Build ID: 408fe71bd18616c467b3dcd7ab6756528ffcae2) (LO4.0.0.2)
3. The particular file is:

http://ebcrpa.jamstec.go.jp/dav/prabir/transcom-ch4/old_versions/trans_ch4ctl_fig2.0.docx


4. File -> Open -> (that document)

5. Page 2 does not show an image as expected.

Current behavior:  LO4.0.0.2 and LO3.6.4.3 do not show an image on page 2 of the file mentioned.

Expected behavior:  LO4.0.0.2 and LO3.6.4.3 should show an image on page 2 of the file mentioned.

I am submitting the screenshots.

Regards,
C. H. D.

Operating System: Debian
Version: 4.0.0.2 rc
Comment 1 Jorendc 2013-01-26 18:29:27 UTC
I can confirm this behavior using Linux Mint 14 with LibreOffice 4.0.0.2 RC2.

I tried to bibisect this bug, but with version LibreOffice 3.5.0 (
Build ID: d6cde02) it didn't show it either.

I open this file using Word for Mac on a Mac OSX 10.8.2, image is correctly displayed.

So marking this bug as:
- NEW
- I change version to 3.5.0 because that's the oldest version we can reproduce this behavior
- Following the flowchart [1] I mark this bug as 'Major' 'High'

[1]: https://wiki.documentfoundation.org/images/0/06/Prioritizing_Bugs_Flowchart.jpg
Comment 2 Jorendc 2013-12-29 14:11:34 UTC
Particular file not downloadable anymore. NEEDINFO
Comment 3 webofht-libreofficebugs002 2014-01-12 01:48:01 UTC
Here is a backup of the file: 

https://www.dropbox.com/s/0cnzecv0gxun2c1/trans_ch4ctl_fig2.0.docx


$ sha1sum trans_ch4ctl_fig2.0.docx  1a4dd264e5e536ef6549de2567a325202ea67f03 

Thanks
Comment 4 Alexandr 2014-01-15 15:13:34 UTC
Created attachment 92149 [details]
A backtrace of crash openning the file

I reproduce the bug with LibreOffice 3.5.4 from Debian 7 “Wheezy”. 

After that I tried to open the test file in newer versions:
4.1.4.2 from Debian “Wheezy” backports
4.2.0.1 on Debian testing (“Jessie”)
4.2.0.2 on Windows 7

LibreOffice crashes in all this cases. In Windows I get a message box “General input/output error.”. I made a backtrace for the case of Debian Wheezy-backports and attach the log here.

If open and save the document in MS Word 2007, it can be opened in any tested version of LO without such problems.
Comment 5 retired 2014-01-16 09:26:33 UTC
Alexandr: Why not attach your test file? Would be very helpful in moving this forward.
Comment 6 Alexandr 2014-01-16 11:08:29 UTC
Foss, it is not MY file, it is the bug reporter's file (see comment 3). It is too big (4,5 MB) to be downloaded to bugzilla directly.
Comment 7 Jacques Guilleron 2014-01-16 11:38:42 UTC
Hi all,

I get the same erors as Alexandr when trying to open this file with Lo 4.2.0.2,
but it can be opened with LO 4.3.0.0.alpha0+
Build ID: 03e0781145bceebca84e5d891ed0df72c75389da
TinderBox: Win-x86@39, Branch:master, Time: 2014-01-09_12:14:1
& Windows 7 Home Premium.

Can you try this version?

Kind regards,

Jacques
Comment 8 Alexandr 2014-01-16 17:29:12 UTC
Yes, the document is opened fine with LibreOffice 4.3.0.0.alpha0+
Build ID: 164a8c409c2f070ee51ca4258585cf0c8579af51
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2013-12-19_00:13:56

Should the bug be resolved worksforme or somebody would find the patch and backport it to 4.2?
Comment 9 tommy27 2014-01-18 19:32:39 UTC
(In reply to comment #3)
> Here is a backup of the file: 
> 
> https://www.dropbox.com/s/0cnzecv0gxun2c1/trans_ch4ctl_fig2.0.docx
> 
> 
> $ sha1sum trans_ch4ctl_fig2.0.docx 
> 1a4dd264e5e536ef6549de2567a325202ea67f03 
> 
> Thanks


I cannot open file under Win7 64bit using 4.1.4.2 and 4.2.1.0+

General Error.
General input/output error

set status to NEW
Comment 10 Alexandr 2014-01-22 18:29:43 UTC
Created attachment 92600 [details]
A small part of the original file that demonstrates the problem

I changed the bug title and set its severity to critical because now it is not an image loss but a crash.

>If open and save the document in MS Word 2007, it can be opened in any tested >version of LO without such problems.

But saving in MS Word 2010 preserves the problem. It let me delete all unnecessary and decrease the file size. I attach the small file that demonstrates the problem in case the original file was deleted from dropbox.

It is strange that the image is presented by pdf and png files in /word/media/ but I can not reproduce this in MS Word 2010 by pasting a pdf into a document nor by creating a pdf OLE object.
Comment 11 retired 2014-01-23 07:53:35 UTC
Confirmed:4.2.0.2:OSX NoRepro:4.3.0.0a0+:OSX

This is worksforme. Since we don't have a specific commit fixing anything I'm not sure how to get a backport to 4.2.

You might want to use the nightly for this specific file. Try resaving that to odt format and then maybe you can continue to work with LO 4.2.x.
Comment 12 Jacques Guilleron 2014-01-23 20:54:58 UTC
Hi all,

I tried Bug 68211 - FILEOPEN: "General input/output error" on loading a .docx file
but this one was backported to LO 4.2.1 and doen't open this file, as tommy27 reported it.
So I tried to see what can cause this in .docx:

@Alexandr: If you change in the last paragraph of small_example.docx the inferior number 4 in CH4 to normal position, your file will open correctly in LO 4.2.0.2. There's no longer crash. But you have now a new paragraph in LO with a page field. Perhaps this can not be verified if the end paragraph is left in inferior position and contain a field, but I am not sure.

Now, for the first webofht document(trans_ch4ctl_fig2.0a.docx), if I only change the line 12 from Return line to an empty pragraph, the document can be opened with LO 4.2.0.2. Here, Return line is the issue.
I didn't still find the fix which allows to open it in LO 4.3.0.0.

I continue with searching.

Kind regards,

Jacques
Comment 13 Alexandr 2014-01-26 15:19:31 UTC
Hello, Jacques

> @Alexandr: If you change in the last paragraph of small_example.docx the
> inferior number 4 in CH4 to normal position, your file will open correctly
> in LO 4.2.0.2. There's no longer crash. But you have now a new paragraph in
> LO with a page field. Perhaps this can not be verified if the end paragraph
> is left in inferior position and contain a field, but I am not sure.

Yes, I tried some manipulations with this string in MS Word 2010. Sometimes it led to document which does not cause the crash. But it is not easy to reproduce. 

This versions of the document, which does not crash LibreOffice 4.1 – 4.2, have the picture visible in LibreOffice 3.5.4. It means that the original problem with the image and the crash have the same reason.
Comment 14 webofht-libreofficebugs002 2014-02-02 01:37:45 UTC
Confirm crashing when opening the file with LibreOffice Version: 4.2.0.4 (Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71).
Comment 15 Alexandr 2014-02-19 17:03:36 UTC
I believe this issue is a duplicate of bug 46547, because:
- both test cases show similar behavior: empty frames with “Read error” message instead of pictures in old versions of LibreOffice; crash in 4.1.4 and 4.2.0; correct in 4.3alpha0;
- backtraces with debug symbols are identical in LibreOffice 4.1.4.2 from Debian backports.
- Both documents contains images in two variants (png and pdf) in /word/media/

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