Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

Formula dead lock when delete column #453

Closed
toadfanszz opened this issue Jul 21, 2022 · 0 comments · Fixed by #458 or #462
Closed

Formula dead lock when delete column #453

toadfanszz opened this issue Jul 21, 2022 · 0 comments · Fixed by #458 or #462
Assignees
Labels
bug Something isn't working formula Related to the formula module

Comments

@toadfanszz
Copy link
Contributor

toadfanszz commented Jul 21, 2022

Describe the bug

Manual delete column trigger a dead lock.

To Reproduce

CASE 1

  1. create spreadsheet with 2 * 3
  2. B.1 = =A.1
  3. A.1 = 123
  4. delete column A

CASE 2

  1. create spreadsheet with 2 * 3
  2. A.1 = =A.2
  3. A.2 = =A.1

CASE 3

  1. create spreadsheet with 2 * 3
  2. A.1 = =A.2
  3. A.2 = =A.3
  4. A.3 = =num1
  5. num1 = =A.1

Expected behavior

No response

Additional context

No response

Logs/tracebacks

No response

@toadfanszz toadfanszz added the bug Something isn't working label Jul 21, 2022
@toadfanszz toadfanszz self-assigned this Jul 21, 2022
@stackia stackia added the formula Related to the formula module label Jul 22, 2022
toadfanszz pushed a commit that referenced this issue Jul 22, 2022
* fix #453 

1. Fix deadlock caused by deleted column.
2. Fix deadlock caused by circular dependency.
3. Add more testCases.

```
A1: `=A.2`
A2: `=A.1`
```

or

```
A1: `=A.2`
A2: `=num1`
num1: `=A.1`
```

NOTE that there is still a BUG that if cell is not initialized, these cases can cause a deadlock.
I add a TODO message for this scene.

https://github.com/mashcard/mashcard/pull/458/files#diff-58761a092ff0f5d6bf7997ee740f8c81e2abfdbbe92745389b7dd7c7bb4ae652R258
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working formula Related to the formula module
Projects
None yet
2 participants