Bug 155881 - Saving causes consolidate dialog to fill up with garbage ranges
Summary: Saving causes consolidate dialog to fill up with garbage ranges
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-DataRange
  Show dependency treegraph
 
Reported: 2023-06-16 15:40 UTC by dominik1996
Modified: 2023-06-18 00:34 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the consolidate dialog once it has started to pile up with random ranges (19.43 KB, image/jpeg)
2023-06-16 15:41 UTC, dominik1996
Details
Test file which has the reproduced bug (36.45 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-06-16 15:42 UTC, dominik1996
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dominik1996 2023-06-16 15:40:06 UTC
Description:
I keep my personal finances in LibreOffice Calc file. I have two sheets: 2022 and 2023. When I want to group by categories and costs per row by using Consolidate, everything works as expected. As soon as I save the file, close it and then open it again, the Consolidate dialog has got 4 more ranges pointing to $'2022'.$A$1. As I continue to save and close the file, this dialog gets filled up with bunch of these ranges and after a while the saving of the file will take probably 10 seconds. If I try to open the dialog then, it takes probably a minute to open. Deleting these ranges also takes couple of minutes while the Calc is not responding at all.
I can provide example file with similar data which I've used to reproduce the problem.
Thanks for your help!

Steps to Reproduce:
1. Create a file with 5 columns: Date, Text, Text, Text and Currency input
2. Fill the rows with data
3. Create another sheet with the same set of columns and fill some rows with data
4. Open Consolidate dialog and add a range. Under options check Row labels
5. After saving the file and closing it, open it again
6. Consolidate dialog now has duplicate ranges which haven't been entered by the user
7. Save, close and open the file couple of more times. Consolidate dialog should have even more duplicated ranges

Actual Results:
Consolidate dialog has more and more ranges which haven't been entered by user. After a while, Calc starts to work slowly - saving and consolidating data takes too long.

Expected Results:
Consolidate dialog should contain only ranges added by the user.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.3.2.2 (x64) / LibreOffice Community
Build ID: 49f2b1bff42cfccbd8f788c8dc32c1c309559be0
CPU threads: 12; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: hr-HR (hr_HR); UI: en-GB
Calc: CL
Comment 1 dominik1996 2023-06-16 15:41:32 UTC
Created attachment 187944 [details]
Screenshot of the consolidate dialog once it has started to pile up with random ranges
Comment 2 dominik1996 2023-06-16 15:42:53 UTC
Created attachment 187945 [details]
Test file which has the reproduced bug

Opening Consolidate dialog displays random ranges which started to appear as the file was being saved and closed.
Comment 3 ady 2023-06-16 19:41:32 UTC
STR:
1. Open attachment 187945 [details].
2. [CTRL]+[HOME]
3. Menu Data > Consolidate
4. Select all the "$'2022'.$A$1" lines within the "consolidation ranges" area.
5. Click on the "Delete" button.
6. OK to close the dialog.
7. Save.
8. Reload the file.
9. Menu Data > Consolidate

New "$'2022'.$A$1" lines show up; 4 lines.

10. [ESC] to close the dialog without changing anything.
11. Save and reload the file.
12. Menu Data > Consolidate

New "$'2022'.$A$1" lines show up; 12 lines.

Repeating steps 10 to 12:

New "$'2022'.$A$1" lines show up; 28 lines.

So it is more than duplicated entries. Each Save will add entries, even with no change in the file at all.

This is already happening in LO 3.3, with the slight difference that the entries are not "$'2022'.$A$1" but "$'2022'.$A$1:$E$372".

It is also happening in the current Dev version.

Since this has been happening for so long, I assume this report will end up being a duplicate of some other prior report. Setting as NEW in the meantime.
Comment 4 dominik1996 2023-06-17 12:01:05 UTC
Thanks ady for the confirmation of the bug. I've tried to find any reported cases on this but there were none.
Comment 5 m_a_riosv 2023-06-17 22:08:37 UTC
But it doesn't happen to me with a file from scratch.
In that case, second ranges are lost.

https://bugs.documentfoundation.org/show_bug.cgi?id=45862
Comment 6 ady 2023-06-18 00:32:17 UTC
Using a recent Dev version and a file from scratch (taking data from attachment 187945 [details] from comment 2), I am still able to replicate the behavior reported in this bug 155881. The difference in this case is that, when re-opening the already-saved file, the additional lines are not 4 but 3 (i.e. offset of -1). The next times (after each save and reload) the values are similar: 11 lines instead of 12, 27 lines instead of 28...

In the Consolidate dialog, there are other features that are not working correctly:
* The field info for Source data cannot be deleted; meaning that after deletion, closing the dialog and reopening it, the source data lines remain as before deletion.

* Trying to select an area for Source Data, I cannot use typical keyboard shortcuts to select an area (e.g. [CTRL]+[HOME], [SHIFT]+[CTRL]+[END], [SHIFT]+[CTRL]+[arrow keys]); the focus of the cursor remains in the field of the dialog, so the area can be selected by using the mouse and scrolling).

* Not all the (Row) Head Labels are actually used/seen in the resulting consolidation area (i.e. "Copy results to:" field).


(In reply to m.a.riosv from comment #5)
> bug 45862

I tried using attachment 56839 [details] from bug 45862, but it doesn't make sense when I open it: the dialog is set up in order to consolidate data by a SUM of _text_ values. Starting from such situation, I decided not to use it for testing the Data Consolidation feature.