Bug 104152 - Pasting multiline text into cell hangs Calc and leads to OOM
Summary: Pasting multiline text into cell hangs Calc and leads to OOM
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2.2.2 release
Hardware: All Linux (All)
: high major
Assignee: Eike Rathke
URL:
Whiteboard: target:5.4.0 target:5.3.0.1 target:5....
Keywords: regression
Depends on:
Blocks:
 
Reported: 2016-11-24 20:38 UTC by Aurimas Fišeras
Modified: 2016-12-07 09:05 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample file that shows the problem (10.29 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-11-24 20:38 UTC, Aurimas Fišeras
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aurimas Fišeras 2016-11-24 20:38:19 UTC
Created attachment 128995 [details]
Sample file that shows the problem

Reproducible on Ubuntu Zesty Zapus (development branch) (64-bit):
1. Versija: 5.2.2.2
Darinio identifikatorius: 1:5.2.2-0ubuntu2
Procesoriaus gijos: 4; Operacinės sistemos versija: Linux 4.8; Sąsajos pateikimas: numatytasis; 
Lokalė: lt-LT (lt_LT.UTF-8); Calc: group

2. Versija: 5.3.0.0.alpha1+
Darinio identifikatorius: 0de1b34a89a5bafa87a031da7e53e902ec14312c
Procesoriaus gijos: 4; Operacinės sistemos versija: Linux 4.8; Sąsajos pateikimas: numatytasis; VCL: gtk3; Layout Engine: new; 
Lokalė: lt-LT (lt_LT.UTF-8); Calc: group

NOT reproducible on Windows 7 (64-bit):
1. Version: 5.1.2.2 (x64)
Build ID: d3bf12ecb743fc0d20e0be0c58ca359301eb705f
CPU Threads: 2; OS Version: Windows 6.1; UI Render: default; 
Locale: lt-LT (lt_LT)

2. Version: 5.2.3.3 (x64)
Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf
CPU Threads: 2; OS Version: Windows 6.1; UI Render: default; 
Locale: lt-LT (lt_LT); Calc: group

How to reproduce:
1. Open attached file.
2. Copy all text from inside of A6 (not the cell).
3. Paste special between 22.20 and 555 inside A1.
4. In Paste Special dialog select "Unformatted text".

What should happen:
Text is successfully pasted.

What happens:
LibreOffice hangs with 100% CPU and rapidly consumes all available memory.
Comment 1 Telesto 2016-11-24 21:30:01 UTC
No repro with Windows:
Version: 5.3.0.0.alpha1+
Build ID: f965a629fba10ecba7bad938a0c1c9c3db1e510d
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; Layout Engine: new; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-11-23_00:13:10
Locale: nl-NL (nl_NL); Calc: CL
Comment 2 Joel Madero 2016-11-25 05:01:35 UTC
Version: 5.4.0.0.alpha0+
Build ID: 8a279d7de4cf94c99f655f6edd0da0c24ab4003c
CPU Threads: 2; OS Version: Linux 4.4; UI Render: default; VCL: gtk3; Layout Engine: new; 
Locale: en-US (en_US.UTF-8); Calc: single

Bodhi Linux 4

Confirmed

Works fine for 3.3 so it's a regression.
Comment 3 Eike Rathke 2016-11-28 15:23:26 UTC
Apparently an EditEngine problem. Taking.
Comment 4 Commit Notification 2016-11-30 13:50:56 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

prevent endlessly creating new lines until out of memory, tdf#104152

It will be available in 5.4.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 5 Commit Notification 2016-11-30 13:51:48 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7c20d0174c59d46b11fc5029fe3fc0c00f5dc6d0

Resolves: tdf#104152 suppress notifications from EditEngine during Paste

It will be available in 5.4.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 6 Eike Rathke 2016-11-30 14:24:44 UTC
Pending review https://gerrit.libreoffice.org/31425 for 5-2
Comment 7 Commit Notification 2016-11-30 15:22:22 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

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

prevent endlessly creating new lines until out of memory, tdf#104152

It will be available in 5.3.0.1.

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 Commit Notification 2016-11-30 15:24:27 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

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

Resolves: tdf#104152 suppress notifications from EditEngine during Paste

It will be available in 5.3.0.1.

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 9 Commit Notification 2016-12-01 12:29:17 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

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

Resolves: tdf#104152 suppress notifications from EditEngine during Paste

It will be available in 5.2.5.

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 10 Commit Notification 2016-12-07 09:05:52 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-2-4":

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

Resolves: tdf#104152 suppress notifications from EditEngine during Paste

It will be available in 5.2.4.

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.