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

panic: invalid arguments #88

Open
hackeryarn opened this issue Mar 13, 2017 · 15 comments
Open

panic: invalid arguments #88

hackeryarn opened this issue Mar 13, 2017 · 15 comments
Labels

Comments

@hackeryarn
Copy link

I am getting the below error when trying to run wuzz with no arguments. I am using ubuntu bash on windows to run this.

2017/03/12 21:15:06 invalid argument
panic: invalid argument


goroutine 1 [running]:
panic(0x6fed00, 0xc42000d3e0)
        /usr/local/go/src/runtime/panic.go:500 +0x1a1
log.Panicln(0xc420051e60, 0x1, 0x1)
        /usr/local/go/src/log/log.go:334 +0xc9
main.main()
        /home/achernyak/go/src/github.com/asciimoo/wuzz/wuzz.go:1594 +0xf8c
@Benaiah
Copy link
Contributor

Benaiah commented Mar 13, 2017

@achernyak what's your Go version?

@Benaiah Benaiah added the bug label Mar 13, 2017
@hackeryarn
Copy link
Author

I was originally on 1.7.4 then I tried upgrading to 1.8.0 and still the same exact error.

@asciimoo
Copy link
Owner

@achernyak what is your operating system/terminal? Seems gocui cannot start in 256 color mode.

@hackeryarn
Copy link
Author

hackeryarn commented Mar 13, 2017

@asciimoo I am on windows 10 running Bash on Ubuntu on Windows. It seems that they do have 256 color support and my terminal is identified as xterm-256color by default. I do believe this is a platform specific issue since it works everywhere else. So might be worth just putting in a note about support.

@asciimoo
Copy link
Owner

@achernyak could you confirm that fa4c1e8 solves the problem?

@hackeryarn
Copy link
Author

Thanks for the really quick work around on this. However, it looks like there is still an error further down the code. The error moved now.

panic: invalid argument


goroutine 1 [running]:
log.Panicln(0xc420055ec0, 0x1, 0x1)
        /usr/local/go/src/log/log.go:336 +0xc0
main.main()
        /home/achernyak/go/src/github.com/asciimoo/wuzz/wuzz.go:1624 +0xe13

@asciimoo
Copy link
Owner

So the problem isn't the 256 color mode.. strange..

@hackeryarn
Copy link
Author

@asciimoo It is still getting thrown in the same expression actually. OutputNormal seems to be throwing too. I was trying to set it to OutputGrayscale which seems to be supported by termbox which is used by gocui but gocui doesn't export it as an options.

@asciimoo
Copy link
Owner

asciimoo commented Mar 14, 2017

@achernyak does OutputGrayscale work in your terminal?

@hackeryarn
Copy link
Author

@asciimoo no still no luck with it. I was not able to get it to set to OutputGrayscale looks like gocui only supports OutputNormal and Output256.

@asciimoo
Copy link
Owner

@achernyak you can cast it to the correct type:

g, err = gocui.NewGui(gocui.OutputMode(termbox.OutputGrayscale))

@asciimoo
Copy link
Owner

@achernyak could you test e6f5674 ?

@hackeryarn
Copy link
Author

@asciimoo unfortunates it looks like I am still getting a panic there...

2017/03/14 06:49:12 invalid argument
panic: invalid argument


goroutine 1 [running]:
log.Panicln(0xc420055ec0, 0x1, 0x1)
        /usr/local/go/src/log/log.go:336 +0xc0
main.main()
        /home/achernyak/go/src/github.com/asciimoo/wuzz/wuzz.go:1630 +0x811

@asciimoo
Copy link
Owner

Hmm, then, the problem isn't the color mode..

@dimakogan
Copy link

I ran into a similar issue while working with gocui on WSL Bash on Windows.
I think the root cause might be: microsoft/WSL#601

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants