Bug 165029 - LibreOffice is getting stuck while loading the .doc document
Summary: LibreOffice is getting stuck while loading the .doc document
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.0.3 release
Hardware: All All
: high critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOC-Floatingtable
  Show dependency treegraph
 
Reported: 2025-02-04 03:17 UTC by shoryagupta1997
Modified: 2025-06-30 06:06 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
it is .doc file which I am not able to load in libre (297.00 KB, application/msword)
2025-02-04 03:19 UTC, shoryagupta1997
Details

Note You need to log in before you can comment on or make changes to this bug.
Description shoryagupta1997 2025-02-04 03:17:27 UTC
Description:
while loading a particular .doc document libreoffice gets stuck and soon goes in unresponsive statae.

Steps to Reproduce:
1.Simply load the document in libre which I am attaching.
2.
3.

Actual Results:
Libreoffice gets stuck and no further action can be performed.

Expected Results:
Ideally, libre should allow document to load and perform action.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 24.8.4.2 (X86_64) / LibreOffice Community
Build ID: bb3cfa12c7b1bf994ecc5649a80400d06cd71002
CPU threads: 16; OS: macOS 14.2.1; UI render: Skia/Raster; VCL: osx
Locale: en-IN (en_IN.UTF-8); UI: en-US
Calc: threaded
Comment 1 shoryagupta1997 2025-02-04 03:19:41 UTC
Created attachment 198952 [details]
it is .doc file which I am not able to load in libre
Comment 2 raal 2025-02-04 22:43:51 UTC
Confirm with Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7cd00ca413da8d29f54749c04493e85937a2fa38
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

Works in Version: 5.3.0.0.alpha1+
Comment 3 raal 2025-02-04 22:52:50 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-7.6.
Adding Cc: to Miklos Vajna ; Could you possibly take a look at this one?
Thanks
 7873f8e821926fbac45165d07f0280dad19cfef3 is the first bad commit
commit 7873f8e821926fbac45165d07f0280dad19cfef3
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Sat Oct 28 15:02:51 2023 +0200

    source 61be351ac83acec75788d2f79a9038486163160f

150597: sw floattable: import floating tables from DOC as split flys by default | https://gerrit.libreoffice.org/c/core/+/150597
Comment 4 Miklos Vajna 2025-02-05 12:43:28 UTC
By now I think there are some 5 sw floattable bugs like this in the bugzilla. Unfortunately these are far from trivial to fix. I hope to find time to progress with them in the not too distant future.
Comment 5 Oscar65 2025-06-18 18:52:43 UTC
I found a clue: if I comment out the content of the Entry constructor in sw/source/filter/ww8/ww8scan.cxx and change it to:

WW8PLCFx_Fc_FKP::WW8Fkp::Entry::Entry(const Entry &rEntry) 
: mnFC(rEntry.mnFC), mnLen(rEntry.mnLen), mnIStd(rEntry.mnIStd), 
  mbMustDelete(rEntry.mbMustDelete)
{ 
  /*if (mbMustDelete) 
  { 
    mpData = new sal_uInt8[mnLen]; 
    memcpy(mpData, rEntry.mpData, mnLen); 
  } 
  else 
    mpData = rEntry.mpData;*/ 

  mpData = new sal_uInt8[mnLen];
}

The document loads with an empty 2x1 table on page 10 (which is the one causing problems creating and deleting page 11 over and over again), a table that doesn't exist in the document uploaded to O365 online. If I change the mpData content with memset to zeros or ones, the Anti-Semitism paragraph format is the same as the title, and there's no longer a table. The document doesn't seem to be wrong because O365 online loads it correctly without any errors. It must be something to do with the formatting of that paragraph.

Aside from the fact that the document has a different format in Libre Office (67 pages in O365 online versus 49 pages in Libre Office), they seem to have the same text (O365 online won't let me get statistics).