Bug 139638 - Crash when updating Table of Contents in the attached ODT file
Summary: Crash when updating Table of Contents in the attached ODT file
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.1 rc
Hardware: All Linux (All)
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:7.4.0 target:7.3.0
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2021-01-15 12:10 UTC by Kevin Suo
Modified: 2022-01-26 18:45 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Test ODT file (13.94 KB, application/vnd.oasis.opendocument.text)
2021-01-15 12:10 UTC, Kevin Suo
Details
gdbtrace.log (30.66 KB, text/x-log)
2021-01-15 12:11 UTC, Kevin Suo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Suo 2021-01-15 12:10:14 UTC
Created attachment 168906 [details]
Test ODT file

The attached ODT file contains Table of Contents on the 2nd page. (It was saved as ODT from a DOC file). When trying to refresh the index, Writer crashes.

Steps to Reproduce:
1. Open the attached ODT file.
2. Goto the 2nd page, right-click, then do "Refresh Index".

-> Crash.
Comment 1 Kevin Suo 2021-01-15 12:11:25 UTC
Created attachment 168907 [details]
gdbtrace.log

Backtrace with debug symbols.
Comment 2 Kevin Suo 2021-01-15 12:24:55 UTC
Version: 7.1.0.1.0+
Build ID: a88dbaf6a9076b546300f3c640ac38c5209a1ce2
CPU threads: 4; OS: Linux 5.9; UI render: default; VCL: gtk3
Locale: zh-CN (zh_CN.UTF-8); UI: zh-CN
Calc: threaded
Comment 3 MM 2021-01-15 22:22:52 UTC
Confirmed on mint 20 x64 with Version: 7.2.0.0.alpha0+
Build ID: f2171af6ce3516598d9f8bac8294025a21a5b1a2
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-01-08_00:26:19
Calc: threaded


Unconfirmed with Version: 7.1.0.0.alpha0+
Build ID: 6a9e01ed889e92772e32ad5255fc60bd6dd7ee2a
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2020-09-01_22:46:39
Calc: threaded


https://crashreport.libreoffice.org/stats/crash_details/757ae57e-0a37-4752-841b-318e3e20e822
Comment 4 Kevin Suo 2021-01-16 06:21:32 UTC
$ git bisect log
# bad: [beeffda981611cb1468bdf29471949999ac96f09] 2020-11-28 00:27:39 +0100 32fdb8eb3506bc8dcf013cc713fe8e5debceb940
# good: [87c314f049c4333cfac651d5315b758f022c900b] 2020-05-27 13:56:28 +0200 574c57090642347980d2395e1e183cc7b5c171ad
git bisect start 'master' 'oldest'
# good: [f53522b8dd99a9ed6d6b16c5e3ef5f2327de047e] 2020-09-02 14:49:32 +0200 ea24f25d6e471197d93de32f9f5c18d7078dac71
git bisect good f53522b8dd99a9ed6d6b16c5e3ef5f2327de047e
# good: [bd4196299011026f0ec3495e5ae73b4f417844b4] 2020-10-16 09:55:31 +0200 40d74f2def9e2255f2a7b85b3c30f76d0a0bd44e
git bisect good bd4196299011026f0ec3495e5ae73b4f417844b4
# good: [9256320524facc7c69fd8dc0af8cb6f25e63b9ee] 2020-11-09 09:38:04 +0100 78e0da267774a35f4abfef52f0ce74b1972128a4
git bisect good 9256320524facc7c69fd8dc0af8cb6f25e63b9ee
# good: [97036d8e2e74019e0e3dac4f07cc41cce9f594c0] 2020-11-19 01:37:50 +0100 693f12ad57912c2356a197d9a794e6108ce79ef2
git bisect good 97036d8e2e74019e0e3dac4f07cc41cce9f594c0
# bad: [fbf4d5cc7808d98a52a8d4478da0aa8c4f50ba7f] 2020-11-23 08:59:35 +0100 5fc6a601d7a1978db291fd0f7dcec638a7c25651
git bisect bad fbf4d5cc7808d98a52a8d4478da0aa8c4f50ba7f
# bad: [365702243f77ed5254fdecd682e7924c4ade4076] 2020-11-20 14:52:38 +0100 07f0e515c055847689121249c29c6baaa35d35e4
git bisect bad 365702243f77ed5254fdecd682e7924c4ade4076
# bad: [89176a6cccea4e3837e78aa88f1234b06072cb01] 2020-11-19 18:10:44 +0100 411063bc99f7339afae2c2a25a146c7c5efeb2da
git bisect bad 89176a6cccea4e3837e78aa88f1234b06072cb01
# good: [7577c45cabe28563754e4125b1c6bff188898148] 2020-11-19 11:48:21 +0100 1925058670102570c11b28440ca6a8c3ada87595
git bisect good 7577c45cabe28563754e4125b1c6bff188898148
# good: [c2731a0fa5bfe02b01216a09b3e978d80fd66d17] 2020-11-19 14:20:59 +0100 c74a2fd835474caf311be10703c985e2f916a83b
git bisect good c2731a0fa5bfe02b01216a09b3e978d80fd66d17
# bad: [8292fe7859580084f8e1d80f8009e1fe817c9e76] 2020-11-19 16:14:36 +0100 52f1115571469f210192cbce6b52e8b7d1d85dc0
git bisect bad 8292fe7859580084f8e1d80f8009e1fe817c9e76
# bad: [d65cd2447af89e6c45c4f7ad2adade297a4af8b0] 2020-11-19 14:46:26 +0100 672ddcb7d7a496f4a4f761b32aceaa72e4f600ed
git bisect bad d65cd2447af89e6c45c4f7ad2adade297a4af8b0

