readline
readline copied to clipboard
Panic when attempting password prompt in examples.
I get the same panic when trying to run. I have tried in go versions 1.7.4, 1.8.1, and 1.9.2
it seems to be an issue in the master branch. the v1.4 tag works.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x4c83e1]
goroutine 1 [running]:
github.com/chzyer/readline.(*RuneBuffer).output(0xc4203d0000, 0x0, 0xc4202e3c98, 0x4c95fc)
/home/xuu/Documents/go/src/github.com/chzyer/readline/runebuf.go:494 +0xd1
github.com/chzyer/readline.(*RuneBuffer).print(0xc4203d0000)
/home/xuu/Documents/go/src/github.com/chzyer/readline/runebuf.go:475 +0x2b
github.com/chzyer/readline.(*RuneBuffer).Refresh(0xc4203d0000, 0x0)
/home/xuu/Documents/go/src/github.com/chzyer/readline/runebuf.go:465 +0xb2
github.com/chzyer/readline.(*Operation).Runes(0xc4202c2000, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/xuu/Documents/go/src/github.com/chzyer/readline/operation.go:388 +0xf9
github.com/chzyer/readline.(*Operation).Slice(0xc4202c2000, 0x56d740, 0xc42007c370, 0x0, 0x0, 0xc4202c2000)
/home/xuu/Documents/go/src/github.com/chzyer/readline/operation.go:429 +0x2f
github.com/chzyer/readline.(*Operation).PasswordWithConfig(0xc4202c2000, 0xc42009e360, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/xuu/Documents/go/src/github.com/chzyer/readline/operation.go:417 +0xb5
github.com/chzyer/readline.(*Instance).ReadPasswordWithConfig(0xc4200961a0, 0xc42009e360, 0xc4200961a0, 0x0, 0x0, 0x0, 0xc420043f70)
/home/xuu/Documents/go/src/github.com/chzyer/readline/readline.go:224 +0x39
main.main()
/home/xuu/Documents/go/src/github.com/chzyer/readline/example/readline-pass-strength/readline-pass-strength.go:96 +0x218