Bug 107492 - : OutOfBound error when cells are deleted
Summary: : OutOfBound error when cells are deleted
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2017-04-27 18:02 UTC by Denis Dobbin
Modified: 2024-04-14 03:15 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
File with VBA macro that removes duplicated records (16.32 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-04-27 18:02 UTC, Denis Dobbin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Dobbin 2017-04-27 18:02:32 UTC
Created attachment 132919 [details]
File with VBA macro that removes duplicated records

A macro Wrote in VBAModule removes duplicated records in worksheets. When Cells are deleted in loop, their references are missed and cause outofbound error in second deletion.
It works in LO_5.1.5
Comment 1 Xisco Faulí 2017-04-27 20:36:14 UTC
Regression introduced by:

author	Markus Mohrhard <markus.mohrhard@googlemail.com>	2016-09-30 23:31:09 (GMT)
committer	Markus Mohrhard <markus.mohrhard@googlemail.com>	2016-10-01 02:06:23 (GMT)
commit 5f658dc87794036182aa1f8586d82c5ee997cd8b (patch)
tree 163168c022de64266238818c339f9d3e96ceea57
parent cf4ff92144726a91508fcaf4be21170eac5cb99a (diff)
tdf#101910, mark ScRangeList updated when DeleteArea was used

Bisected with bibisect-linux-64-5.3

Adding Cc: to Markus Mohrhard
Comment 2 QA Administrators 2018-04-28 02:31:28 UTC Comment hidden (obsolete)
Comment 3 Julien Nabet 2020-01-21 20:40:27 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.
Reverting partly the patch makes it work:
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index 76b68d1a1b27..7ff6f96b2585 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -353,11 +353,11 @@ bool ScRangeList::UpdateReference(
         {
             if(nDx < 0)
             {
-                bChanged = DeleteArea(nCol1+nDx, nRow1, nTab1, nCol1-1, nRow2, nTab2);
+                DeleteArea(nCol1+nDx, nRow1, nTab1, nCol1-1, nRow2, nTab2);
             }
             if(nDy < 0)
             {
-                bChanged = DeleteArea(nCol1, nRow1+nDy, nTab1, nCol2, nRow1-1, nTab2);
+                DeleteArea(nCol1, nRow1+nDy, nTab1, nCol2, nRow1-1, nTab2);
             }
             SAL_WARN_IF(nDx < 0 && nDy < 0, "sc", "nDx and nDy are negative, check why");
Comment 4 Julien Nabet 2020-01-21 20:41:54 UTC
Just forgot to tell that I noticed this log several times:
warn:legacy.osl:83214:83214:sc/source/ui/unoobj/cellsuno.cxx:4592: What ranges ?!?!
Comment 5 Xisco Faulí 2020-01-21 21:22:06 UTC
(In reply to Julien Nabet from comment #4)
> Just forgot to tell that I noticed this log several times:
> warn:legacy.osl:83214:83214:sc/source/ui/unoobj/cellsuno.cxx:4592: What
> ranges ?!?!

With your patch or without it ?
Comment 6 Julien Nabet 2020-01-21 21:37:32 UTC
25 times warn:legacy.osl:83214:83214:sc/source/ui/unoobj/cellsuno.cxx:4592: What ranges ?!?! with the patch

16 times without. But perhaps it's because the script stops with outofbound error.

Anyway, the patch doesn't fix this warn for sure.
Comment 7 QA Administrators 2022-04-14 03:40:36 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2024-04-14 03:15:44 UTC
Dear Denis Dobbin,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug