Bug Hunting Session
Bug 60021 - CRASH when paste and all cells of sheet are selected
Summary: CRASH when paste and all cells of sheet are selected
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: highest major
Assignee: Eike Rathke
URL:
Whiteboard: target:5.3.0 target:5.2.1
Keywords: haveBacktrace
: 76807 89594 91825 92797 95746 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-29 14:15 UTC by bugzilla
Modified: 2016-09-23 13:50 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample Document (7.97 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-01-29 15:25 UTC, Rainer Bielefeld Retired
Details
Debug with WinDBG in LO-dev (4.20 KB, text/plain)
2015-05-18 09:24 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bugzilla 2013-01-29 14:15:37 UTC
When pasting something while accidently the topleft button was hit (everything is selected) instead of the intended first field (a:!) LO hangs and crashs.
Comment 1 Rainer Bielefeld Retired 2013-01-29 15:13:29 UTC
[Reproducible] with "LibO  4.0.0.2 rc   -  GERMAN UI / German Locale  [Build ID: 5991f37846fc3763493029c4958b57282c2597e)]"  {tinderbox: @6, pull time 2013-01-24  07:20(?)} on German WIN7 Home Premium (64bit) with User Profile automatically created form renamed /3 User profile used by 3.6.5.2

Steps:
1. Open attached sample document (I think it should be possible with every 
   document, even may be with an empty one)
2. With mouse pointer select B6:C9
3. <control+c> for copy
4. Click common row/Column header
   > All cells selected
5. <control+v> for paste
   Bug: LibO will become unresponsive, often even will crash afer some time
   (a minute or so)

I will check where that started.

@Reporter:
Thank you for your attention, but it was  only lucky chance that I was able to reproduce the bug you observed with that very rare report. 

If you fine other bugs, Please use LibO Menu
'Help -> Feedback/Bugreports', what will guide you and help to gain more useful information.

Please add a comment with concrete and detailed information concerning your Operation system and LibO version
Comment 2 Rainer Bielefeld Retired 2013-01-29 15:25:25 UTC
Created attachment 73835 [details]
Sample Document

Already [Reproducible] with Server Installation of "LibreOffice 3.3.3  English UI/ German Locale [OOO330m19 (Build:301) tag libreoffice-3.3.3.1] on German WIN7 Home Premium (64bit) 

Same with AOOo 3.4.0. So I think problem is inherited from OOo.

I did not fin a DUP
Comment 3 Rainer Bielefeld Retired 2013-01-29 15:50:41 UTC
Only Major, I don't believe that this that this problem so often happens

@Spreadsheet Team
Please set Status to ASSIGNED and add yourself to "Assigned To" if you accept this Bug or forward the Bug if it's not your turf (and remove others in team from CC)
Comment 4 Eike Rathke 2013-01-29 18:06:40 UTC
We need to forbid paste and other multiple-cell data entry after Ctrl+A (or that grid button) selection or other selections encompassing too many cells. Effectively the data is repeatedly pasted to all selected cells, in the case of Ctrl+A that is 1024x1000000 ... grinding available memory to the ground and application gets shutdown.
Comment 5 Rainer Bielefeld Retired 2013-01-30 06:46:27 UTC
As a spin off I submitted "Bug 60056 - CRASH when fill all cells of sheet",  please mark that one as DUP if a fix seems possible together with fix for that one.

There is a difference to Bug 60056 concerning copying empty cells, I don't know whether that's interesting:

Proceed as per original report, but with a new empty sheet:
Here LibO Becomes unresponsive with maximum CPU load AND rapidly increasing memory consumption (so that LibO will crash finally?)

Situation was a little different in LibO 3.3.3 (WIN), in step 6 (with empty document) also becomes unresponsive, but ONLY significant processor load, NO memory consumption, what ever that might mean.
Comment 6 Steffen 2013-05-13 22:17:34 UTC
Here is a video of Select All followed by Paste making LibreOffice Calc hang (eating up memory) on Fedora 18: http://www.youtube.com/watch?v=x15oL8BWiWk
Comment 7 Eric O. LEBIGOT (EOL) 2013-05-16 08:04:20 UTC
I observe something very similar, here (OS X 10.7, LibreOffice 4.0.3.3).

Basically, copying and pasting a full column (at least after removing, say, its first cell from the selection) is handled very inefficiently by LibreOffice: the CPU starts running, and the computer starts swapping like mad.

I can imagine that LibreOffice is copying a huge number of cells instead of optimizing the copy by noticing that the column is completely empty after some row and only copying a few cells.
Comment 8 digitaltoast 2013-06-06 11:18:36 UTC
Calc Version 4.0.3.3 (Build ID: 0eaa50a932c8f2199a615e1eb30f7ac74279539) on Win 7 x64 does the same thing here when pasting just 6000 rows from Excel into a multi-sheet LO Calc document after pressing CTRL-A to replace the previously entered contents.
Comment 9 Buovjaga 2015-01-31 11:39:13 UTC
*** Bug 76807 has been marked as a duplicate of this bug. ***
Comment 10 Timur 2015-05-12 11:21:37 UTC
*** Bug 89594 has been marked as a duplicate of this bug. ***
Comment 11 Timur 2015-05-18 09:21:58 UTC
(In reply to Rainer Bielefeld Retired from comment #2)
> Same with AOOo 3.4.0. So I think problem is inherited from OOo.
Marked as such.
Comment 12 Timur 2015-05-18 09:24:35 UTC
Created attachment 115691 [details]
Debug with WinDBG in LO-dev
Comment 13 Timur 2015-06-19 14:04:24 UTC
Bug 91825 maybe a duplicate.
Comment 14 Timur 2015-08-17 17:15:21 UTC
*** Bug 91825 has been marked as a duplicate of this bug. ***
Comment 15 raal 2015-11-12 16:44:21 UTC
*** Bug 95746 has been marked as a duplicate of this bug. ***
Comment 16 Eike Rathke 2016-07-28 15:35:31 UTC
Taking.
Comment 17 Commit Notification 2016-07-28 17:05:10 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#60021 disallow Paste when entire sheet is selected

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 18 Commit Notification 2016-07-28 17:05:16 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

do not force the Paste command to enabled for Calc, tdf#60021 related

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 19 Eike Rathke 2016-07-28 17:52:37 UTC
Pending review https://gerrit.libreoffice.org/27647 for 5-2
(and https://gerrit.libreoffice.org/27648 related)
Comment 20 Commit Notification 2016-07-28 19:27:16 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=7d40a0b8fcba1bda84c8e756d8000b92e768f9e2&h=libreoffice-5-2

Resolves: tdf#60021 disallow Paste when entire sheet is selected

It will be available in 5.2.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 21 Commit Notification 2016-07-28 21:21:58 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=849b2dcf38893608b3bce0c86668a0b9db802f55&h=libreoffice-5-2

do not force the Paste command to enabled for Calc, tdf#60021 related

It will be available in 5.2.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 22 Commit Notification 2016-07-29 16:26:11 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

limit SelectionFillDOOM to 24117248 cells, tdf#60021 tdf#60056 related

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 23 Commit Notification 2016-08-02 15:16:19 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=7dda28234cc516e864aff9a6c97b7c539a063c4e&h=libreoffice-5-2

limit SelectionFillDOOM to 24117248 cells, tdf#60021 tdf#60056 related

It will be available in 5.2.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 24 Caolán McNamara 2016-09-23 13:50:46 UTC
*** Bug 92797 has been marked as a duplicate of this bug. ***