Created attachment 193279 [details] A sample DOCX with a huge floating table in a header In MS Word: 1. Create a new document; 2. Type 'foo', to make a non-empty body; 3. Add a header; 4. In the header, insert a table with 100 rows; 5. In that table's properties, set "Text wrapping"->"Around"; 6. Save as a DOCX. Try to open the DOCX in Writer. In v.4.4, this opened without a hang. Starting with v.5.0, it hangs.
Created attachment 193280 [details] A table cell with multiple paragraphs in a header Another infinite layout loop, possibly related. This one allows interaction with the document while looping, though.
Thank you for reporting the bug. When I try to open the sample DOCX with a huge floating table in the header, it doesn't open and freezes up, forcing me to end the process. I tried a new document with the steps to reproduce, and I seem to have no issues with opening it. Version: 24.2.1.2 (X86_64) / LibreOffice Community Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL threaded Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 6a064b1967e06e40be40817deff99d00c1a8554f CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win Locale: ko-KR (en_US); UI: en-US Calc: CL threaded
(In reply to wjsim from comment #2) > I tried a new document with the steps to reproduce, and I seem to have no issues > with opening it. That means that you missed a step - e.g., step 5 could be a suspect.
Hello Mike Kaganski, When I tried opening the sample DOCX file with a huge floating table in a header, I'm unable to open it in both the stable and master/daily build. Just like wsjim, I had to force quit both applications as they had stopped responding. I used the following two builds: Stable Build Version: 24.2.1.2 (AARCH64) / LibreOffice Community Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac CPU threads: 10; OS: macOS 14.1.2; UI render: Skia/Metal; VCL: osx Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded Master/Daily Build Version: 24.8.0.0.alpha0+ (AARCH64) / LibreOffice Community Build ID: c4023d3ec604abfff38be2053e2989c7ec2ba8c1 CPU threads: 10; OS: macOS 14.1.2; UI render: Skia/Metal; VCL: osx Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
(In reply to Haris from comment #4) Indeed; that is the issue here. The title of this bug is "A huge floating table in header makes Writer hang". it is intended to say that the program hangs (freezes). Obvious, isn't it?
Since both wjsim and I can both reproduce it, I'm setting this to 'NEW'.
Created attachment 193450 [details] Sample of LibreOffice after .docx finally loads and then hangs
With the following debug patch, I got attachment #193279 [details] to load. Then, a see a hang for 1 to 2 minutes if I click in an unselected cell (see sample in attachment #193450 [details]): diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 3e9ca93b3380..52d4093325ef 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -2298,7 +2298,9 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) -m_aCharRect.Width() : m_aCharRect.Height()); } - if( !bFirst && aOld == m_aCharRect ) + // In tdf#160346, the width and height in both rectangles are 1 but + // X is the same, and Y is different. Maybe a pattern? + if( !bFirst && ( aOld == m_aCharRect || ( m_aCharRect.Width() <= 1 && m_aCharRect.Height() <= 1 ) ) ) break; // if the layout says that we are after the 100th iteration still in
Concerning bibisect, it doesn't hang in latest of bibisect-50max, but hangs in oldest of bibisect-linux-64-5.2, needs to be bibisected on Windows.
I repro the hang or freakout with the example files in 7.0, but in master they no longer hang. Arch Linux 64-bit Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 31f87f369fdb40fc746d98443d75af2e9ce2452d 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 9 August 2024