Download it now!
Bug 119305 - Chart created from fully selected sheet only targets header row
Summary: Chart created from fully selected sheet only targets header row
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0 target:6.1.2 target:6.1.3
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2018-08-15 21:59 UTC by Jason Wood
Modified: 2018-10-05 10:20 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Table with issues (431.29 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-09-07 21:30 UTC, Jason Wood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Wood 2018-08-15 21:59:09 UTC
When all cells in a sheet are selected, including empty cells, calc consumes all system memory when creating a chart.  If the selection contains only those cells that have data, the chart can be created.  This happens on an Ubuntu 18.04 system with 64GB RAM and on a Windows 10 system with 16GB RAM with the same or different spreadsheets.

I can work around the problem by only selecting cells with data, but it seems like calc should be smart enough to drop empty rows/columns prior to attempting to start the chart drawing routines.
Comment 1 Buovjaga 2018-09-06 12:44:27 UTC
Not reproduced, I don't see any abnormal memory use bump.

So this happens for you with like 1,2,3,4,5 in some cells? A simple data set like that? If not, please attach an example file.

Arch Linux 64-bit
Version: 6.1.0.3
Build ID: 6.1.0-2
CPU threads: 8; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.
Comment 2 Jason Wood 2018-09-07 21:30:47 UTC
Created attachment 144746 [details]
Table with issues

I played around with this issue to see if I could figure out the cause of the problem.  I believe that it is related to columns without data surrounded by columns with data (see the attached example).  With this smaller, randomly generated dataset, I am unable to get Calc to consume all memory as I initially reported.  However, if you select all cells (clicking the blank spot between row 1 and column A) and attempt to insert a figure, Calc does not produce the figure as expected. However, if the selection is limited to A1:Y1000 (the randomly generated data), the figure is produced as expected (see the figure in the tab with the same name).

If I were to add more columns I might be able to get Calc to consume all memory, but I think this example will be enough to demonstrate the issue.
Comment 3 Buovjaga 2018-09-10 10:56:10 UTC
I reproduce. Does not happen with 3.6.7. I have to investigate more later.

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: 033a68c49fe2b8aa397832d92d400eb0259ea809
CPU threads: 8; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; 
Locale: fi-FI (fi_FI.UTF-8); Calc: threaded
Built on September 5th 2018

Arch Linux 64-bit
Version 3.6.7.2 (Build ID: e183d5b)
Comment 4 Buovjaga 2018-09-10 18:50:59 UTC
Bibisected with win32-6.1 to https://cgit.freedesktop.org/libreoffice/core/commit/?id=3acc5a2383f5b0458e3caf1505fe6b8ad7dc3fb0

tdf#69977 improve creation of large charts
this patch only tweaks a few things around the edges. The bulk of the
cost is down in the chart2 module where it creates ticks and labels.

Adding Cc: to Noel Grandin

Tweaked summary a bit as I became aware of the exact issue.
Comment 5 Noel Grandin 2018-09-11 12:00:18 UTC
Can I get a brief description of how to repro this bug? Simply selecting everything and creating a chart doesn't cause a problem for me
Comment 6 Buovjaga 2018-09-11 12:06:00 UTC
(In reply to Noel Grandin from comment #5)
> Can I get a brief description of how to repro this bug? Simply selecting
> everything and creating a chart doesn't cause a problem for me

Use attachment 144746 [details] as the data.
Comment 7 Commit Notification 2018-09-11 18:30:24 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#119305 Chart created from fully selected sheet only targets header row

It will be available in 6.2.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 8 Buovjaga 2018-09-11 20:12:23 UTC
Cheers, verified!

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: aaa3c31ba79b1b3d335dcf55d72837a13411b45e
CPU threads: 8; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; 
Locale: fi-FI (fi_FI.UTF-8); Calc: threaded
Built on September 11th 2018
Comment 9 Commit Notification 2018-09-14 12:55:26 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=634d30ce48d89c23ef8cc07ed66c05dc00e19b49&h=libreoffice-6-1

tdf#119305 Chart created from fully selected sheet only targets header row

It will be available in 6.1.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.
Comment 10 Commit Notification 2018-10-04 19:31:55 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Do not let end row creep above start row, tdf#69977 tdf#119305 follow-up

It will be available in 6.2.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 11 Commit Notification 2018-10-05 10:20:31 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9bc004d6187da610e146527585c678b5cd9432ae&h=libreoffice-6-1

Do not let end row creep above start row, tdf#69977 tdf#119305 follow-up

It will be available in 6.1.3.

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.