Bug 147305 - FILEOPEN DOCX: Footnote with two character custom marker imported incorrectly
Summary: FILEOPEN DOCX: Footnote with two character custom marker imported incorrectly
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-Footnote-Endnote
  Show dependency treegraph
 
Reported: 2022-02-09 09:26 UTC by Aleksei Nikiforov
Modified: 2023-04-04 06:49 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
issue.docx (422.41 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-02-09 09:26 UTC, Aleksei Nikiforov
Details
Minimized example file from Word 2013 (24.53 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-02-16 23:41 UTC, Gabor Kelemen (allotropia)
Details
Footnote settings in Word and endless loop in LO (134.91 KB, image/png)
2022-02-16 23:47 UTC, Gabor Kelemen (allotropia)
Details
The footnotes custom mark is **), (54.53 KB, image/png)
2022-02-17 00:05 UTC, Gabor Kelemen (allotropia)
Details
The example file in Word 2016 and Writer (176.51 KB, image/png)
2023-04-04 06:46 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksei Nikiforov 2022-02-09 09:26:57 UTC
Created attachment 178161 [details]
issue.docx

When opening specific docx file, libreoffice freezes and consumes all of available memory (16Gb). I assume that it eventually might finish opening and displaying file if more resources is available.

Attaching file causing issues.

Steps for reproduction.
1. Run libreoffice
2. Open attached file

Actual result:
Libreoffice hangs and consumes more and more memory, never finishing loading file for me.

Expected result:
Libreoffice should open, display and responsively process/update document.


Reproduces in (downstream build):
Version: 7.3.0.3 / LibreOffice Community
Build ID: 30(Build:3)
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (C); UI: en-US
Calc: threaded

Also reproduces in (official build RPM):
Version: 7.3.0.3 / LibreOffice Community
Build ID: 0f246aa12d0eee4a0f7adcefbf7c878fc2238db3
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: x11
Locale: ru-RU (ru_RU.UTF-8); UI: en-US
Calc: threaded
Comment 1 Telesto 2022-02-09 10:49:50 UTC
Repro
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: ca657b98e49eb2282775f7919827062a7a0b4bfe
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 2 Telesto 2022-02-09 10:56:08 UTC
Also in
6.1

and in
Versie: 4.4.7.2 
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL

and in
4.1
Comment 3 Telesto 2022-02-09 11:01:16 UTC
also in
3.3.0.4
Comment 4 Telesto 2022-02-15 04:10:46 UTC
@Xisco
I'm stuck how to prioritize this. In old win x32 builds this would eventually crash, because of memory of the limit (sane solution). Consuming all resources today is pretty bad, it freezes the whole system.

There are not many cases of this happening (as far I know) an i have no clue why the document here causing this problem to appear.. but even if this is a broken bug doc, it should not consume all the system memory available
Comment 5 Gabor Kelemen (allotropia) 2022-02-16 23:41:28 UTC
Created attachment 178321 [details]
Minimized example file from Word 2013

Looks like this footnote causes the trouble, also all the way back to 3.5.

Removing this from the original document in Word does not reproduce the endless loop.
Comment 6 Gabor Kelemen (allotropia) 2022-02-16 23:47:38 UTC
Created attachment 178322 [details]
Footnote settings in Word and endless loop in LO

This looks to have an interesting setup: 
- in the document looks like it has a Custom mark of ** 
- but the Footnote and Endnote dialog has that field empty and considers it as a plainly numbered footnote.
Comment 7 Gabor Kelemen (allotropia) 2022-02-17 00:05:15 UTC
Created attachment 178323 [details]
The footnotes custom mark is **),
Comment 8 Xisco Faulí 2022-02-17 09:06:00 UTC
(In reply to Telesto from comment #4)
> @Xisco
> I'm stuck how to prioritize this. In old win x32 builds this would
> eventually crash, because of memory of the limit (sane solution). Consuming
> all resources today is pretty bad, it freezes the whole system.
> 
> There are not many cases of this happening (as far I know) an i have no clue
> why the document here causing this problem to appear.. but even if this is a
> broken bug doc, it should not consume all the system memory available

Inherit from OOo times, I think it should not be high/major unless this has some duplicates
Comment 9 Telesto 2022-02-17 15:17:27 UTC
(In reply to Xisco Faulí from comment #8)
> Inherit from OOo times, I think it should not be high/major unless this has
> some duplicates

Totally freezing the OS by using all resources (available memory) isn't something I comfortable with. I would be already happy with fail save/ temporary hack to prevent all the system resources being used on a "simple document"

There are couple more page looping DOCX files (maybe the same issue?)
Comment 10 Gabor Kelemen (allotropia) 2023-04-04 06:46:34 UTC
Created attachment 186463 [details]
The example file in Word 2016 and Writer

This no longer loops in master since:

https://git.libreoffice.org/core/+/13d30067370353ae5a43c2f2cbd69bb824363815

author	Mike Kaganski <mike.kaganski@collabora.com>	Wed Jan 11 17:02:04 2023 +0300
committer	Mike Kaganski <mike.kaganski@collabora.com>	Thu Jan 12 04:34:27 2023 +0000

tdf#152425 Synchronize import and export style names mapping

However the footnote is still a mess. Let's focus on that.