aaronjanse / 3mux

Terminal multiplexer inspired by i3
MIT License
1.82k stars 45 forks source link

index out of range when trying to split vertically #68

Closed talentlessguy closed 3 years ago

talentlessguy commented 4 years ago

When I hit ctrl + b + shift + ' (e.g. ctrl + b + ") I get this stacktrace:

goroutine 1 [running]:                                                                                                                                                                        
runtime/debug.Stack(0x642e00, 0xc000010020, 0xc0000a95e8)                                                                                                                                     
        /home/v1rtl/.go/src/runtime/debug/stack.go:24 +0x9d                                                                                                                                   
main.main.func1(0xc0000a9dc8)                                                                                                                                                                 
        /home/v1rtl/go/src/github.com/aaronjanse/3mux/main.go:65 +0xd6                                                                                                                        
panic(0x5eb200, 0xc000018420)                                                                                                                                                                 
        /home/v1rtl/.go/src/runtime/panic.go:975 +0x3e3                                                                                                                                       
github.com/aaronjanse/3mux/wm.(*split).refreshRenderRect(0xc00009a300, 0x0)                                                                                                                   
        /home/v1rtl/go/src/github.com/aaronjanse/3mux/wm/split.go:126 +0x27c                                                                                                                  
github.com/aaronjanse/3mux/wm.(*split).SetRenderRect(...)                                                                                                                                     
        /home/v1rtl/go/src/github.com/aaronjanse/3mux/wm/split.go:88                                                                                                                          
github.com/aaronjanse/3mux/wm.(*workspace).setRenderRect(0xc00005a6c0, 0x0, 0x0, 0xbe, 0x28)                                                                                                  
        /home/v1rtl/go/src/github.com/aaronjanse/3mux/wm/workspace.go:42 +0xcb                                                                                                                
github.com/aaronjanse/3mux/wm.(*Universe).refreshRenderRect(0xc00005a660)                                                                                                                     
        /home/v1rtl/go/src/github.com/aaronjanse/3mux/wm/universe.go:102 +0xcb                                                                                                                
github.com/aaronjanse/3mux/wm.(*Universe).AddPaneTmux(0xc00005a660, 0xc0000a9900, 0xc000073380, 0x6032c7)                                                                                     
        /home/v1rtl/go/src/github.com/aaronjanse/3mux/wm/pane-add.go:62 +0xac                                                                                                                 
github.com/aaronjanse/3mux/wm.glob..func3(0xc00005a660)                                                                                                                                       
        /home/v1rtl/go/src/github.com/aaronjanse/3mux/wm/tiling.go:69 +0x30                                                                                                                   
main.seiveConfigEvents(0xc0000714d0, 0xc000071500, 0xc0000716b0, 0xc000071560, 0x100, 0xc00005a660, 0x771b62, 0x1, 0x60e400)                                                                  
        /home/v1rtl/go/src/github.com/aaronjanse/3mux/config.go:184 +0x2ed                                                                                                                    
main.main()                                                                                                                                                                                   
        /home/v1rtl/go/src/github.com/aaronjanse/3mux/main.go:145 +0xcdf                                                                                                                      

BEFORE `Universe[0](Workspace(VSplit[1](Term[0,0 190x40], Term[0,21 190x19]*)))`  

It happens ocassionaly on vertical split

here's my system info

uname -r: 5.4.0-29-generic go version: go version go1.14.3 linux/amd64

aaronjanse commented 4 years ago

I should have a fix soon

aaronjanse commented 4 years ago

I could not reproduce this manually. However, I have a fuzzer to test the window manager. It got this error while fuzzing window operations concurrently, so I updated the window manager to be concurrency-safe.

@talentlessguy Would you mind updating to v1.0.0 to check if 3mux still has this issue?

talentlessguy commented 4 years ago

@aaronjanse I wrote down in another issue (https://github.com/aaronjanse/3mux/issues/69) that I can't make 1.0.0 work :(

aaronjanse commented 4 years ago

@talentlessguy Thank you!

PotatoParser commented 3 years ago

Hopefully, this issue is fixed with v1.1.0. Does the vertical split still cause an issue in that version? @talentlessguy

talentlessguy commented 3 years ago

It's fixed now, thanks!