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

glide tree error "panic: runtime error: invalid memory address or nil pointer dereference" #440

Closed
gubei opened this issue May 24, 2016 · 2 comments

Comments

@gubei
Copy link

gubei commented May 24, 2016

When using glide tree to print dependency tree , I found a error.

| |-- github.com/go-sql-driver/mysql (/home/gubei/gocode/src/github.com/xiaohuanggua/virgin/vendor/github.com/go-sql-driver/mysql)
| | |-- appengine/cloudsql ()
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x20 pc=0x4e2233]

goroutine 1 [running]:
panic(0x945080, 0xc82000e170)
/usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:464 +0x3e6
github.com/Masterminds/glide/dependency.srcDir(0x0, 0x0, 0xc81ffea1e0)
/Users/mfarina/Code/go/src/github.com/Masterminds/glide/dependency/resolver.go:927 +0x33
github.com/Masterminds/glide/dependency.IsSrcDir(0x0, 0x0, 0xc81ffea1e0)
/Users/mfarina/Code/go/src/github.com/Masterminds/glide/dependency/resolver.go:923 +0x2b
github.com/Masterminds/glide/tree.walkDeps.func1(0x0, 0x0, 0x0, 0x0, 0x7fa5ea9a1608, 0xc8202bc3f0, 0x0, 0x0)
/Users/mfarina/Code/go/src/github.com/Masterminds/glide/tree/tree.go:48 +0x92
path/filepath.Walk(0x0, 0x0, 0xc8201ccac8, 0x0, 0x0)
/usr/local/Cellar/go/1.6/libexec/src/path/filepath/path.go:394 +0x

my os system is fedora linux .

thank you for helping.

@abhin4v
Copy link
Contributor

abhin4v commented Aug 10, 2016

I get the same error on OSX 10.10.5:

$ ~/.gocode/src/github.com/Masterminds/glide/glide tree
[... some output ...]
goroutine 1 [running]:
panic(0x5723a0, 0xc8200120e0)
        /usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:464 +0x3e6
github.com/Masterminds/glide/dependency.srcDir(0x0, 0x0, 0xc81ffe5553)
        /Users/abhinav/.gocode/src/github.com/Masterminds/glide/dependency/resolver.go:1035 +0x33
github.com/Masterminds/glide/dependency.IsSrcDir(0x0, 0x0, 0xc8201060b9)
        /Users/abhinav/.gocode/src/github.com/Masterminds/glide/dependency/resolver.go:1031 +0x2b
github.com/Masterminds/glide/tree.walkDeps.func1(0x0, 0x0, 0x0, 0x0, 0xd18888, 0xc820355590, 0x0, 0x0)
        /Users/abhinav/.gocode/src/github.com/Masterminds/glide/tree/tree.go:48 +0x95
path/filepath.Walk(0x0, 0x0, 0xc8201cc3a8, 0x0, 0x0)
        /usr/local/Cellar/go/1.6/libexec/src/path/filepath/path.go:394 +0xa5
github.com/Masterminds/glide/tree.walkDeps(0xc82018cc30, 0x0, 0x0, 0xc8202ace21, 0x12, 0x0, 0x0, 0x0)
        /Users/abhinav/.gocode/src/github.com/Masterminds/glide/tree/tree.go:93 +0xc0
github.com/Masterminds/glide/tree.Display(0xc82018cc30, 0x0, 0x0, 0xc8202ace21, 0x12, 0x7, 0x0, 0xc820355410)
        /Users/abhinav/.gocode/src/github.com/Masterminds/glide/tree/tree.go:19 +0x77
github.com/Masterminds/glide/tree.Display(0xc82018cc30, 0xc820356000, 0x6d, 0xc820290d81, 0x1f, 0x6, 0x0, 0xc820354120)
        /Users/abhinav/.gocode/src/github.com/Masterminds/glide/tree/tree.go:40 +0x846
github.com/Masterminds/glide/tree.Display(0xc82018cc30, 0xc82028e5b0, 0x6d, 0xc8201332f1, 0x1f, 0x5, 0x0, 0xc820290720)
        /Users/abhinav/.gocode/src/github.com/Masterminds/glide/tree/tree.go:40 +0x846
github.com/Masterminds/glide/tree.Display(0xc82018cc30, 0xc820010d70, 0x4d, 0xc8201d7e41, 0x32, 0x4, 0x0, 0xc820132750)
        /Users/abhinav/.gocode/src/github.com/Masterminds/glide/tree/tree.go:40 +0x846
github.com/Masterminds/glide/tree.Display(0xc82018cc30, 0xc820010820, 0x4b, 0xc82026ac41, 0x30, 0x3, 0x0, 0xc8201b1020)
        /Users/abhinav/.gocode/src/github.com/Masterminds/glide/tree/tree.go:40 +0x846
github.com/Masterminds/glide/tree.Display(0xc82018cc30, 0xc820270ae0, 0x51, 0xc820189681, 0x36, 0x2, 0x0, 0xc820257620)
        /Users/abhinav/.gocode/src/github.com/Masterminds/glide/tree/tree.go:40 +0x846
github.com/Masterminds/glide/tree.Display(0xc82018cc30, 0xc8200100a4, 0x46, 0xc82019815b, 0x2b, 0x1, 0xc820182f00, 0xc8201b0660)
        /Users/abhinav/.gocode/src/github.com/Masterminds/glide/tree/tree.go:40 +0x846
github.com/Masterminds/glide/action.Tree(0xc8200100a4, 0x46, 0xc82018e500)
        /Users/abhinav/.gocode/src/github.com/Masterminds/glide/action/tree.go:32 +0x385
main.commands.func14(0xc82018e500)
        /Users/abhinav/.gocode/src/github.com/Masterminds/glide/glide.go:619 +0x31
github.com/Masterminds/glide/vendor/github.com/codegangsta/cli.Command.Run(0x6186e8, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6c0ac0, 0x37, 0x0, ...)
        /Users/abhinav/.gocode/src/github.com/Masterminds/glide/vendor/github.com/codegangsta/cli/command.go:179 +0x1399
github.com/Masterminds/glide/vendor/github.com/codegangsta/cli.(*App).Run(0xc8200a5080, 0xc82000a220, 0x2, 0x2, 0x0, 0x0)
        /Users/abhinav/.gocode/src/github.com/Masterminds/glide/vendor/github.com/codegangsta/cli/app.go:196 +0x137c
main.main()
        /Users/abhinav/.gocode/src/github.com/Masterminds/glide/glide.go:122 +0x750

@mattfarina
Copy link
Member

Fixed by #544

mattfarina added a commit that referenced this issue Aug 11, 2016
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

3 participants