# first bad commit:
2020-11-19 14:46:26 +0100 672ddcb7d7a496f4a4f761b32aceaa72e4f600ed

# last good commit:
2020-11-19 14:20:59 +0100 c74a2fd835474caf311be10703c985e2f916a83b

Thus it is broken in the following range: c74a2fd835474caf311be10703c985e2f916a83b..672ddcb7d7a496f4a4f761b32aceaa72e4f600ed
 672ddcb7d7a496f4a4f761b32aceaa72e4f600ed tdf#123936 Formatting files in module soltools with clang-format 14fb7d2cce5c41bacf7c6b571aa946c766205bc3 Add .sfd format documentation link

And 672ddcb7d7a496f4a4f761b32aceaa72e4f600ed is the only one which is related to code (the other one is just a README modification).

author: Philipp Hofer <philipp.hofer@protonmail.com>	2020-11-12 13:16:52 +0100
committer: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>	2020-11-19 14:46:26 +0100
commit 672ddcb7d7a496f4a4f761b32aceaa72e4f600ed (patch)
tdf#123936 Formatting files in module soltools with clang-format 

Adding cc Philipp Hofer: would you please take a look?
Comment 5 Kevin Suo 2021-01-16 09:15:32 UTC
I am removing the "bisect" keyword because reverting commit 672ddcb7d7a496f4a4f761b32aceaa72e4f600ed still crashes. However, the bibisect is correct (I did it two times and get the same result). 

Not sure that "easy hack" can cause this crash. Adding cc Christian Lohmaier, the reviewer of that commit. Would you please also take a look?
Comment 6 Justin L 2021-01-18 09:58:09 UTC
I get different results using bibisect-linux-64-7.1:
author	Michael Stahl on 2020-11-19 14:21:10 +0100
commit c0864f26f3143ea81c65d3826fae32a8fd54c531
sw_fieldmarkhide: init fieldmark mode from options

However, reverting this (nor the whole series of four-in-a-row related commits) did not fix the problem either.
Comment 7 Kevin Suo 2021-01-28 15:08:52 UTC
Adding cc Michael Stahl per bibisect result in comment 5, would you please take a look? Thanks.
Comment 8 Xisco Faulí 2021-03-02 12:04:33 UTC
The commit has been reverted in
https://cgit.freedesktop.org/libreoffice/core/commit/?id=70dd95aabd11b2146e2556c1da87da4a22d6f7b5
Closing as RESOLVED FIXED
Comment 9 Xisco Faulí 2022-01-19 13:09:10 UTC
(In reply to Xisco Faulí from comment #8)
> The commit has been reverted in
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=70dd95aabd11b2146e2556c1da87da4a22d6f7b5
> Closing as RESOLVED FIXED

For the record, the commit was re-reverted in https://cgit.freedesktop.org/libreoffice/core/commit/?id=657de5fba12b0e9afcdee361654d2a2d0dbd7311 so the crash is happening again ( also in 7.3 ). Michael is working on it though: https://gerrit.libreoffice.org/c/core/+/128605
Comment 10 Commit Notification 2022-01-19 15:06:15 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#139638 sw_fieldmarkhide: hide fieldmark command in ModelToViewHelper

It will be available in 7.4.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 11 Michael Stahl (allotropia) 2022-01-19 15:07:45 UTC
fixed on master
Comment 12 Commit Notification 2022-01-19 16:57:50 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/89790beaf8464d890bcb000ee0c784b86732c355

tdf#139638: sw_uiwriter3: Add unittest

It will be available in 7.4.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 13 Commit Notification 2022-01-19 19:20:35 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

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

tdf#139638 sw_fieldmarkhide: hide fieldmark command in ModelToViewHelper

It will be available in 7.3.1.

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 14 BogdanB 2022-01-21 01:30:43 UTC
Verified. No crash
Version: 7.3.1.0.0+ / LibreOffice Community
Build ID: 216ad305810d1d36cf5874fd9842111d426899a8
CPU threads: 4; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 15 Commit Notification 2022-01-26 13:38:46 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-3-0":

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

tdf#139638 sw_fieldmarkhide: hide fieldmark command in ModelToViewHelper

It will be available in 7.3.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.