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

support go modules, panic: runtime error: invalid memory address or nil pointer dereference #195

Open
lenghan4real opened this issue Aug 3, 2020 · 1 comment

Comments

@lenghan4real
Copy link

go mod with dependency like golang.org/x/unix

[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x11d225d]

goroutine 59 [running]:
go/ast.Walk(0x16aca80, 0xc010629260, 0x16afa60, 0x0)
/Users/han/.gvm/gos/go1.13.5/src/go/ast/walk.go:224 +0x1b4d
go/ast.Inspect(...)
/Users/han/.gvm/gos/go1.13.5/src/go/ast/walk.go:385
github.com/revel/cmd/parser2.(*SourceInfoProcessor).getValidation(0xc000010040, 0xc0172e4ff0, 0xc013db7000, 0xc014a0c940)
/workspace/revel_cmd/parser2/source_info_processor.go:114 +0x15f

@notzippy
Copy link
Contributor

notzippy commented Aug 7, 2020

Can you give a short example? I tried a controller like this and was able to compile without issues

package controllers

import (
	"github.com/revel/revel"
	"golang.org/x/sys/unix"
	"os"
)

type App struct {
	*revel.Controller
}

func (c App) Index() revel.Result {
	unix.Exec("/bin/ls", []string{"ls", "-al"}, os.Environ())
	return c.Render()
}

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