Bug 164843 - Relative reference in managed names dialog gives #REF error, slow deleting of ranges on Windows
Summary: Relative reference in managed names dialog gives #REF error, slow deleting of...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.8.0
Keywords:
Depends on:
Blocks: Cell-Name
  Show dependency treegraph
 
Reported: 2025-01-24 12:22 UTC by Gabor Kelemen (allotropia)
Modified: 2025-03-17 10:58 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Calc (27.82 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-01-24 12:22 UTC, Gabor Kelemen (allotropia)
Details
Invalid range error from Navigator (28.48 KB, image/png)
2025-01-24 12:22 UTC, Gabor Kelemen (allotropia)
Details
#REF! error in the Manage Names dialog (65.93 KB, image/png)
2025-01-24 12:23 UTC, Gabor Kelemen (allotropia)
Details
Deleting causes temporary freeze on Windows (71.23 KB, image/png)
2025-01-24 12:23 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2025-01-24 12:22:30 UTC
Created attachment 198735 [details]
Example file from Calc

Attached document contains a relative reference to a named range. This is according to the ODF standards
https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part3-schema/OpenDocument-v1.3-os-part3-schema.html#__RefHeading__1418280_253892949

"19.590 table:base-cell-address" part.

In the Navigator, clicking on the name gives "Invalid range" error.
When opened, in the Manage Names dialog the relative part gives a #REF! error.
Under Windows, deleting another named range in the Manage Names dialog gives a wait time of 2-3 minutes after pressing OK.

1. Open attached document
2. In the Navigator under Range names click on the "testrange" name.
-> an information popup shows, telling you "Invalid range"
This seems to have been started between 7.2 and 7.3
3. Navigate to the AC2000 cell, click again in the Navigator under Range names on the "testrange" name.
-> The range AC2:AC2000 is selected correctly

4. Open the Manage Names dialog (press Ctrl-F3)
-> the "Range or formula expression" of the testrange name is "$Sheet1.$AC#REF!:$AC$2000"
This seems to have started between 3.4 and 3.5, likely not well bibisectable.

5. (Windows only) In the Manage Names dialog delete the "dummy_delete" range and press OK
-> Calc does not respond for 2-3 minutes and uses 100% CPU.
This seems to have started between 4.4 and 5.0 with some seemingly unrelated refactorings

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 47e110fc66292e76152252a90a0e20580c33c13d
CPU threads: 14; OS: Windows 10 X86_64 (build 19045); UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded
Comment 1 Gabor Kelemen (allotropia) 2025-01-24 12:22:56 UTC
Created attachment 198736 [details]
Invalid range error from Navigator
Comment 2 Gabor Kelemen (allotropia) 2025-01-24 12:23:31 UTC
Created attachment 198737 [details]
#REF! error in the Manage Names dialog
Comment 3 Gabor Kelemen (allotropia) 2025-01-24 12:23:59 UTC
Created attachment 198738 [details]
Deleting causes temporary freeze on Windows
Comment 4 Commit Notification 2025-02-03 11:54:58 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b89047a0f0100fb30121084cf42815aa792c1f88

tdf#164843 - sc optimize "SubTotal" function's reference ranges

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Balázs Varga (allotropia) 2025-02-04 16:19:24 UTC
(In reply to Commit Notification from comment #4)
> Balazs Varga committed a patch related to this issue.
> It has been pushed to "master":
> 
> https://git.libreoffice.org/core/commit/
> b89047a0f0100fb30121084cf42815aa792c1f88
> 
> tdf#164843 - sc optimize "SubTotal" function's reference ranges
> 
> It will be available in 25.8.0.
> 
> The patch should be included in the daily builds available at
> https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
> information about daily builds can be found at:
> https://wiki.documentfoundation.org/Testing_Daily_Builds
> 
> Affected users are encouraged to test the fix and report feedback.

The slow deleting of ranges on Windows issue was fixed by the above commit. The other #REF error is not really a bug but we are showing #REF error when the relative name range area is out of the scope on the sheet. MSO shows the very last row or column instead of #REF, which also make because in case of Calc we also calculate with the very last shows or columns in functions, if the relative name ranges are out of scope.
Comment 6 Buovjaga 2025-03-05 08:36:04 UTC
Let's avoid needinfo status in these cases as it is dangerous.
Comment 7 Gabor Kelemen (allotropia) 2025-03-17 10:58:38 UTC
Checked in

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: bff3d755c8c11721054f4ff40a3d5f723b0c6b96
CPU threads: 14; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded

performance problem is fixed, customer wanted only that bit.