Bug 105638 - Fileopen: 165 pages DOC with simple table non responsive (column with merged cells and images)
Summary: Fileopen: 165 pages DOC with simple table non responsive (column with merged ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:doc
Depends on:
Blocks: Anchor-and-Text-Wrap DOC-Tables Writer-Table-Layouting
  Show dependency treegraph
 
Reported: 2017-01-31 12:58 UTC by Timur
Modified: 2023-05-22 00:51 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
Test DOC (1.58 MB, application/vnd.ms-word)
2017-01-31 13:02 UTC, Timur
Details
Test DOC saved from MSO (897.80 KB, application/pdf)
2017-02-21 11:47 UTC, Timur
Details
Strange behavior (33.15 KB, application/xml)
2017-02-27 11:27 UTC, Vitaliy
Details
Test DOC - WinDbg from procdump (10.06 KB, text/plain)
2017-02-27 13:12 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2017-01-31 12:58:54 UTC
Description:
Fileopen: 165 pages DOC with simple table non responsive

Steps to Reproduce:
Open and scroll to end.

Actual Results:  
LO non responsive, up to 5.4+ master.

Expected Results:
LO opens file. 


Reproducible: Always

User Profile Reset: 

Additional Info:
Looks like it worked before. I mark as 4.3 but it would be great to bibisect this. 


User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
Comment 1 Timur 2017-01-31 13:02:02 UTC
Created attachment 130791 [details]
Test DOC

WinDBG doesn't catch the exception. Procdump makes dump.
Comment 2 Xisco Faulí 2017-01-31 17:54:20 UTC
Reproduced in

Version: 5.4.0.0.alpha0+
Build ID: fc53cce64400430cdc21f79c959d75fb9a26d13d
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

I tried to bisect it and it pointed me to 849c3d59f9838516b5e0d56a2630928629384ad3 but reverting the commit didn't fix the problem...
Comment 3 Terrence Enger 2017-02-13 19:29:07 UTC
In a local build of commit 9ba5eb22, pulled on 2017-02-03, after CPU
usage 58 minutes, I see the program looping in the outermost call of
SwTabFrame::MakeAll, in the loop starting at
sw/source/core/layout/tabfrm.cxx line 1874 ...

    while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )

Some iterations take about 0.01 CPU seconds, and some about 10 CPU seconds.
Comment 4 Terrence Enger 2017-02-20 18:20:25 UTC
I used bibisect-43all version oldest to open the attached .ods and
poke around and to create a file that daily Linux dbgutil version
2017-02-05 can open successfully.

A couple of observations ...

(*) When I open the file, the status bar shows 140 pages, 25 pages
    less than what Timur reports.

(*) If I delete column 4 of the spreadsheet, then the recent LO opens
    the resulting file without problem.

(*) In column 4 of the spreadsheet, one merged cell spans from page 15
    to page 86.
Comment 5 Timur 2017-02-21 11:47:29 UTC
Created attachment 131381 [details]
Test DOC saved from MSO
Comment 6 Vitaliy 2017-02-27 11:27:07 UTC
Created attachment 131506 [details]
Strange behavior

It happens when "allow row to break across pages and columns" table property is disabled.
While opening the .doc format the property was enabled by default in oldest versions. So bisect can not help us.

---

If I remove all shape lines from table cells in the document then it opens successfully but slowly (There are lags from cells that are having their content height more than page height. Overflowing height is a consequence of the table property).

---

This happens when a table have merged cells in a column which split between pages

---

Strange behavior at splitting.

Current way:
1) Open the attachment
2) Put a new line in last column and write something
You are on page 4
3) Remove the line and put again
You are on page 3
4) Repeat
You are on page 2
5) Repeat
You are on page 2
..
6) Remove all lines in last column and put some new lines
You are on page 4
..

Right way:
2) Put a new line in last column and write something
You are on page 2
3) Put many lines
You are on page 3
..
Comment 7 Vitaliy 2017-02-27 11:39:51 UTC
oh.. another one strange thing.

Open the attachment 131506 [details]

Put new lines in R2C2 cell. Is shows R3xx fluctuations in splitting.
Comment 8 Timur 2017-02-27 13:12:26 UTC
Created attachment 131508 [details]
Test DOC - WinDbg from procdump

vcllo!WinSalGraphics::ImplDoSetFont+14d
Comment 9 Timur 2017-04-28 17:27:26 UTC Comment hidden (obsolete)
Comment 10 Xisco Faulí 2017-05-04 08:56:16 UTC Comment hidden (obsolete)
Comment 11 Caolán McNamara 2017-11-14 14:02:33 UTC
I don't see evidence that this is really a regression, i.e. a version of libreoffice that opens this as a table and when the "don't split row property" is set then behaves without the slowness, so I'll clear regression of bibisectrequest and checking older OpenOffice.org I see the same problem once the row split thing is unset so its an inherited problem as far as I can see.

Realistically problem only mstahl or vmlikos has a clue about the table splitting layout code
Comment 12 Miklos Vajna 2017-11-14 14:58:21 UTC
I'll try to take a look, but I can't promise it. SwTabFrame code is complex enough that usually any change where the consequences are understood are taking days.
Comment 13 Timur 2018-07-19 10:28:36 UTC Comment hidden (obsolete)
Comment 14 qscesz84563 2018-11-29 08:14:36 UTC
Still exists in version
Version: 6.3.0.0.alpha0+ (x64)
Build ID: 0f25a3c36f27fd51453b9a9115f236b83c143684
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-27_20:06:55
Locale: zh-TW (zh_TW); UI-Language: en-US
Calc: threaded
Comment 15 QA Administrators 2019-11-30 03:39:42 UTC Comment hidden (obsolete)
Comment 16 Timur 2019-12-09 18:22:37 UTC Comment hidden (obsolete)
Comment 17 Telesto 2020-05-26 20:34:59 UTC
The document is filled with images anchored to character.. 
Copy/paste doc from Word to LibreOffice, or open the file with navigator open)

So probably a layout loop caused by to character anchoring. And the multiple page split table isn't helpful either.
Comment 18 Timur 2022-03-24 13:02:22 UTC
Repro 7.4+. I see "1 of 31 pages" and hang. DOCX also hangs, differently.
As for images, fileopen hang not reproduced if images from DOC or DOCX deleted in MSO (only after more scroll).
Comment 19 Gabor Kelemen (allotropia) 2023-05-22 00:51:43 UTC
I see no more looping in 7.5 after

https://git.libreoffice.org/core/+/18f259482782a3b3c44e01ca6ea0e98fe00973a0

author	Miklos Vajna <vmiklos@collabora.com>	Fri Dec 09 16:52:48 2022 +0100
committer	Xisco Fauli <xiscofauli@libreoffice.org>	Wed Dec 14 08:48:32 2022 +0000

sw layout: invalidate margins of body content when moving a fly from page

This appears to be a regression from commit b9ef71476fd70bc13f50ebe80390e0730d1b7afb (tdf#134298 sw: layout: remove
left-over page frame without content, 2020-11-13).