Bug 104347 - FILEOPEN DOCX: Writer hangs on opening 3-page Russian math
Summary: FILEOPEN DOCX: Writer hangs on opening 3-page Russian math
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: bibisected, bisected, filter:docx, haveBacktrace, implementationError, perf
: 129274 (view as bug list)
Depends on:
Blocks: DOCX-Opening
  Show dependency treegraph
Reported: 2016-12-02 10:51 UTC by Telesto
Modified: 2023-01-13 09:53 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:

a backtrace (12.81 KB, text/plain)
2016-12-11 11:39 UTC, fiftyigfuci_f_mi
Flamegraph (193.87 KB, application/x-bzip)
2019-12-09 20:15 UTC, Julien Nabet

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2016-12-02 10:51:21 UTC
Writer hangs on opening file with images

Steps to Reproduce:
1.Try to open attachment 123770 [details]

Actual Results:  
File won't open

Expected Results:
File should be opening

Reproducible: Always

User Profile Reset: No

Additional Info:
Found in:
Build ID: 4130c8def811d1dcc87eacaa8ae48ba02738a790
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-11-29_01:03:18
Locale: nl-NL (nl_NL); Calc: CL

but not with:
Build ID: e8938fd3328e95dcf59dd64e7facd2c7d67c704d
Locale: nl_NL

User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Comment 1 MM 2016-12-02 12:29:28 UTC
Unconfirmed with v5.1.6.2 under ubuntu 16.04 x64.
Confirmed with v5.2.3.3 under ubuntu 16.04 x64.
Comment 2 raal 2016-12-02 20:55:07 UTC
This seems to have begun at the below commit.
Adding Cc: to Miklos Vajna  ; Could you possibly take a look at this one?

