Bug 90141 - Crashing when opening a .docx file
Summary: Crashing when opening a .docx file
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.3.1 rc
Hardware: Other All
: high major
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.0.0 target:4.4.4
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2015-03-21 06:33 UTC by stsav012
Modified: 2017-05-12 20:50 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
The File to Reproduce the Bug (159.96 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-03-21 06:33 UTC, stsav012
Details
bt with debug symbols (9.01 KB, text/plain)
2015-03-21 07:35 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stsav012 2015-03-21 06:33:35 UTC
Created attachment 114226 [details]
The File to Reproduce the Bug

LibreOffice keeps crashing soon after opening a .docx file.
In the crash report I get
  soffice.bin crashed with SIGABRT in __gnu_cxx::__verbose_terminate_handler()
My OS is Ubuntu 14.04 LTS.
Comment 1 Julien Nabet 2015-03-21 07:35:00 UTC
Created attachment 114227 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated yesterday, I could reproduce this.
Comment 2 Matthew Francis 2015-03-21 11:57:14 UTC
Bibisect results from the 45 dbgutil repo:

commit 0d45a5d167c62cde4d7f1a76b2bed58c118cfb7d
Author: Miklos Vajna <vmiklos@collabora.co.uk>
Date:   Sat Mar 7 05:48:46 2015 +0100

    2015-03-07: source-hash-333f8a76341f5b4921e89012d133007503e49612


Based on the timing, quite possibly another bug from the timer/idle work
Comment 3 Julien Nabet 2015-03-21 12:06:18 UTC
Matthew: since I could reproduce this with LO Debian package 4.3.2, it means it has been fixed but, because of idle work, could be a regression?
Comment 4 Matthew Francis 2015-03-21 12:43:21 UTC
(In reply to Julien Nabet from comment #3)
> Matthew: since I could reproduce this with LO Debian package 4.3.2, it means
> it has been fixed but, because of idle work, could be a regression?

Oh, that's fascinating. It does crash after a while. I should re-check - maybe the idle/timer changes just speeded up the existing crash ;)
Comment 5 Matthew Francis 2015-03-21 13:22:02 UTC
OK, second try - with a bit more patience for crashing to happen.

The file seems to start crashing as of the below point in the 43all bibisect repo.
 0b24b35122b1aec8721035679954b10f82a23540 is the first bad commit
commit 0b24b35122b1aec8721035679954b10f82a23540
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Fri Oct 18 03:59:45 2013 +0000

    source-hash-cdab3d619ca0389d4c14e3b50fb66bbadcf5c52f



Based on the backtrace of this original crash, I think the issue probably came from the below commit:

commit 76d1ca523ddcf89cc269fe51c70e66066943ef5a
Author: Miklos Vajna <vmiklos@suse.cz>
Date:   Wed Aug 28 15:27:07 2013 +0200

    bnc#816593 DOCX import: fix auto table width wrt nested tables



Later, the original crash changes to the backtrace in attachment 114227 [details] as of the below commit (exact commit identified using the 44max bibisect repo):

    commit 48a679cbc5775a7a033dfe494c2a0a513aba9b1f
    Author:     Caolán McNamara <caolanm@redhat.com>
    AuthorDate: Mon Sep 15 16:53:43 2014 +0100
    Commit:     Caolán McNamara <caolanm@redhat.com>
    CommitDate: Mon Sep 15 16:54:08 2014 +0100
    
        Resolves: fdo#66496 don't crash on loading specific .docx
    
        Change-Id: I4db5dfeb0ce1494039a051f552ce3f69b2b5dae3


Adding Cc: to vmiklos@collabora.co.uk and caolanm@redhat.com; Could you possibly take a look at this? Thanks
Comment 6 Caolán McNamara 2015-03-24 15:22:43 UTC
I think the fundamental issue is possibly a table in a footnote which the layout doesn't support
Comment 7 stsav012 2015-03-28 22:03:02 UTC
If it helps, LibreOffice Writer shows 23 pages there instead of 18 pages that Google Online Viewer does.
Comment 8 Commit Notification 2015-05-01 11:14:59 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=971adcd9e19e0bcab5855aae9be58d2203b46169

Resolves: tdf#90141 layout crash with table in footnote

It will be available in 5.0.0.

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 9 Caolán McNamara 2015-05-01 11:16:02 UTC
Yeah, tables in footnotes, layout can't really do that correctly.
Comment 10 Timur 2015-05-04 07:50:56 UTC
Reproduced also in Windows starting from 4.3.3.1. Please backport to 4.4.
Comment 11 Caolán McNamara 2015-05-04 19:49:06 UTC
Its proposed as https://gerrit.libreoffice.org/#/c/15584/ for 4-4
Comment 12 Commit Notification 2015-05-11 12:27:08 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

Resolves: tdf#90141 layout crash with table in footnote

It will be available in 4.4.4.

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 13 Robinson Tryon (qubit) 2015-12-17 08:49:47 UTC Comment hidden (obsolete)