aaronjanse / 3mux

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

Alacritty, Kitty on Wayland #46

Closed hissssst closed 4 years ago

hissssst commented 4 years ago

1) Start kitty 2) $ 3mux 3) $ nvim

results in

Error during: pane.go (vt.ProcessStream)
runtime error: index out of range [0] with length 0
Tiling state: Universe[0](Workspace(HSplit[0](Term[104x56]*)))
goroutine 12 [running]:
runtime/debug.Stack(0x55efe8509bc0, 0xc000010018, 0xc000043ac0)
    runtime/debug/stack.go:24 +0x9f
main.fatalShutdownNow(0xc0001be000, 0x4e)
    github.com/aaronjanse/3mux/main.go:125 +0x16e
main.newTerm.func4.1()
    github.com/aaronjanse/3mux/pane.go:112 +0xb5
panic(0x55efe84f5860, 0xc0001a20e0)
    runtime/panic.go:969 +0x16a
github.com/aaronjanse/3mux/vterm.(*VTerm).handleSGR(0xc00021e160, 0xc00001cb34, 0xc)
    github.com/aaronjanse/3mux/vterm/sgr.go:19 +0x8b0
github.com/aaronjanse/3mux/vterm.(*VTerm).DispatchCsi(0xc00021e160)
    github.com/aaronjanse/3mux/vterm/states.go:316 +0xf51
github.com/aaronjanse/3mux/vterm.(*VTerm).StateCsiParam(0xc00021e160, 0x6d)
    github.com/aaronjanse/3mux/vterm/states.go:139 +0x12e
github.com/aaronjanse/3mux/vterm.(*VTerm).Anywhere(0xc00021e160, 0x10000006d)
    github.com/aaronjanse/3mux/vterm/states.go:73 +0x264
github.com/aaronjanse/3mux/vterm.(*VTerm).ProcessStream(0xc00021e160)
    github.com/aaronjanse/3mux/vterm/states.go:39 +0x3d
main.newTerm.func4(0xc00021e160)
    github.com/aaronjanse/3mux/pane.go:115 +0x4f
created by main.newTerm
    github.com/aaronjanse/3mux/pane.go:109 +0x1f7

Please submit a bug report with this stack trace to https://github.com/aaronjanse/3mux/issues
$ nvim --version
NVIM v0.4.3
$ kitty --version
kitty 0.17.2
$ sway --version
sway version 1.4

3mux version r223.f233c25

aaronjanse commented 4 years ago

Hmm, this seems to be the same error as https://github.com/aaronjanse/3mux/issues/25#issuecomment-614134806. I'll keep both issues open because I don't fully understand what's causing the stack trace.

I also just opened https://github.com/aaronjanse/3mux/issues/47 (this kind of error should not be fatal).

3mux version r223.f233c25

Oh whoa, how did you get this? Did you just do git log in your GOPATH or is there some way I could add a --version flag that prints the git commit?

hissssst commented 4 years ago

Oh whoa, how did you get this?

Arch Linux packet manager does this for all packages build from git

aaronjanse commented 4 years ago

Arch Linux packet manager does this for all packages build from git

Awesome!

I've reproduced this issueusing... a fuzzer! Turns out that the problem was that, when a escape code parameter couldn't be parsed into an integer, it was skipped. When no parameters were recognizable, we ended up with an empty list, causing this error.

A fix is in v0.2.0 on master :tada: