Bug 61343 - FILEOPEN: Writer crashes while opening this docx file
Summary: FILEOPEN: Writer crashes while opening this docx file
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: Other All
: high major
Assignee: Miklos Vajna
URL:
Whiteboard: target:4.1.0 target:4.0.2
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-02-23 11:52 UTC by Jean-Baptiste Faure
Modified: 2013-11-19 15:33 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
bt + console logs on master (324.63 KB, text/plain)
2013-02-23 17:39 UTC, Julien Nabet
Details
Stripped down bugdoc. (75.44 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2013-03-07 14:00 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Baptiste Faure 2013-02-23 11:52:18 UTC
The following file crashes LibreOffice: http://troumad.org/OOo/polycopP1D_2012_13.docx (file size: 2.1 MB). It contains a lot of mathematical formulas.

Tested on LibreOffice 3.6.5, 4.0.0, 4.0.2.0+  (Build ID: a4f226088faa5b8d9a688a765af0bb832843068), master (Build ID: d4b904f7d15be8460dbff4cf6c8d500aea5a4fa) under Ubuntu 12.04 x86-64.
Opens fine with LibreOffice 3.5.7

Best regards. JBF
Comment 1 Arnaud Versini 2013-02-23 16:31:48 UTC
Confirmed on Ubuntu, seems the same as #60558 but not sure
Comment 2 Thomas van der Meulen [retired] 2013-02-23 17:13:16 UTC
thank you for reporthig this bug,
i can reproduce this crash in LibreOffice 4.0.0.3 on Mac osx 10.6.8
Comment 3 Julien Nabet 2013-02-23 17:39:13 UTC
Created attachment 75414 [details]
bt + console logs on master

On pc Debian x86-64 with master sources updated today, I reproduced the problem.

I attached console logs + bt
Comment 4 Julien Nabet 2013-02-23 17:40:05 UTC
Cédric/Michael: bt attached, one for you?
Comment 5 Michael Stahl (allotropia) 2013-02-25 23:14:22 UTC
most likely caused by:

commit 4a0e2d6dc8ba3208f38e3a814ed806384a86ee9a
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>
Date:   Mon Mar 5 10:50:27 2012 +0100

    n#747471, n#693238: Textboxes import is a mess with OLE objects inside

or at least with that reverted i get an infinite loop instead
... which goes away after reverting this one:

commit b538f6a0f4193531e1187874b4b35a4384d6fcd1
Author: Miklos Vajna <vmiklos@suse.cz>
Date:   Fri Feb 24 15:38:55 2012 +0100

    fdo#45187 revert "writerfilter import, fixed the shapes import"
Comment 6 Michael Stahl (allotropia) 2013-02-26 11:27:49 UTC
Cadric and/or Miklos can look at the n# bugdocs -> please fix
Comment 7 Miklos Vajna 2013-03-07 14:00:27 UTC
Created attachment 76119 [details]
Stripped down bugdoc.

Stripped down single-paragraph version of the bugdoc that still triggers the crash here.
Comment 8 Miklos Vajna 2013-03-07 16:51:30 UTC
OK, so the reason the bugdoc crashes is that it tries to anchor an ole object to a groupshape, but nothing can be anchored to drawinglayer objects in Writer. With the recent groupshape import improvements, this now causes a crash. I'll fix in a bit.
Comment 9 Commit Notification 2013-03-07 17:25:56 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=344e4a25eac6505678f4ce8a6c1c8cef83c68276

fdo#61343 fix DOCX import of OLE object after groupshape



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Miklos Vajna 2013-03-07 17:37:24 UTC
4-0 review: https://gerrit.libreoffice.org/2587

Note that I think -- compared to 3.5 -- the import now not only crashes, but the first page look a lot more like how Word displays it. :)
Comment 11 Commit Notification 2013-03-08 04:32:02 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=60773144ad33a10c32ce43fa9fca80c8b3fe8202&h=libreoffice-4-0

fdo#61343 fix DOCX import of OLE object after groupshape


It will be available in LibreOffice 4.0.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Jean-Baptiste Faure 2013-03-08 05:48:03 UTC
Great!!!
Verified on both master (Version 4.1.0.0.alpha0+ (Build ID: 783d3928b7d935e2a022f92318e00faa3efa6bc)) and Version 4.0.2.0+ (Build ID: 5043707fef2f6961487f37099bfa5ec0549685b) under Ubuntu 12.04 x86-64.

Thank you very much, Miklos, for this quick fix. :-)

Best regards. JBF