nelsam/vidar

Unexpected panic while executing bindable *command.Cut

Kvaz1r opened this issue · 1 comments

Description

Unexpected getting such error:
panic while executing bindable *command.Cut: runtime error: slice bounds out of range

Steps to reproduce

I'll update the issue if will found the way.

Stack trace

2019/06/29 21:00:23 ERR: panic while executing bindable *command.Cut: runtime er
ror: slice bounds out of range
2019/06/29 21:00:23 Stack trace:
goroutine 19 [running]:
runtime/debug.Stack(0xb7fa70, 0x2a, 0xc0428b2fa0)
E:/go/src/runtime/debug/stack.go:24 +0xae
github.com/nelsam/vidar/commander.(*Commander).Execute.func1(0xf51300, 0xc042677
ef0)
E:/gopath/src/github.com/nelsam/vidar/commander/commander.go:335 +0xd7
panic(0xa97c80, 0xfca790)
E:/go/src/runtime/panic.go:491 +0x291
github.com/nelsam/vidar/command/input.(*Handler).Apply(0xc0422f6280, 0xf5b3a0, 0
xc042045c00, 0xc0422100e0, 0x2, 0x2)
E:/gopath/src/github.com/nelsam/vidar/command/input/handler.go:138 +0x9d
3
github.com/nelsam/vidar/command.(*Cut).removeSelections(0xc042677ef0)
E:/gopath/src/github.com/nelsam/vidar/command/copy_paste.go:124 +0x48e
github.com/nelsam/vidar/command.(*Cut).Exec(0xc042677ef0, 0xb36c60, 0xc0420026c0
)
E:/gopath/src/github.com/nelsam/vidar/command/copy_paste.go:110 +0xd7
github.com/nelsam/vidar/commander.(*Commander).Execute(0xc04202f180, 0xf51300, 0
xc042677ef0)
E:/gopath/src/github.com/nelsam/vidar/commander/commander.go:351 +0x37e
github.com/nelsam/vidar/commander.(*Commander).KeyPress(0xc04202f180, 0x2a, 0x2,
0xf60b00)
E:/gopath/src/github.com/nelsam/vidar/commander/commander.go:297 +0x1a5
github.com/nelsam/gxui.(*KeyboardController).keyPress(0xc042030550, 0x2a, 0x2)
E:/gopath/src/github.com/nelsam/gxui/keyboard_controller.go:42 +0xbb
github.com/nelsam/gxui.(*KeyboardController).keyDown(0xc042030550, 0x2a, 0x2)
E:/gopath/src/github.com/nelsam/gxui/keyboard_controller.go:28 +0xda
github.com/nelsam/gxui.(*KeyboardController).(github.com/nelsam/gxui.keyDown)-fm
(0x2a, 0x2)
E:/gopath/src/github.com/nelsam/gxui/keyboard_controller.go:15 +0x45
reflect.Value.call(0xa1cc40, 0xc042030560, 0x13, 0xb5a330, 0x4, 0xc0425cb960, 0x
1, 0x1, 0xb3fd60, 0xacdc40, ...)
E:/go/src/reflect/value.go:434 +0x90c
reflect.Value.Call(0xa1cc40, 0xc042030560, 0x13, 0xc0425cb960, 0x1, 0x1, 0xc0422
fc3c0, 0xc04278e6f0, 0x1)
E:/go/src/reflect/value.go:302 +0xab
github.com/nelsam/gxui.(*EventBase).InvokeListeners(0xc0422fc3c0, 0xc04278e6e0,
0x1, 0x1)
E:/gopath/src/github.com/nelsam/gxui/event_base.go:140 +0x2c6
github.com/nelsam/gxui.(*EventBase).Fire(0xc0422fc3c0, 0xc04278e6e0, 0x1, 0x1)
E:/gopath/src/github.com/nelsam/gxui/event_base.go:190 +0x7c
github.com/nelsam/gxui/mixins.(*Window).setViewport.func9(0x2a, 0x2)
E:/gopath/src/github.com/nelsam/gxui/mixins/window.go:386 +0xd1
reflect.Value.call(0xa1cc40, 0xc0420307d0, 0x13, 0xb5a330, 0x4, 0xc0425cb920, 0x
1, 0x1, 0xb3fd60, 0xacdc40, ...)
E:/go/src/reflect/value.go:434 +0x90c
reflect.Value.Call(0xa1cc40, 0xc0420307d0, 0x13, 0xc0425cb920, 0x1, 0x1, 0xc0428
b3f40, 0x404c83, 0xc04207a180)
E:/go/src/reflect/value.go:302 +0xab
github.com/nelsam/gxui.(*EventBase).InvokeListeners(0xc042216638, 0xc04278e020,
0x1, 0x1)
E:/gopath/src/github.com/nelsam/gxui/event_base.go:140 +0x2c6
github.com/nelsam/gxui.(*ChanneledEvent).Fire.func1()
E:/gopath/src/github.com/nelsam/gxui/channeled_event.go:40 +0x6f
github.com/nelsam/gxui/drivers/gl.(*driver).applicationLoop(0xc042086730)
E:/gopath/src/github.com/nelsam/gxui/drivers/gl/driver.go:141 +0x2b
created by github.com/nelsam/gxui/drivers/gl.StartDriver
E:/gopath/src/github.com/nelsam/gxui/drivers/gl/driver.go:84 +0x3bf

I close it as not reproducible.