author	Miklos Vajna <vmiklos@collabora.co.uk>	2016-08-30 07:14:47 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2016-08-30 08:40:30 (GMT)
commit 1d1748d143ab4270a2ca1b5117852b1b1bb4c526 (patch)
tree ed1939265de131d1338d2d26657459a0aa2825e6
parent 11cc9bdc21be241f2feb3ab4822d9d365dba4f96 (diff)
Related: tdf#44986 DOCX import: handle w:gridAfter by faking cells
This is similar to the w:gridBefore handling code introduced in commit cf33af732ed0d3d553bb74636e3b14c55d44c153 (handle w:gridBefore by faking
cells (fdo#38414), 2014-04-23), except that the fake cells here are
inserted after the real ones, not before.

git bisect log
# bad: [b356e15c1f14e3d0f0bb73662c878d14fc8aa992] source ada8a2123ea655142be74a11c23e042a0109d5f8
# good: [33e60eae04c889baf52713a73dc9944015408914] source 5b168b3fa568e48e795234dc5fa454bf24c9805e
git bisect start 'origin/master' 'oldest'
# good: [78a4f08cf26d3f800710c509a99b1f4ad8a4e783] source db231633af4667e24281e0be69ab63ad3081fdc3
git bisect good 78a4f08cf26d3f800710c509a99b1f4ad8a4e783
# bad: [d9f68fca812338acc473efb5053add57fbdf6415] source 8fab6ab36589d0dcd75d45feab43a0b06b7f2a3e
git bisect bad d9f68fca812338acc473efb5053add57fbdf6415
# bad: [cc14d57c7f7f123988eda3cbd4820d0013eed067] source b9a27d5856f60688456762bfcc29c38670009254
git bisect bad cc14d57c7f7f123988eda3cbd4820d0013eed067
# bad: [58c47191626fd44f4ac98958a0491977a35a2e30] source ac192a7ef116e6453fee7872b558ff957e377c50
git bisect bad 58c47191626fd44f4ac98958a0491977a35a2e30
# good: [502f7d755ae04e716c9a8865bef7597cc3a371c1] source 2c10714426cc813c36aa82e4870b7b51c5c03050
git bisect good 502f7d755ae04e716c9a8865bef7597cc3a371c1
# bad: [f9c5345bff70e39098182c14b52eb48a76d1cce0] source 2b8b8740f211a649a358fbe2406cae12e9621a77
git bisect bad f9c5345bff70e39098182c14b52eb48a76d1cce0
# good: [9d21f5bba803f7bbf5953897919d70b79fdd4d0f] source 11cc9bdc21be241f2feb3ab4822d9d365dba4f96
git bisect good 9d21f5bba803f7bbf5953897919d70b79fdd4d0f
# bad: [c2373d2378af072d842d3a7e3f96159ad46a1fcb] source d488a646b5a703aef34396041c997902dcbbf98d
git bisect bad c2373d2378af072d842d3a7e3f96159ad46a1fcb
# bad: [df60cde7659c7a40fbfaa7bb45cbe912316b0cff] source 6f821ca4a1c07e79d8cdbfd84c08445ae4c5186a
git bisect bad df60cde7659c7a40fbfaa7bb45cbe912316b0cff
# bad: [23c8a6d7b1603dfd0bece15f76e179dd337e34e7] source fa15256e3d12aab1eaf5991c016fc10dea286675
git bisect bad 23c8a6d7b1603dfd0bece15f76e179dd337e34e7
# bad: [dc16d5ae9fb73c228373deae263bd60ecaca3712] source 5758f8a7f8e2e9819ef09f4e1fe38921b247dc65
git bisect bad dc16d5ae9fb73c228373deae263bd60ecaca3712
# bad: [cad46d56058194701502c83cd550c5d6ad9bbb20] source 9accbfa0a52433cf03fe186fc69334d387981eb9
git bisect bad cad46d56058194701502c83cd550c5d6ad9bbb20
# bad: [73c8b8ef61dc6bfb884ae43f013b509afeda9190] source 1d1748d143ab4270a2ca1b5117852b1b1bb4c526
git bisect bad 73c8b8ef61dc6bfb884ae43f013b509afeda9190
# first bad commit: [73c8b8ef61dc6bfb884ae43f013b509afeda9190] source 1d1748d143ab4270a2ca1b5117852b1b1bb4c526
Comment 3 fiftyigfuci_f_mi 2016-12-11 11:39:35 UTC
Created attachment 129487 [details]
a backtrace

I confirmed on my debug dev build:
Build ID: f35d29c8388744be1f95ec4acfca12eec706911a
CPU Threads: 2; OS Version: Linux 4.9; UI Render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 4 Xisco Faulí 2017-11-14 14:45:39 UTC
attachment 123770 [details] from bug 98823 is also affected by the same commit.
Comment 5 QA Administrators 2018-11-15 03:43:04 UTC Comment hidden (obsolete)
Comment 6 Roman Kuznetsov 2018-11-15 06:40:02 UTC Comment hidden (obsolete)
Comment 7 Miklos Vajna 2018-11-20 16:14:26 UTC
I've just checked in gdb what is backtrace of the hang, and this is a layout loop. So the above commit just uncovered an existing layout problem: you could construct an ODF file which creates the same document model and same hang even before my commit.

Sure, this is a bug, and it's a good thing to fix it, but this is more an implementation error than a regression.
Comment 8 Timur 2019-12-09 11:36:53 UTC
*** Bug 129274 has been marked as a duplicate of this bug. ***
Comment 9 Xisco Faulí 2019-12-09 12:31:40 UTC Comment hidden (obsolete)
Comment 10 Julien Nabet 2019-12-09 13:05:07 UTC Comment hidden (obsolete)
Comment 11 Julien Nabet 2019-12-09 20:15:53 UTC
Created attachment 156439 [details]

Here's a Flamegraph retrieved on pc Debian x86-64 with master sources updated today.
Comment 12 Xisco Faulí 2019-12-10 12:06:08 UTC Comment hidden (obsolete)
Comment 13 Xisco Faulí 2020-03-24 16:41:16 UTC Comment hidden (obsolete)
Comment 14 Xisco Faulí 2021-02-15 09:51:44 UTC
Still reproducible in

Version: / LibreOffice Community
Build ID: cbcec4425e04e3614a2025b49fdc221216ac51d3
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 15 Roman Kuznetsov 2022-05-25 09:41:31 UTC
still repro in

Version: (x64) / LibreOffice Community
Build ID: b6266207b55a7633dc82b02142215757512adfb7
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded
Comment 16 Gabor Kelemen (allotropia) 2023-01-12 16:09:18 UTC
Seems to open fine in 
Version: (X86_64) / LibreOffice Community
Build ID: d993327eab0a2c9c8820c6528075b01de68b0ec6
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded

bibisected in linux-7.4 to:


author	László Németh <nemeth@numbertext.org>	Fri Nov 18 14:11:30 2022 +0100
committer	László Németh <nemeth@numbertext.org>	Tue Nov 22 08:23:36 2022 +0100

tdf#152106 sw layout: fix freezing of multicol sections with flys

Now opening the file does not freeze. But the layout is falling apart compared to the look at attachment 123774 [details] from bug 98823

Not marking as duplicate of a much newer bug. Thanks László for fixing this!
Comment 17 László Németh 2023-01-13 09:53:36 UTC
(In reply to Gabor Kelemen (allotropia) from comment #16)
> Not marking as duplicate of a much newer bug. Thanks László for fixing this!

@Gábor: thanks for the nice feedback!