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

ng panics on interrupts #224

Open
vmarkovtsev opened this issue Jan 21, 2018 · 0 comments
Open

ng panics on interrupts #224

vmarkovtsev opened this issue Jan 21, 2018 · 0 comments

Comments

@vmarkovtsev
Copy link

I run the following code:

#!ng

import "encoding/csv"
import "os"

csv.NewReader(os.Stdin)

and press "Ctrl-C" having launched the script and before it prints

&csv.Reader{
	Comma: int32(44),
	r: unexported,
}

I get

ng: neugram panic: gotool: [build -buildmode=plugin ng-plugin-encoding_csv-0.go]: signal: interrupt

ng eval panic: reflect: call of reflect.Value.Type on zero Value
goroutine 1 [running]:
runtime/debug.Stack(0x41, 0x0, 0x0)
	/usr/lib/go-1.9/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
	/usr/lib/go-1.9/src/runtime/debug/stack.go:16 +0x22
neugram.io/ng/eval.(*Program).Eval.func1(0xc4200fc200, 0xc4202e9790, 0xc4202e9778)
	/home/vadim/Projects/go_unix/src/neugram.io/ng/eval/eval.go:476 +0x204
panic(0xbb0f60, 0xc42038f600)
	/usr/lib/go-1.9/src/runtime/panic.go:491 +0x283
reflect.Value.Type(0x0, 0x0, 0x0, 0xc42038f5e0, 0x1)
	/usr/lib/go-1.9/src/reflect/value.go:1694 +0x1a3
neugram.io/ng/eval.(*Program).prepCall(0xc4200fc200, 0xc42037b1d0, 0xc4202e82d0, 0x4, 0x6, 0x1, 0x2, 0x0)
	/home/vadim/Projects/go_unix/src/neugram.io/ng/eval/eval.go:1381 +0x199
neugram.io/ng/eval.(*Program).evalExpr(0xc4200fc200, 0x1159c80, 0xc42037b1d0, 0x0, 0x0, 0x0)
	/home/vadim/Projects/go_unix/src/neugram.io/ng/eval/eval.go:1492 +0x440c
neugram.io/ng/eval.(*Program).evalStmt(0xc4200fc200, 0x115a640, 0xc42006fef0, 0x0, 0x0, 0x0)
	/home/vadim/Projects/go_unix/src/neugram.io/ng/eval/eval.go:885 +0x4655
neugram.io/ng/eval.(*Program).Eval(0xc4200fc200, 0x115a640, 0xc42006fef0, 0xc4201440c0, 0x0, 0x0, 0x0, 0x11535c0, 0xc4200e87e0)
	/home/vadim/Projects/go_unix/src/neugram.io/ng/eval/eval.go:497 +0x38c
main.handleResult(0x1, 0xc4200e8790, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/vadim/Projects/go_unix/src/neugram.io/ng/ng.go:393 +0x7ff
main.runFile(0xc4201020a8, 0x7, 0xc4201020a8, 0x0)
	/home/vadim/Projects/go_unix/src/neugram.io/ng/ng.go:286 +0x2b5
main.main()
	/home/vadim/Projects/go_unix/src/neugram.io/ng/ng.go:131 +0x4b2
ng: ng eval panic: reflect: call of reflect.Value.Type on zero Value
go version

go version go1.9.2 linux/amd64
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

1 participant