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

Insert Column causes SegFault. - =@sum(B40:ZZ40) #865

Open
fg-charles opened this issue Feb 16, 2024 · 4 comments
Open

Insert Column causes SegFault. - =@sum(B40:ZZ40) #865

fg-charles opened this issue Feb 16, 2024 · 4 comments

Comments

@fg-charles
Copy link

fg-charles commented Feb 16, 2024

I'm consistently getting a segfault when inserting a column using the keys "ic" using this file (it is an sc file, I had to call it a .txt for github to let me attach it). Not getting this on any other file.

Here are the contents of the file.

# This data file was generated by the Spreadsheet Calculator Improvised (sc-im)
# You almost certainly shouldn't edit it.

newsheet "Sheet1"
movetosheet "Sheet1"
offscr_sc_cols 0
offscr_sc_rows 0
nb_frozen_rows 0
nb_frozen_cols 0
nb_frozen_screenrows 0
nb_frozen_screencols 0
format A 27 2 0
label B0 = "11/02/24"
label C0 = "10/02/24"
label D0 = "09/02/24"
label E0 = "07/02/24"
label A1 = "___GENERAL___"
leftstring A2 =  "placeholder"
label B2 = "x"
label C2 = "x"
label D2 = "x"
label E2 = "x"
leftstring A3 =  "placeholder"
label B3 = "x"
label C3 = "x"
label D3 = "x"
label E3 = "x"
leftstring A4 =  "placeholder"
label C4 = "x"
leftstring A5 =  "placeholder"
label C5 = "x"
leftstring A7 =  "placeholder"
label B7 = "x"
label C7 = "x"
label E7 = "x"
leftstring A8 =  "placeholder"
label B8 = "x"
label C8 = "x"
label D8 = "x"
label E8 = "x"
leftstring A9 =  "placeholder"
label B9 = "x"
label C9 = "x"
leftstring A10 =  "placeholder"
label B10 = "x"
label C10 = "x"
leftstring A11 =  "placeholder"
label B11 = "x"
label C11 = "x"
leftstring A13 =  "placeholder"
leftstring A14 =  "placeholder"
label B14 = "x"
label C14 = "x"
leftstring A15 =  "placeholder"
label B15 = "x"
label C15 = "x"
leftstring A16 =  "placeholder"
leftstring A17 =  "placeholder"
leftstring A19 =  "placeholder"
leftstring A20 =  "placeholder"
leftstring A21 =  "placeholder"
label B21 = "x"
label C21 = "x"
leftstring A22 =  "placeholder"
label C22 = "x"
label D22 = "x"
label E22 = "x"
leftstring A23 =  "placeholder"
label B23 = "x"
label C23 = "x"
label A25 = "___MORNING___"
leftstring A26 =  "placeholder"
label B26 = "5:30"
label C26 = "12:20"
label D26 = "x"
label E26 = "x"
leftstring A27 =  "placeholder"
leftstring A28 =  "placeholder"
label B28 = "x"
label C28 = "x"
leftstring A29 =  "placeholder"
label B29 = "x"
label C29 = "x"
label E29 = "x"
leftstring A30 =  "placeholder"
label B30 = "x"
label C30 = "x"
label E30 = "x"
leftstring A31 =  "placeholder"
label B31 = "x"
label C31 = "x"
label E31 = "x"
leftstring A32 =  "placeholder"
label B32 = "x"
label C32 = "x"
label E32 = "x"
leftstring A33 =  "placeholder"
label B33 = "x"
label C33 = "x"
leftstring A34 =  "placeholder"
label B34 = "x"
label C34 = "x"
label E34 = "x"
leftstring A35 =  "placeholder"
label B35 = "x"
label C35 = "x"
label E35 = "x"
leftstring A36 =  "placeholder"
label B36 = "x"
label C36 = "x"
label A38 = "___WORK___"
leftstring A39 =  "placeholder"
label B39 = "x"
leftstring A40 =  "placeholder"
let A40 = @sum(B40:ZZ40)
let B40 = 5*1.5+0.9
let C40 = 3.5
let D40 = 2
let E40 = 1
label A42 = "___NIGHT___"
leftstring A43 =  "placeholder"
label B43 = "x"
label C43 = "x"
label E43 = "x"
leftstring A44 =  "placeholder"
label B44 = "x"
label C44 = "x"
label E44 = "x"
leftstring A45 =  "placeholder"
label B45 = "x"
label C45 = "x"
label E45 = "x"
leftstring A46 =  "placeholder"
label B46 = "09:50"
label C46 = "09:30"
label E46 = "x"
goto A14
movetosheet "Sheet1"
@andmarti1424
Copy link
Owner

log.txt

Confirmed. Your file is pretty simple. I still cannot figure it out why realloc .in growtbl() of src/vmtbl.c fails with your file

@andmarti1424
Copy link
Owner

the cell with this formula is related: let A40 = @sum(B40:ZZ40) is related

@andmarti1424
Copy link
Owner

@fg-charles btw may be you can try with this formula in A40:
=@sum(B40:@getent(40, @lastcol-1))

it should never crash with yours though

@andmarti1424 andmarti1424 changed the title Insert Column causes SegFault. Insert Column causes SegFault. - =@sum(B40:ZZ40) Feb 16, 2024
@fg-charles
Copy link
Author

Changing the formula fixes it. Thanks!

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

2 participants