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

ubuntu14.04(windows subsystem) panic: invalid argument #37

Open
al123xiaaaa opened this issue Dec 6, 2016 · 7 comments
Open

ubuntu14.04(windows subsystem) panic: invalid argument #37

al123xiaaaa opened this issue Dec 6, 2016 · 7 comments

Comments

@al123xiaaaa
Copy link

just copy and paste the simple json example2 in ubuntu14.04(windows subsystem)

al123xiaaaa@HASEE-PC:/jid$ ls -l
total 3584
-rwxrwxrwx 1 al123xiaaaa al123xiaaaa 3044060 Dec 6 23:17 jid_linux_amd64
al123xiaaaa@HASEE-PC:
/jid$ echo '{"info":{"date":"2016-10-23","version":1.0},"users":[{"name":"simeji","uri":"https://github.com/simeji","id":1},{"name":"simeji2","uri":"https://example.com/simeji","id":2},{"name":"simeji3","uri":"https://example.com/simeji3","id":3}],"userCount":3}}'| ./jid_linux_amd64
panic: invalid argument

goroutine 1 [running]:
panic(0x514ee0, 0xc42000a7d0)
/usr/local/Cellar/go/1.7.1/libexec/src/runtime/panic.go:500 +0x1a1
github.com/simeji/jid.(*Engine).Run(0xc4200b6000, 0x0, 0x0)
/Users/ts/go/src/github.com/simeji/jid/engine.go:87 +0x7f3
main.run(0x5babe0, 0xc4200b6000, 0x534000, 0x1)
/Users/ts/go/src/github.com/simeji/jid/cmd/jid/jid.go:36 +0x49
main.main()
/Users/ts/go/src/github.com/simeji/jid/cmd/jid/jid.go:31 +0x10f

@simeji
Copy link
Owner

simeji commented Dec 7, 2016

What was happen?

@al123xiaaaa al123xiaaaa reopened this Dec 7, 2016
@al123xiaaaa
Copy link
Author

Sorry,I haven't solved this problem yet.I'm used jid(amd64) in Ubuntu14.04(Windows Subsystem for Linux).

al123xiaaaa@HASEE-PC:~/jid$ uname -a
Linux HASEE-PC 3.4.0+ #1 PREEMPT Thu Aug 1 17:06:05 CST 2013 x86_64 x86_64 x86_64 GNU/Linux

al123xiaaaa@HASEE-PC:~/jid$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty

@dao
Copy link

dao commented Jan 30, 2017

jid also crashes for me under Bash WSL. i first installed the latest (just now) x64 release from zip. after that failed, i compiled from source (per 'Build' in README.md). this also fails. the build was quiet.

i executed go test and it passed:
:/mnt/c/projects/go/src/github.com/simeji/jid$ go test PASS ok github.com/simeji/jid 0.084s

:~$ echo '{"aa":"2AA2","bb":{"aaa":[123,"cccc",[1,2]],"c":321}}'| jid
panic: invalid argument

goroutine 1 [running]:
panic(0x59d340, 0xc82000a850)
        /usr/local/go/src/runtime/panic.go:464 +0x3e6
github.com/simeji/jid.(*Engine).Run(0xc8200da000, 0x0, 0x0)
        /mnt/c/projects/go/src/github.com/simeji/jid/engine.go:91 +0x94
main.run(0x7fef99524490, 0xc8200da000, 0xc820041f00, 0x7fef99524490)
        /mnt/c/projects/go/src/github.com/simeji/jid/cmd/jid/jid.go:59 +0x39
main.main()
        /mnt/c/projects/go/src/github.com/simeji/jid/cmd/jid/jid.go:54 +0x73a

@jenciso
Copy link

jenciso commented Oct 19, 2017

Same problem using WSL

jenciso@TEC1971:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
jenciso@TEC1971:~$
jenciso@TEC1971:~$ echo '{"aa":"2AA2","bb":{"aaa":[123,"cccc",[1,2]],"c":321}}'| jid                   
panic: invalid argument

goroutine 1 [running]:
panic(0x51fd20, 0xc42000a840)
        /goroot/src/runtime/panic.go:500 +0x1a1
github.com/simeji/jid.(*Engine).Run(0xc4200ba000, 0x0, 0x0)
        /gopath/src/github.com/simeji/jid/engine.go:91 +0x97d
main.run(0x5cac60, 0xc4200ba000, 0xc420037f00, 0x5cac60)
        /go/cmd/jid/jid.go:59 +0x49
main.main()
        /go/cmd/jid/jid.go:54 +0x2ea
jenciso@TEC1971:~$

@jenciso
Copy link

jenciso commented Oct 21, 2017

I upgrade my WSL, but the problem is there yet

jenciso@dellPE:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"
jenciso@dellPE:~$ jid --version
jid version v0.7.2
jenciso@dellPE:~$ echo '{"aa":"2AA2","bb":{"aaa":[123,"cccc",[1,2]],"c":321}}'| jid
panic: invalid argument

goroutine 1 [running]:
panic(0x51fd20, 0xc42000a820)
        /goroot/src/runtime/panic.go:500 +0x1a1
github.com/simeji/jid.(*Engine).Run(0xc4200d8000, 0x0, 0x0)
        /gopath/src/github.com/simeji/jid/engine.go:91 +0x97d
main.run(0x5cac60, 0xc4200d8000, 0xc42003bf00, 0x5cac60)
        /go/cmd/jid/jid.go:59 +0x49
main.main()
        /go/cmd/jid/jid.go:54 +0x2ea
jenciso@dellPE:~$ 

@spex66
Copy link

spex66 commented Apr 9, 2018

Just run into this Panic as well on WSL.

This traceback points to a problem with the termbox-go dependency.

/gopath/src/github.com/simeji/jid/engine.go:91

==> err := termbox.Init()

And following problems with termbox-go you will find missing support of WSL for

WSL does not current support signal driven IO on tty devices, but we are tracking the work
(microsoft/WSL#601)

So this is not a native jid issue.

It is a pity, because I would like to get this interactive bash jq interpreter to work :)
And not having to switch to https://jqplay.org/ for testing.
(=PA=)

@basbossink
Copy link

Maybe as a consolation/work-around jid does appear to function correctly using the _amd64 binary in the new in preview Windows Terminal \o/

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

6 participants