Bug 163267 - Attempting to convert a specific DOCX file to PDF runs until memory exhaustion
Summary: Attempting to convert a specific DOCX file to PDF runs until memory exhaustion
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.7.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: Commandline
  Show dependency treegraph
 
Reported: 2024-10-03 04:38 UTC by sykostrobs
Modified: 2024-10-04 01:06 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
FIle which causes memory exhaustion (21.00 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-10-03 04:39 UTC, sykostrobs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sykostrobs 2024-10-03 04:38:53 UTC
Description:
A table containing a small image is causing excessive memory consumption during a DOCX to PDF conversion, exhausting all available system memory.

Although I am unsure of the exact cause, I was able to reproduce the issue by copying and pasting the table and image from the original document into a new one (using MS Word). This new document also exhibits the same memory exhaustion during conversion.

When I attempt to recreate the scenario in a new document by making a new table and inserting an image, the issue does not occur. Since I'm not the original author of the document, I am unaware of the specific steps/table settings.

if the table is expanded to cover about a quarter of the page, the document converts to PDF within seconds without any problems. But when the table’s border is reduced to a size smaller than the image, memory consumption surges again, leading to the exhaustion issue.

have attached the offending document

Steps to Reproduce:
1.libreoffice --headless --convert-to pdf test.docx --outdir .


Actual Results:
libreoffice runs until over 25gig of memory is being used and OOM starts killing things

Expected Results:
PDF is generated within seconds


Reproducible: Always


User Profile Reset: Yes

Additional Info:
libreoffice --version
LibreOffice 7.6.7.2 60(Build:2)
Comment 1 sykostrobs 2024-10-03 04:39:46 UTC
Created attachment 196861 [details]
FIle which causes memory exhaustion
Comment 2 Bogaboga Man 2024-10-03 13:03:55 UTC
Even worse! I am unable to open the file without a system hang or display of weird error that I am unable to paste here.

System:

Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: en-CA (en_CA); UI: en-GB
Calc: CL threaded
Comment 3 V Stuart Foote 2024-10-03 14:36:58 UTC
Also unable to open this OOXML into Writer 24.8.2.1 on Win10 (19045), memory use balloons.

OnlyOffice 8.1.1.27 (x64 msi) opens the docx cleanly, so it is not fully corrupt.


Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 8; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded