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

compatibility with Go 1.5rc1 on darwin/amd64 #92

Closed
ericwq opened this issue Aug 7, 2015 · 7 comments
Closed

compatibility with Go 1.5rc1 on darwin/amd64 #92

ericwq opened this issue Aug 7, 2015 · 7 comments

Comments

@ericwq
Copy link

ericwq commented Aug 7, 2015

everything on go 1.4.2 is good. for 1.5rc1, the SetInputMode doesn't work.

in terminal.go:49, here is the function invocation:

termbox.SetInputMode(termbox.InputEsc | termbox.InputMouse)

--------------------------------------error messsage by go test------------------------------------
--- FAIL: TestTermboxImp (0.00s)
panic: runtime error: index out of range [recovered]
panic: runtime error: index out of range

goroutine 21 [running]:
testing.tRunner.func1(0xc8200be120)
/usr/local/go/src/testing/testing.go:450 +0x171
github.com/nsf/termbox-go.SetInputMode(0x5, 0x1)
/Users/ericwq/dev/go_works/src/github.com/nsf/termbox-go/api.go:384 +0x9d
ericwq/doctor/view.termboxImpl.SetInputMode(0x0, 0x0, 0x43cf78)
/Users/ericwq/dev/go_works/src/ericwq/doctor/view/terminal.go:49 +0x20
ericwq/doctor/view.(*termboxImpl).SetInputMode(0xc82009e580)
:5 +0xa1
ericwq/doctor/view.TestTermboxImp(0xc8200be120)
/Users/ericwq/dev/go_works/src/ericwq/doctor/view/terminal_test.go:28 +0x95
testing.tRunner(0xc8200be120, 0x55ce00)
/usr/local/go/src/testing/testing.go:456 +0x98
created by testing.RunTests
/usr/local/go/src/testing/testing.go:561 +0x86d

@nsf
Copy link
Owner

nsf commented Aug 7, 2015

Did you check termbox.Init() for error?

@nsf
Copy link
Owner

nsf commented Aug 7, 2015

Since you're on darwin, could be the same issue: #80

@ericwq
Copy link
Author

ericwq commented Aug 7, 2015

it's not the same problem as #80, it's only a problem on 1.5rc1. i am still try to find the reason.

@ericwq
Copy link
Author

ericwq commented Aug 7, 2015

it's fine for go 1.4.2.

@nsf
Copy link
Owner

nsf commented Aug 7, 2015

Well, maybe go 1.5 just does something differently when it comes to running stuff via go run or go test. Perhaps I could just add a dirty hack in a form of an alias: "dumb" -> "xterm". But I'm not sure about it.

@ericwq
Copy link
Author

ericwq commented Aug 8, 2015

don't cover the bug.

@ericwq
Copy link
Author

ericwq commented Aug 11, 2015

please close this issue, just report a bug golang/go#12096

@ericwq ericwq closed this as completed Aug 11, 2015
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