Bug 140668 - CRASH: importing docx file
Summary: CRASH: importing docx file
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:7.2.0 target:7.1.2
Keywords: bibisected, bisected, haveBacktrace, regression
: 140363 141067 141379 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-02-25 16:00 UTC by Xisco Faulí
Modified: 2021-03-31 08:13 UTC (History)
11 users (show)

See Also:
Crash report or crash signature: ["writerfilter::dmapper::DomainMapper_Impl::SetFrameDirection(short)"]


Attachments
bt with debug symbols (20.78 KB, text/plain)
2021-02-25 21:46 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2021-02-25 16:00:56 UTC
Steps to reproduce:
1. Open attachment 168130 [details] from bug 138503

-> it crashes automatically

Reproduced in

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: af64bc49d872d8a040d66387303def98eae5cd51
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Xisco Faulí 2021-02-25 16:07:52 UTC
I bisected this and it started to crash after

https://cgit.freedesktop.org/libreoffice/core/commit/?id=7a1b860ba5c5d422524b86245421453f35a5ff56

author	Caolán McNamara <caolanm@redhat.com>	2020-10-09 08:55:25 +0100
committer	Caolán McNamara <caolanm@redhat.com>	2020-10-09 11:26:28 +0200
commit 7a1b860ba5c5d422524b86245421453f35a5ff56 (patch)
tree 6b9603ffd516bd7c4fcd977416ab04413029e966
parent f62846d54ef9d4eb447cf405b74b6f47599d6d69 (diff)
cid#1467971 Uninitialized scalar field

Bisected with: bibisect-linux64-7.1

Adding Cc: to Caolán McNamara
Comment 2 Justin L 2021-02-25 16:25:23 UTC
A much better pointer would be the 7.1 commit that introduced the uninitialized variable.

https://git.libreoffice.org/core/commit/af4e5ee0f93c1ff442d08caed5c875f2b2c1fd43
tdf#97128 DOCX import: fix frame direction

CC'd Daniel
Comment 3 Xisco Faulí 2021-02-25 19:59:50 UTC
Hi Daniel, Gabor, NISZ Team,
Considering this is one of the most reported crashes in 7.1, I would like to revert it and backport the revert to libreoffice-7-1 until a better solution is found for bug 97128, which is not completely fixed anyway. Any objection if I revert it ?
Comment 4 Julien Nabet 2021-02-25 21:46:10 UTC
Created attachment 170064 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I got an assertion.
Comment 5 Dániel Arató (NISZ) 2021-02-26 07:55:45 UTC
(In reply to Xisco Faulí from comment #3)
> Hi Daniel, Gabor, NISZ Team,
> Considering this is one of the most reported crashes in 7.1, I would like to
> revert it and backport the revert to libreoffice-7-1 until a better solution
> is found for bug 97128, which is not completely fixed anyway. Any objection
> if I revert it ?

If Justin's suggestion doesn't work out, we should probably go ahead with the revert for now:
https://gerrit.libreoffice.org/c/core/+/103553/7/writerfilter/source/dmapper/DomainMapper_Impl.hxx#971
Comment 6 Dániel Arató (NISZ) 2021-02-26 08:32:36 UTC
Found a quick fix for the crash. I haven't had time to test it thoroughly, but it shouldn't affect the functionality.

https://gerrit.libreoffice.org/c/core/+/111594
Comment 7 Commit Notification 2021-03-01 14:33:43 UTC
Daniel Arato (NISZ) committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/027cc8c90badd4dd8a3436d859587c1b8732459f

tdf#140668 Crashfix: disregard w:textDirection tag outside frame

It will be available in 7.2.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 8 Commit Notification 2021-03-01 19:00:56 UTC
Daniel Arato (NISZ) committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/bbafee3424fdc59d2f69204fefab8a318aeec0e1

tdf#140668 Crashfix: disregard w:textDirection tag outside frame

It will be available in 7.1.2.

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 9 Xisco Faulí 2021-03-01 19:07:14 UTC
*** Bug 140363 has been marked as a duplicate of this bug. ***
Comment 10 Xisco Faulí 2021-03-04 13:15:58 UTC
I guess we can close this issue.

@Daniel, thanks for fixing this issue!
Comment 11 Xisco Faulí 2021-03-16 15:49:43 UTC
*** Bug 141067 has been marked as a duplicate of this bug. ***
Comment 12 Xisco Faulí 2021-03-31 08:13:18 UTC
*** Bug 141379 has been marked as a duplicate of this bug. ***