Bug 132455 - REF error after undo sheet deletion. Hard recalculate doens't fix it
Summary: REF error after undo sheet deletion. Hard recalculate doens't fix it
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cell-Reference
  Show dependency treegraph
 
Reported: 2020-04-27 11:43 UTC by Telesto
Modified: 2024-02-14 03:03 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Sheet2 with text from Sheet1 (9.23 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-02-14 02:56 UTC, Tex2002ans
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-04-27 11:43:10 UTC
Description:
REF error after undo sheet deletion. Hard recalculate doens't fix it

Steps to Reproduce:
1. Open attachment 154545 [details]
2. Remove FiltrageVent
3. CTRL+Z -> Wait a long time
4. Notice sheet Comparison showing REF error 

Actual Results:
REF-error

Expected Results:
No ref-error


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in
Version: 7.0.0.0.alpha0+ (x64)
Build ID: f924658e45f256544e43c3fdb2af9b585d0f0933
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: threaded

and in 4.4.7.2

not in 3.5.7.2
Comment 1 Xisco Faulí 2020-05-13 11:08:05 UTC
Hi Telesto,
Would it be possible to get a reduced reproducer ?
Comment 2 Xisco Faulí 2020-06-17 12:02:58 UTC
(In reply to Xisco Faulí from comment #1)
> Hi Telesto,
> Would it be possible to get a reduced reproducer ?

Setting to NEEDINO
Comment 3 Telesto 2020-06-17 13:07:10 UTC
Nope, sheet is locked with a password
Comment 4 b. 2020-06-18 15:46:32 UTC
repro with: 

Version: 7.1.0.0.alpha0+ (x64)
Build ID: a201ab6f47c2d5a7ba4c5f998b0aa231cae82010
CPU threads: 8; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: CL

small reproducer with simple formula with 'constructed indirect' to other sheet fails - to fail- will try complex formulas later ...
Comment 5 QA Administrators 2022-08-04 03:34:00 UTC Comment hidden (obsolete)
Comment 6 Tex2002ans 2024-02-14 02:45:29 UTC
I confirm, still an issue in:

Version: 24.2.0.3 (X86_64) / LibreOffice Community
Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1
CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

Followed comment 0 exactly.

- - - - -

For example, in "Comparisons" sheet... Cell F2:

On load:

- =$FiltrageVent.$O2

After Step 2:

- =#REF!.$O2

and Step 3 (undoing the sheet delete), it still stays stuck as:

- =#REF!.$O2

Once they turn into #REF (at least on sheet deletion), seems like they never go back.

- - -

And like Xisco wrote in comment 1:

- Probably would be a good idea to get a better minimal example too. :)

I'll attach a very simple one.
Comment 7 Tex2002ans 2024-02-14 02:56:53 UTC
Created attachment 192552 [details]
Sheet2 with text from Sheet1

0. Open attached ODS file.

All it is:

Sheet1: A1: "TextfromSheet1"
Sheet2: A1: "Here is:"
Sheet2: B1: =$Sheet1.A1

- - -

1. Delete Sheet1.
2. Edit > Undo (Ctrl+Z)
3. Go back to Sheet2.

- - -

In Sheet2, Cell B1...

For values, you'll see:

Step 0: "TextfromSheet1"
Step 1: #REF!
Step 2: #REF!

For formulas, you'll see:

Step 0: =$Sheet1.A1
Step 1: =$#REF!.A1
Step 2: =$#REF!.A1

After Step 2, there is no amount of Undos you can do to return to the original state.
Comment 8 Tex2002ans 2024-02-14 03:03:18 UTC
Testing in Excel 365 (2401, Build 17231.20194), it just gave a warning:

> "Microsoft Excel will permanently delete this sheet. Do you want to continue?"

After deleting the sheet, pressing Ctrl+Z to undo did nothing, and Sheet2's formula was stuck as:

- =#REF!A1

- - -

So, if this is too complicated to toss onto the undo stack, perhaps a warning could work too.

"Hey! You have formulas pointing to this sheet. Are you SURE you want to Delete?"