Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting a sheet referenced in current sheet causes sc-im to crash. #937

Open
earthshrink opened this issue Feb 4, 2025 · 0 comments
Open

Comments

@earthshrink
Copy link

Sc-im is able to parse out non-existent sheet at time of cell entry. If a sheet referenced in the current sheet is deleted, however, it crashes. Here's how to reproduce.

Create a test spreadsheet, say test.sc with the following lines

newsheet "Sheet2"
newsheet "Sheet1"
movetosheet "Sheet2"
let A0 = 1
goto A0
movetosheet "Sheet1"
let A0 = {"Sheet2"}!A0
goto A0

Bring up sc-im test.sc. It will show the value 1.0 in cell A0.
Enter command :delsheet "Sheet2"
Sc-im immediately segfaults.

If instead command ={"Sheet3"}!a0 is entered, referencing a non-existent sheet. it is silently rejected and cell value is set to 0.

The crash happens while the current sheet is being repainted. It doesn't crash if the detetion command is given when sc-im is run with --nocurses command option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant