Bug 145321 - Crash swlo!SwDrawTextInfo::GetSperren+1069 scrolling DOCX to bottom
Summary: Crash swlo!SwDrawTextInfo::GetSperren+1069 scrolling DOCX to bottom
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All All
: highest critical
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0 target:7.3.1 target:7.3.0
Keywords: bibisected, bisected, haveBacktrace, regression
: 145929 146749 (view as bug list)
Depends on:
Blocks: Crash
  Show dependency treegraph
 
Reported: 2021-10-26 13:09 UTC by Telesto
Modified: 2022-04-04 08:45 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (2.94 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-10-26 13:10 UTC, Telesto
Details
BT without symbols (13.33 KB, text/plain)
2021-10-26 13:10 UTC, Telesto
Details
gdb bt (13.19 KB, text/plain)
2021-10-26 18:28 UTC, Julien Nabet
Details
Valgrind trace (30.50 KB, text/x-log)
2021-10-31 12:25 UTC, Julien Nabet
Details
minimized reproducer (28.01 KB, application/vnd.oasis.opendocument.text)
2022-01-14 16:56 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-10-26 13:09:51 UTC
Description:
Crash swlo!SwDrawTextInfo::GetSperren+1069 scrolling DOCX to bottom

Steps to Reproduce:
1. Open the attached file (DOCX export of attachment 163472 [details] bug 135091)
2. Press page down until bottom -> Crash

Actual Results:
Crash

Expected Results:
No crash


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 93115d2c54d645bcf2f80fde325e3ede39dee4d5
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2021-10-26 13:10:10 UTC
Created attachment 175922 [details]
Example file
Comment 2 Telesto 2021-10-26 13:10:57 UTC
Created attachment 175923 [details]
BT without symbols
Comment 3 Telesto 2021-10-26 13:12:24 UTC
No crash with
Version: 7.0.0.0.beta1+ (x64)
Build ID: 2891e91a513520d68ea2b8c59c14335861a15253
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

Bug 135091 mentions a pre-existing assert..
Comment 4 Julien Nabet 2021-10-26 18:28:29 UTC
Created attachment 175939 [details]
gdb bt

On pc Debian x86-64 with master sources updated today, I got a crash.
Comment 5 Julien Nabet 2021-10-26 18:33:53 UTC
Extra info:
(gdb) p rInf.GetText()
$3 = ""
(gdb) p rInf.GetIdx()
$4 = {m_value = 0}
(gdb) p rInf.GetLen()
$5 = {m_value = 1}

Noel: noticing https://cgit.freedesktop.org/libreoffice/core/commit/?id=d4dc6b5cfdb02ad00a06ad32650948648abe010d
use std::vector for fetching DX array data
because I'm trying to track down a related heap corruption, and that is
much easier if the access to the array is checked by the std::vector
debug runtime

thought you might be interested in this one.

Perhaps this document with your patch revealed a bug?
Comment 6 Noel Grandin 2021-10-27 07:14:05 UTC
>Extra info:
>(gdb) p rInf.GetText()
>$3 = ""
>(gdb) p rInf.GetIdx()
>$4 = {m_value = 0}
>(gdb) p rInf.GetLen()
>$5 = {m_value = 1}

This means that rInf has become corrupt somehow because the length does not match the string.
Comment 7 Julien Nabet 2021-10-31 12:25:01 UTC
Created attachment 176037 [details]
Valgrind trace

Here's a Valgrind trace retrieved on pc Debian x86-64 with master sources updated today + gen rendering
Comment 8 Julien Nabet 2021-10-31 13:36:27 UTC
The whole mechanism involved here is too complicated for me.
I understand nothing about TextFrameIndex and layout features.
Can't help here => uncc myself
Comment 9 Kevin Suo 2021-10-31 14:58:11 UTC
Bibisected using bibisect-linux-64-7.3-CN repo, to the following range: 9a58ec3f6f65da27e3b26e1173b6661b743e66a4..426930d0c4bd6f782a04a92e8a36e92cd65e186f

426930d0c4bd (speedup dynamic_cast to SwTextFrame, 2021-08-28, Noel Grandin)
69e0567e118f (tdf#135683 speed up layout of large writer tables, 2021-08-28, Noel Grandin)
9ca9faabd400 (vcl: move TextLayoutCache to own module header, 2021-03-07, Chris Sherlock)
Comment 10 Xisco Faulí 2022-01-14 16:13:32 UTC
*** Bug 145929 has been marked as a duplicate of this bug. ***
Comment 11 Xisco Faulí 2022-01-14 16:27:54 UTC
(In reply to Kevin Suo from comment #9)
> Bibisected using bibisect-linux-64-7.3-CN repo, to the following range:
> 9a58ec3f6f65da27e3b26e1173b6661b743e66a4..
> 426930d0c4bd6f782a04a92e8a36e92cd65e186f
> 
> 426930d0c4bd (speedup dynamic_cast to SwTextFrame, 2021-08-28, Noel Grandin)
> 69e0567e118f (tdf#135683 speed up layout of large writer tables, 2021-08-28,
> Noel Grandin)
> 9ca9faabd400 (vcl: move TextLayoutCache to own module header, 2021-03-07,
> Chris Sherlock)

Actually it can be bisected with SAL_USE_VCLPLUGIN=gen

Regression introduced by:

author	Noel Grandin <noel.grandin@collabora.co.uk>	2021-09-02 20:05:09 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2021-09-04 08:17:06 +0200
commit d4dc6b5cfdb02ad00a06ad32650948648abe010d (patch)
tree 02446cd93e68aba9b78db6eb7fc902e782c6faf9
parent 86fa9c907387e96c9c93f1e17239730271fedbfd (diff)
use std::vector for fetching DX array data

Bisected with: bibisect-linux64-7.3

Adding Cc: to Noel Grandin
Comment 12 Xisco Faulí 2022-01-14 16:56:10 UTC
Created attachment 177549 [details]
minimized reproducer

Steps to reproduce:
1. Open minimized reproduced
2. Page down to the bottom
3. Page up to the top

-> Crash
Comment 13 Xisco Faulí 2022-01-14 17:03:21 UTC
*** Bug 146749 has been marked as a duplicate of this bug. ***
Comment 14 Telesto 2022-01-14 22:17:26 UTC Comment hidden (obsolete)
Comment 15 Commit Notification 2022-01-17 12:28:16 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0e4bcbb67dda204ba78f99df68a63458c29e7470

tdf#145321 Crash scrolling DOCX to bottom

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 16 Commit Notification 2022-01-17 16:09:00 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/68fa037b8f1300ffb950cc3ba4be4347f976eb83

tdf#145321 Crash scrolling DOCX to bottom

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 17 Commit Notification 2022-01-18 10:35:11 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-3-0":

https://git.libreoffice.org/core/commit/6ae00fc24786eac379e6e64ac3e6d83c6a057b24

tdf#145321 Crash scrolling DOCX to bottom

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.
Comment 18 Commit Notification 2022-01-18 12:48:46 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1103240cb3e884ea6024a690eeed743934662a12

tdf#145321: 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 19 BogdanB 2022-01-21 01:55:58 UTC
Verified.
No crash in
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