Bug 118513 - Delete a Sheet on Calc Spreadsheet Causes Memory Leak
Summary: Delete a Sheet on Calc Spreadsheet Causes Memory Leak
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks: Memory
  Show dependency treegraph
 
Reported: 2018-07-03 07:32 UTC by veevyvy
Modified: 2019-08-08 11:38 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description veevyvy 2018-07-03 07:32:19 UTC
Description:
I have a spreadsheet with multiple sheets.
When I delete one of the sheets, it consumes my entire 16GB RAM and started to use swap area (a system monitor utility tells me this). I tried to work out what triggered the problem, and found that: IF "Freeze Columns and Rows" of the sheet is enabled or specified, it will result in this bug.

Can the developers look into this issue? Thanks!

Steps to Reproduce:
1. Create an empty Calc spreadsheet.
2. Create another new sheet.
3. Go to "View" > "Freeze Cells" > "Freeze Columns and Rows"
4. Delete this new sheet.

Actual Results:
Calc stops responding, then consumes all available memory followed by swap area.

Expected Results:
Delete the sheet properly.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Comment 1 Xavier Van Wijmeersch 2018-07-03 08:43:23 UTC
no repro with

Version: 6.0.5.2
Build ID: SlackBuild for 6.0.5 by Eric Hameleers
CPU threads: 2; OS: Linux 4.14; UI render: default; VCL: gtk3; 
Locale: nl-BE (en_US.UTF-8); Calc: group
Comment 2 Julien Nabet 2018-07-03 08:49:54 UTC
veevyvy: following Xavier's comment, could you give a try to LO 6.0.5?
Comment 3 Xisco Faulí 2018-07-03 09:31:35 UTC
Thank you for reporting the bug.
it seems you're using an old version of LibreOffice.
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 4 veevyvy 2018-07-03 10:14:04 UTC
I'm currently using Ubuntu 18.04, and have just installed the latest LibreOffice via https://launchpad.net/~libreoffice/+archive/ubuntu/ppa.

I am still able to reproduce the bug, but with an extra step (3A) as below:

Steps to Reproduce:
1. Create an empty Calc spreadsheet.
2. Create another new sheet.
3. Go to "View" > "Freeze Cells" > "Freeze Columns and Rows"
3A. Select cell B3 (other cells except A1 seem to work too).
4. Delete this new sheet.

I have been able to reproduce the bug on two different computers, running the following version (only the locales are different):

Version: 6.0.5.2
Build ID: 1:6.0.5~rc2-0ubuntu0.18.04.1~lo1
CPU threads: 2; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group

Version: 6.0.5.2
Build ID: 1:6.0.5~rc2-0ubuntu0.18.04.1~lo1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (zh_CN.UTF-8); Calc: group
Comment 5 Xavier Van Wijmeersch 2018-07-04 09:16:17 UTC
still no repro, use the source from https://www.libreoffice.org/download/download/?type=deb-x86&version=6.0.5&lang=en-US
i think the problem is from launchpad.net, so if i am not wrong a not our bug

Version: 6.0.0.2
Build ID: 06b618bb6f431d27fd2def25aa19c833e29b61cd
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: en-US (en_US.UTF-8); Calc: group

Version: 6.0.4.2
Build ID: 9b0d9b32d5dcda91d2f1a96dc04c645c450872bf
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group

Version: 6.1.0.0.beta2+
Build ID: d90a25d2fe3c6fe46aa3e21ff5cd48aab4251840
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group threaded

Version: 6.2.0.0.alpha0+
Build ID: a1f5b1f30a5a80d7eeed2efe2564763bf1d12086
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: gtk3; 
Locale: nl-BE (en_US.UTF-8); Calc: group threaded
Comment 6 veevyvy 2018-07-04 09:29:04 UTC
Oops... sorry, I think I have messed up the steps to reproduce the bugs.

The correct steps should be:

Steps to Reproduce:
1. Create an empty Calc spreadsheet.
2. Create another new sheet.
3A. Select cell B3 (other cells except A1 seem to trigger the bug too).
3B. Go to "View" > "Freeze Cells" > "Freeze Columns and Rows"
4. Delete this new sheet.

In other words, need to select a cell first (not A1, e.g., B3 works) before freezing the columns and rows.

