[Libreoffice-bugs] [Bug 140901] New: EDITING Crash when deleting rows that are referenced by a chart

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Mar 9 05:45:55 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=140901

            Bug ID: 140901
           Summary: EDITING Crash when deleting rows that are referenced
                    by a chart
           Product: LibreOffice
           Version: 6.4.6.2 release
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: txcsharppro at gmail.com

Created attachment 170355
  --> https://bugs.documentfoundation.org/attachment.cgi?id=170355&action=edit
sample XLS file created in a prior version of LO

When a row or group of rows is deleted, if an existing chart contains a
reference to any element in that row(s), Calc will quickly crash when
attempting to delete the row(s). Bug occurs in LO 6.4.6.2 but likely exists in
other versions, this issue has been around for years and I only just now spent
enough time with it to narrow down the problem and write a defect for it.

Has a workaround, but it is clumsy and time-consuming. If the charts are first
modified to exclude any references to any of the rows about to be deleted, then
the row deletion is successful and the bug does not occur. This is the
workaround I've been using, but I often forget to do this until it crashes and
I ask myself, "what was that strange thing I had to do the last time it
crashed".

STEPS TO REPRODUCE:
1. Open the sample file 'sample-file-for-bug-report - pristine.xls'. (Please
forgive how odd it looks, I deleted a lot of text to anonymize the file.) If
you look at the chart data ranges (see 'Charts' tab), you'll notice the charts
reference data up through row 644 on the 'Sheet13' tab. This is also
demonstrated in the screen shot 'Libre-Calc-bug-screen-1.jpg'.
2. Now go to the 'Sheet13' tab. Attempt to do any 'delete row(s)' operation for
one or more rows which are referenced by the charts on the 'Charts' tab. Calc
will quickly crash. In my testing, I deleted row 631.
3. That action corresponds to
crashreport.libreoffice.org/stats/crash_details/abfe5c0d-223c-4c80-ae76-6983ae8f6258
 and is reproducible 100% of the time.
4. If you allow the Recovery process to proceed, the file is recovered, and the
user has the opportunity to try again with the same row deletion. (The row is
still there, as would be expected.) This cycle of crash/recovery can be
repeated infinitely.

DEV NOTES:
1. There are some related bugs which I am reporting separately. Those occur
when continuing to retry the same row deletion, but since they have additional
unexpected results, they are probably separate bugs.
2. This bug deals with deleting a row or group of rows which a chart holds a
reference to. (Not deleting the data within a row. This is when removing the
row from the spreadsheet.) For reproducing the bug, any kind of row deletion
will do. You could delete a single row, delete a group of rows, or do an insert
& undo that insert. As long as the row deletion is from inside a range that a
chart is referencing, the bug will occur.
3. This might possibly be due to a broken reference error similar to what makes
#REF! be displayed in a cell? Makes me wonder if some of the code for that
exception handler for cells could be used for chart objects also. Just an idea.
4. Bug occurs whether using top menu, context menu, or keyboard shortcut, and
is reproducible 100% of the time.
5. Notably, rows 645-651 are not referenced in the charts, so you can try
deleting from among those rows and the bug does not occur. It only occurs when
the deleted row(s) are referenced in a chart somewhere.
6. Bug is also reproducible by inserting a row (for example) between rows 630
and 631, then typing Ctrl-Z to undo the insert, then Calc will crash on the
Undo operation.
7. It would be interesting to know whether deleting a row which references pure
data elsewhere (such as on another tab) would cause a crash when there are NO
charts involved. I did not test that scenario.

Additional notes which might be relevant:
(1) The attached sample spreadsheet is a spreadsheet which I created about 5
years ago in a previous version of LO. I've migrated it up from previous
versions, but from its creation I've only ever saved it in XLS format (never in
ODF). I do this so I can view it in MS-Office, but I have never edited this
document in MS-Office. I'm not sure whether this file having been created on an
older version of LO makes any difference, versus creating a new file with a
chart, because I did not test that scenario.
(2) The type of chart doesn't seem to be related. This happens on simple charts
as well as more complex ones having line + bubble + 8 different data types
being tracked - you can repro the defect with any one of the charts in my
sample file and deleting the others, and the bug can still be reproduced.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210309/d46844b7/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list