Bug 96568 - Crash after Modifying Transpose Formula for Table if All Cells in Sheet are Selected
Summary: Crash after Modifying Transpose Formula for Table if All Cells in Sheet are S...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:5.3.0 target:5.2.2
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-17 20:47 UTC by Usama
Modified: 2016-08-11 20:17 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
File with a table and transpose function (9.51 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-12-17 20:47 UTC, Usama
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Usama 2015-12-17 20:47:37 UTC
Created attachment 121374 [details]
File with a table and transpose function

When I try to modify the range in Transpose() function libreoffice freeze if all cells were selected using (ex: Ctrl+A)

How to reproduce:

1. Create a table in Calc.
2. Create a flipped version on another sheet using the Transpose() function.
ex: =Transpose(Sheet1.A1:F8)
3. Select the full sheet that contain Trasnpose() using Ctrl+A
4. Modify the function range in the input line. Ex: =Transpose(Sheet1.A1:F8) to =Transpose(Sheet1.A1:F9) then press Ctrl+Shift+Enter to save changes
5. Libreoffice will freeze

A sample file is attached. so tester can start from step 3.
Comment 1 Usama 2015-12-17 20:52:39 UTC
The workaround is to select the exact area that is flipped by the function.
Comment 2 raal 2015-12-17 21:41:28 UTC
Reproducible with 4.2.8, win7, 5.0.2, linux and Version: 5.2.0.0.alpha0+ (x64)
Build ID: cfe08df695c046371c4361a434176e6381e3e064
CPU Threads: 1; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-12-15_13:10:55


program eats about 1,6GB of RAM and then crash
Comment 3 m_a_riosv 2015-12-18 03:04:31 UTC
In this way the formula is expanding for the whole sheet, out of the range of the formula range. To see what is happening, select a range bit large than the formula range.

It's the same than dragging the TRANSPOSE() to the last bottom-right cell.

I don't think it's easy to catch all kind of situations that can lead to an interminable operations.
Comment 4 Caolán McNamara 2016-08-11 15:42:57 UTC
caolanm->erack: is this a candidate for the various new "all sheet" protection things you've added ?
Comment 5 Eike Rathke 2016-08-11 15:46:10 UTC
It is.
Comment 6 Commit Notification 2016-08-11 17:36:26 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#96568 check SelectionFillDOOM() on EnterMatrix()

It will be available in 5.3.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 Eike Rathke 2016-08-11 17:50:27 UTC
Pending review https://gerrit.libreoffice.org/28061 for 5-2
Comment 8 Commit Notification 2016-08-11 20:17:38 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=282e9a69c92d4c616e3e8f71ffe1149e19ae1655&h=libreoffice-5-2

Resolves: tdf#96568 check SelectionFillDOOM() on EnterMatrix()

It will be available in 5.2.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.