I will check the windows version later to see if the bug is there.
Comment 7 Xavier Van Wijmeersch 2018-07-04 10:28:05 UTC
following the steps in comment 6, no problem at all
In the second sheet i did select cell C6 and then frees column/row, deleting the sheet, normal behavior; even when i compiling LO 6.2 alpha.

try to install from https://www.libreoffice.org/download/download/?type=deb-x86&version=6.0.5&lang=en-US to see if its still behave like you say
Comment 8 veevyvy 2018-07-04 14:34:09 UTC
Found something new... Briefly speaking, the bug is in the x86_64 (.deb) version but not in x86 (.deb) version.

(A) I installed the .deb (x86 version) from https://www.libreoffice.org/download/download/?type=deb-x86&version=6.0.5&lang=en-US. It works fine... No bug!

Here's from the 'About' page (x86 version):

Version: 6.0.5.2
Build ID: 54c8cbb85f300ac59db32fe8a675ff7683cd5a16
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: x11; 
Locale: en-US (zh_CN.UTF-8); Calc: group

(B) Then I uninstalled the above, and installed the .deb (x86_64 version) from https://www.libreoffice.org/download/download/?type=deb-x86_64&version=6.0.5&lang=en-US. The bug IS there.

Here's from the 'About' page (x86_64 version):

Version: 6.0.5.2
Build ID: 54c8cbb85f300ac59db32fe8a675ff7683cd5a16
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
Locale: en-US (zh_CN.UTF-8); Calc: group

(Besides 32-bit vs 64-bit, VCL also differs.)
Comment 9 Julien Nabet 2018-07-05 17:23:25 UTC Comment hidden (obsolete)
Comment 10 veevyvy 2018-07-05 17:29:22 UTC Comment hidden (obsolete)
Comment 11 Julien Nabet 2018-07-05 17:47:04 UTC Comment hidden (obsolete)
Comment 12 Xisco Faulí 2018-07-05 23:27:08 UTC Comment hidden (obsolete)
Comment 13 Buovjaga 2018-07-15 16:31:12 UTC
Do you reproduce in Safe mode? Help - Restart in safe mode and then Continue in safe mode. Or launch from the command line with libreoffice --safe-mode

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.
Comment 14 veevyvy 2018-07-16 07:45:57 UTC
I just tested with the safe mode (libreoffice6.0 --safe-mode), the bug IS still there... the memory leak still happens.

Version: 6.0.5.2
Build ID: 54c8cbb85f300ac59db32fe8a675ff7683cd5a16
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
Locale: zh-CN (zh_CN.UTF-8); Calc: group
Comment 15 Buovjaga 2018-07-16 15:48:15 UTC Comment hidden (obsolete)
Comment 16 veevyvy 2018-07-17 10:57:24 UTC Comment hidden (obsolete)
Comment 17 Buovjaga 2018-07-17 11:23:34 UTC
(In reply to veevyvy from comment #16)
> (In reply to Buovjaga from comment #15)
> > I tried 6.2 with gtk2 just to be sure, but no catastrophe.
> 
> Which architecture have you tried? x86 or x86_64?
> 
> x86 works fine on my machine, but not the x86_64 one.

Always 64-bit.
Comment 18 Timur 2018-07-17 14:39:19 UTC
I also cannot reproduce in Linux 16.04. 
Cannot say if it's only in Ubuntu 18.04 - in whcih case it's NotOurBug.

Please test with Still, Fresh and Daily AppImage from https://www.libreoffice.org/download/appimage/ and also install master version 6.2+ from https://dev-builds.libreoffice.org/daily/master/.
Please change to Unconfirmed only if you determine how this can be reproduced.
Comment 19 QA Administrators 2019-07-11 02:54:51 UTC Comment hidden (obsolete)
Comment 20 veevyvy 2019-08-08 11:38:18 UTC
I just upgraded my libreoffice installation:
  Version: 6.2.5.2
  Build ID: libreoffice-6.2.5.2-snap1
Instead of the packages prepared by Ubuntu (which seem to be laggy in performance), I changed to use the one from the snap channel.

And the bug is now gone!

I have just updated the status to 'Resolved' and 'Worksforme'. I'm still new to bugzilla, hopefully I have set this correctly.

Thank you everybody!