Bug 116501

Summary: Writer freezes when working with this particular ODT document
Product: LibreOffice Reporter: Gabor Kelemen (allotropia) <kelemeng>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: libreoffice, michael.stahl, serval2412, telesto, xiscofauli
Priority: medium Keywords: haveBacktrace, preBibisect, regression
Version: 3.5.7.2 release   
Hardware: All   
OS: All   
Whiteboard: target:6.3.0 target:7.3.0 target:7.2.0.0.beta2 target:7.1.5
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 136524, 113510    
Attachments: The problematic document
bt with debug symbols
improved test document (used for unit testing, too): freezing at opening

Description Gabor Kelemen (allotropia) 2018-03-19 15:55:48 UTC
Created attachment 140716 [details]
The problematic document

LibreOffice Writer freezes when working with the attached ODT file. The document contains tables and some images anchored to paragraph. LibreOffice tends to freeze when working with this document. The easiest way to trigger the freeze is just deleting one line from the third page to move the image from the top of the fourth page to the bottom of the third page. Changing the anchor of the images from “to paragraph” to “as characters” solves the issue, so the bug might be related how LibreOffice is handling images inside tables when they are at the bottom end of the page.

Steps to reproduce:
1. Download the following file: LO-ODT-freeze.odt
2. Open the file with LibreOffice Writer.
3. Go to the third page.
4. Find and delete the first line on the top of the third page that contains the following text: >> DELETE THIS LINE << >> DELETE THIS LINE << >> DELETE THIS LINE <<

Actual results:
LibreOffice Writer freezes immediately when a line on the third page is deleted.

Expected results:
LibreOffice shouldn't freeze.
Comment 1 Telesto 2018-03-19 16:14:55 UTC
Repro
Version: 6.1.0.0.alpha0+
Build ID: e5bc7fa4e83b33fc3eee343e560a4f8cb91eacd6
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-03-14_23:37:38
Locale: nl-NL (nl_NL); Calc: CL

Selecting the line was enough in my case

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

and with
LibreOffice 3.5.7.2 
Build ID: 3215f89-f603614-ab984f2-7348103-1225a5

but not with (probably because of a different rendering of the table layout)
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 2 Julien Nabet 2018-03-19 20:39:01 UTC
Created attachment 140724 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today (+enable-dbgutil), I got a segfault just when opening the file.
Comment 3 Julien Nabet 2018-03-19 20:50:44 UTC
Michael: thought you might be interested in this one
Comment 4 László Németh 2019-05-07 15:43:07 UTC
Proposed fix: https://gerrit.libreoffice.org/#/c/71920/
Comment 5 Commit Notification 2019-05-08 09:47:16 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/91b2239783dc716bd71ce7962bfd7e341dfe4175%5E%21

tdf#116501 fix freezing at embedded text tables

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 László Németh 2019-05-08 09:49:45 UTC
Created attachment 151237 [details]
improved test document (used for unit testing, too): freezing at opening
Comment 7 Commit Notification 2021-06-21 12:51:18 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ee042a371e98cdcc59848f0b953f1ce545e18e31

Revert "tdf#116501 fix freezing at embedded text tables"

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2021-06-21 12:51:29 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f1439db62eb36ef5fbc9111b87dc4e0f24b3cb86

tdf#116501 sw: layout: check for flys in SwTabFrame::ShouldBwdMoved()

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2021-06-21 17:45:13 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/46e1c35aaa21765cae17a0fa9182e7b0469daf42

Revert "tdf#116501 fix freezing at embedded text tables"

It will be available in 7.2.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2021-06-21 17:45:24 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/2f163b242aec8cb4647eb0951a815249f4850be0

tdf#116501 sw: layout: check for flys in SwTabFrame::ShouldBwdMoved()

It will be available in 7.2.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2021-06-22 07:35:37 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/0f026c6e7186ef57e5806348a320f8383dfb7dc7

Revert "tdf#116501 fix freezing at embedded text tables"

It will be available in 7.1.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2021-06-22 07:36:48 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/35a0bfa7bf52ca713ea8e57cd982d16723be920d

tdf#116501 sw: layout: check for flys in SwTabFrame::ShouldBwdMoved()

It will be available in 7.1.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.