Bug 138026 - FILEOPEN Big table in DOCX cause writer hangs - regression
Summary: FILEOPEN Big table in DOCX cause writer hangs - regression
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:docx, haveBacktrace, perf, regression
Depends on:
Blocks: DOCX-Tables
  Show dependency treegraph
 
Reported: 2020-11-06 06:58 UTC by Andrew
Modified: 2024-10-14 14:19 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
File with multipage table (119.31 KB, application/wps-office.docx)
2020-11-06 06:58 UTC, Andrew
Details
Perf flamegraph of file opening (5.48 MB, image/svg+xml)
2024-10-10 08:02 UTC, Buovjaga
Details
A minimized sample (51.80 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-10-14 14:19 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew 2020-11-06 06:58:57 UTC
Created attachment 167048 [details]
File with multipage table

Some files cause writer to work extremely slowly.
Also this file cause LO 7 to hang.
In LO 6 this cause only to slowdown.
Comment 1 Roman Kuznetsov 2020-11-06 17:29:30 UTC
LO can't open the file and CPU has 100% loading, confirm in

Version: 7.1.0.0.alpha1+
Build ID: 7dc234fa57ca409d0db131c93abea738014b5e1f
CPU threads: 4; OS: Mac OS X 10.15.7; UI render: default; VCL: osx
Locale: ru-RU (ru_RU.UTF-8); UI: en-US
Calc: threaded

but LO opens the file in

Версия: 6.4.2.2
ID сборки: 4e471d8c02c9c90f512f7f9ead8875b57fcb1ec3
Потоков ЦП: 4; ОС: Mac OS X 10.15.7; Отрисовка ИП: GL; VCL: osx; 
Локаль: ru-RU (ru_RU.UTF-8); Язык интерфейса: ru-RU
Calc: threaded

and CPU still has 100% loading and you can't edit the file, when you try scroll the document then LO hangs anyway

the same in 5.4 version
Comment 2 Telesto 2020-11-06 19:55:08 UTC
No issue opening and scrollng the file with
Version: 5.2.5.0.0+
Build ID: a4d4fbeb623013f6377b30711ceedb38ea4b49f8
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:libreoffice-5-2, Time: 2016-12-24_14:43:55
Locale: nl-NL (nl_NL); Calc: group
Comment 3 Aron Budea 2020-11-06 22:04:24 UTC
Seems that this started with the following commit, bibisected using repo bibisect-linux-64-5.4. Adding CC: to Mike Kaganski.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=6f5024de2e1a5cc533527e45b33d9a415467c48d
author		Mike Kaganski <mike.kaganski@collabora.com>	2016-12-08 23:01:03 +0300
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2016-12-12 08:23:30 +0000

tdf#104425 sw: split rows w/large min height (fix layout loop)
Comment 4 Telesto 2020-11-06 22:10:52 UTC Comment hidden (obsolete)
Comment 5 Timur 2023-10-10 18:57:39 UTC
Hangs in 24.2.
Comment 6 Buovjaga 2024-10-09 20:28:25 UTC
The hang still happens at the UI stage. OOO_EXIT_POST_STARTUP=1 finishes after real    0m13,820s.

Arch Linux 64-bit
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 48db2edc9539d2d6d313cd225dadca6edc019559
CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 8 October 2024
Comment 7 Buovjaga 2024-10-10 08:02:10 UTC
Created attachment 196993 [details]
Perf flamegraph of file opening

I let it run for about 20 secs before canceling.

Arch Linux 64-bit
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5daac16a03c84f5908808be446c705e19445c150
CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 10 October 2024
Comment 8 Mike Kaganski 2024-10-14 14:19:10 UTC
Created attachment 197049 [details]
A minimized sample

This sample does not hang; however, it has in it the problematic piece, that results in the "Looping Louie" loop control triggered after 256 attempts (which happens very quickly here, unlike the original document, where it would take ~forever). The specific problem is: the paragraphs have "after paragraph spacing" making the cell not fit to the page, while when moving to the next page, and already having a follow, the same line is no more the last - and has no "after paragraph" spacing, thus fits. This oscillates, but I can't find a way to fix it yet.

I don't know if this is the single problem making the file hang; but fixing it is necessary to see if there are other problems.