-
Notifications
You must be signed in to change notification settings - Fork 117
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
version 1.1.0: Segmentation fault panic #125
Comments
A few hours ago v1.1.0 released and now it breaks our builds. See: google/go-licenses#125
A few hours ago v1.1.0 released and now it breaks our builds. See: google/go-licenses#125 Co-authored-by: Viacheslav Sarzhan <slava.sarzhan@percona.com>
Thank you for the report! I guess I know the root cause Does it work with this?
|
Hmm, my guess was wrong. Can you share more about your project setup? Are you using GOPATH or go modules? |
I think I fixed it, but the error means that you might not be using go modules yet. You can try installing go-licenses from master by |
Released v1.1.1 with the fix: https://github.com/google/go-licenses/releases/tag/v1.1.1. |
fixed. thanks |
go-licenses check main.go
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x92f859]
goroutine 1 [running]:
github.com/google/go-licenses/licenses.Libraries.func1(0xc009f34140)
/home/ubuntu/work/pkg/mod/github.com/google/go-licenses@v1.1.0/licenses/library.go:100 +0x259
golang.org/x/tools/go/packages.Visit.func1(0xc009f34140)
/home/ubuntu/work/pkg/mod/golang.org/x/tools@v0.1.10/go/packages/visit.go:26 +0xaa
golang.org/x/tools/go/packages.Visit({0xc003ea5b50, 0x1, 0x1?}, 0xc009d1b850, 0x0)
/home/ubuntu/work/pkg/mod/golang.org/x/tools@v0.1.10/go/packages/visit.go:43 +0x10e
github.com/google/go-licenses/licenses.Libraries({0x134b2a8?, 0xc00011c000?}, {0x1344960, 0xc003ea55a8}, {0xc0002b0ce0?, 0xc00035fd68?, 0xc00035fd90?})
/home/ubuntu/work/pkg/mod/github.com/google/go-licenses@v1.1.0/licenses/library.go:76 +0x22c
main.checkMain(0x16d44e0?, {0xc0002b0ce0, 0x1, 0x1})
/home/ubuntu/work/pkg/mod/github.com/google/go-licenses@v1.1.0/check.go:47 +0x8e
github.com/spf13/cobra.(*Command).execute(0x16d44e0, {0xc0002b0cc0, 0x1, 0x1})
/home/ubuntu/work/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:856 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0x16d4260)
/home/ubuntu/work/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:974 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
/home/ubuntu/work/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:902
main.main()
/home/ubuntu/work/pkg/mod/github.com/google/go-licenses@v1.1.0/main.go:72 +0x85
The text was updated successfully, but these errors were encountered: