Bug 79018 - FILEOPEN: DOCX with a footnote hangs LO on open
Summary: FILEOPEN: DOCX with a footnote hangs LO on open
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: high critical
Assignee: Oliver Specht (CIB)
URL:
Whiteboard: BSA target:5.1.0 target:5.0.2 target:...
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2014-05-21 14:01 UTC by Yogesh Bharate
Modified: 2016-10-25 19:24 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
File hang LO on open (212.71 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-05-21 14:01 UTC, Yogesh Bharate
Details
Minimal testcase for bug 79018 (4.21 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-05-24 05:33 UTC, Mike Kaganski
Details
Backtrace (12.41 KB, text/plain)
2015-06-16 16:45 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yogesh Bharate 2014-05-21 14:01:10 UTC
Created attachment 99507 [details]
File hang LO on open

Problem description: 

Steps to reproduce:
1. Open document in LibreOffice


Current behavior:
When document open in LibreOffice, LO get hanged

Expected behavior:
Document open properly in LibreOffice.
              
Operating System: All
Version: 4.3.0.0.alpha0+ Master
Comment 1 Jorendc 2014-05-21 15:59:58 UTC
Version: 4.3.0.0.alpha1+
Build ID: cd11bc699ac50af4f560ed5f2e5e7903de0898b8
TinderBox: Win-x86@51-TDF, Branch:MASTER, Time: 2014-05-20_08:02:54

Repro, tested using windows 8.1 with LibreOffice Version: 4.3.0.0.alpha1+
Build ID: cd11bc699ac50af4f560ed5f2e5e7903de0898b8
TinderBox: Win-x86@51-TDF, Branch:MASTER, Time: 2014-05-20_08:02:54

Kind regards,
Joren
Comment 2 Jorendc 2015-05-17 09:34:50 UTC
Still repro Version: 5.0.0.0.alpha1+ (x64)
Build ID: 9d0c51daea67104349cac26de9839afa8baeb099
TinderBox: Win-x86_64@42, Branch:master, Time: 2015-05-15_23:59:35
Locale: nl-BE (nl_BE)
Comment 3 Timur 2015-05-19 16:12:49 UTC
Looks like inherited.
Comment 4 Mike Kaganski 2015-05-24 05:33:45 UTC
Created attachment 115933 [details]
Minimal testcase for bug 79018

Hang occurs on a footnote that follows a footnote having these properties:
1. has "w:customMarkFollows" attribute set to true;
2. has trailing <w:br/> in footnote text.

In original doc, it is footnote with id=3 (first on page 3), that goes after footnote id=2 (second on page 1).

If these conditions are met, then in

SwTextFrm::_Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf, const bool bAdjust ),

the loop
do { ... }while( !bBreak );
won't stop, and each time the following instruction is executed:

rLine.Insert( new SwLineLayout() );

which eventually leads to OOM.
Comment 5 Timur 2015-06-16 16:45:48 UTC
Created attachment 116590 [details]
Backtrace

STACK_COMMAND:  dt ntdll!LdrpLastDllInitializer BaseDllName ; dt ntdll!LdrpFailureData ; ~0s; .ecxr ; kb

FAILURE_BUCKET_ID:  STATUS_BREAKPOINT_80000003_swlo.dll!SwNodes::GetDoc

BUCKET_ID:  APPLICATION_FAULT_STATUS_BREAKPOINT_swlo!SwNodes::GetDoc+d

FAILURE_ID_HASH_STRING:  um:status_breakpoint_80000003_swlo.dll!swnodes::getdoc
Comment 6 Commit Notification 2015-09-03 10:50:36 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=089d7f53ea232972961c14706a54187f075fa973

tdf#79018: Prevent line break as footnote label

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2015-09-03 11:13:33 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=adf39dbade8652ceca9007484bfa20f04c5ebec0&h=libreoffice-5-0

tdf#79018: Prevent line break as footnote label

It will be available in 5.0.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Michael Stahl (allotropia) 2015-09-15 15:53:29 UTC
fix is trivial enough, backported
Comment 9 Commit Notification 2015-09-15 15:53:59 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a02d7cbd70f3c5703f61f380caf91c460aa3a530&h=libreoffice-4-4

tdf#79018: Prevent line break as footnote label

It will be available in 4.4.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.