Skip to content

[Bug] Copied formulas may fail under certain conditions. #5613

@Seecko

Description

@Seecko

Before you submit this issue, have you checked the following

  • Is this really a problem?
  • I have searched the Github Issues for similar issues, but did not find anything.

Affected packages and versions

0.9.4

Reproduction link

Repository: https://github.com/Seecko/UNIVER-ISSUE-RECREATE

Reproduction Steps:

  1. Setup environment: npm install & npm run dev
  2. Access https://localhost:7004/
  3. Select cell A1 and enter the number 1
  4. Select cell B1 and enter the formula '=A1'
  5. Copy cell B1 and paste in cell B2
  6. Select cell A2 and enter the number 2
  7. Click SAVE → stores workbook data via workbook.save() to localStorage
  8. Click LOAD to recreate univer
  9. Modify the indication of cell A2, and ensure that cell B2 is displayed correctly
  10. Quickly click LOAD multiple times (e.g. 30 times within 8 seconds)
  11. The formulas for cells B1 and B2 are invalid. If cells A1 and A2 are modified multiple times, the content of cells B1 and B2 will change incorrectly

Expected behavior

Whenever cells A1 and A2 are modified, cells B1 and B2 can be displayed correctly

Actual behavior

The content of cells B1 and B2 changed incorrectly.
I tried to dispose of everything that could be disposed of before recreating the univer (as can be seen in the 77 line commented out code in the src/views/energyCheckup/checkupReport/indexes.vue file), which caused the univer on the page to fail to load and only a blank container to load. I believe this is my usage error. I should wait until all asynchronous processes of 'dispose' are completed before recreating the univer. However, I don't know when 'dispose' will be executed. If there are any related APIs, please provide me with guidance.

System information

System:
OS: Windows 10 10.0.19045
CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
Memory: 3.53 GB / 15.84 GB
Binaries:
Node: 18.20.5
npm: 10.8.2
pnpm: 9.10.0
Browsers:
Chrome: Chromium (136.0.7103.114)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions