-
Notifications
You must be signed in to change notification settings - Fork 57
panic when exec trash #22
Comments
@nange Does the panic occur with the latest release? (v0.2.0) |
@imikushin And I also test with the latest release(v0.2.0) today, below is the result: goroutine 1 [running]: |
Hi, I believe this is the same issue I encountered, PR #26 on the way. |
@karlmutch Yeah, looks like it's the same. @nange Can you try to move the project to a directory which would be the project's root package name prepended with That should help with the panic until there's a better fix. |
@nange Actually, trash expects the project's root package be something like Thanks for revealing this wrong assumption, btw! It should work for most people, but not for all, unfortunately. |
@imikushin thanks for the help, now it works. I love the idea of trash, and expect it becomes better. |
@karlmutch Yes, that's it. PR #26 can suppress the panic. |
@nange Can you check if the issue is still present (in master)? Feel free to close if it's been resolved ;) |
This issue has been resolved. close it. |
trash.yml:
exec trash cmd, panic occured:
root@0ad3b076d0bb:~/test_trash# trash
INFO[0000] Trash! Reading file: 'trash.yml'
INFO[0000] Preparing cache for 'github.com/Sirupsen/logrus'
INFO[0009] Preparing cache for 'github.com/codegangsta/cli'
INFO[0024] Preparing cache for 'github.com/cloudfoundry-incubator/candiedyaml'
INFO[0031] Checking out 'github.com/Sirupsen/logrus', commit: 'v0.8.7'
INFO[0031] Checking out 'github.com/codegangsta/cli', commit: 'b5232bb2934f606f9f27a1305f1eea224e8e8b88'
INFO[0031] Checking out 'github.com/cloudfoundry-incubator/candiedyaml', commit: '55a459c2d9da2b078f0725e5fb324823b2c71702'
INFO[0031] Copying deps...
INFO[0031] Copying deps... Done
INFO[0031] removing '/root/test_trash/vendor/github.com/Sirupsen/logrus/.git
INFO[0031] removing '/root/test_trash/vendor/github.com/cloudfoundry-incubator/candiedyaml/.git
INFO[0031] removing '/root/test_trash/vendor/github.com/codegangsta/cli/.git
INFO[0031] Collecting packages in 'test_trash'
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x20 pc=0x40a98e]
/usr/local/go/src/runtime/panic.go:481 +0x3e6
main.listPackages.func1(0xc82000e02a, 0xa, 0x0, 0x0, 0x7f8d245902a8, 0xc820105200, 0x0, 0x0)
panic(0x/root/gopath/src/github.com/rancher/trash/trash.go:370 +0x4e
path/fil/usr/local/go/src/path/filepath/path.go:394 +0xa50x0)
main.lis/root/gopath/src/github.com/rancher/trash/trash.go:386 +0x9f
main.col/root/gopath/src/github.com/rancher/trash/trash.go:394 +0x187
main.cle/root/gopath/src/github.com/rancher/trash/trash.go:515 +0x49b
main.run/root/gopath/src/github.com/rancher/trash/trash.go:108 +0x626
main.mai/root/gopath/src/github.com/rancher/trash/trash.go:61 +0x21
github.c/root/gopath/src/github.com/rancher/trash/vendor/github.com/codegangsta/cli/app.go:132 +0xadb, 0x1, 0x0, 0x0)
main.mai/root/gopath/src/github.com/rancher/trash/trash.go:64 +0x6e6
go env:
root@0ad3b076d0bb:~/test_trash# go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/gopath"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
go version:
root@0ad3b076d0bb:~/test_trash# go version
go version go1.6.2 linux/amd64
The text was updated successfully, but these errors were encountered: