x-formation / pulsekit

Command line client for Zutubi Pulse server.
MIT License
4 stars 3 forks source link

panic: runtime error: invalid memory address or nil pointer dereference #25

Open rjeczalik opened 9 years ago

rjeczalik commented 9 years ago
~ $ pulsecli status
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x80 pc=0x435fd5]

goroutine 16 [running]:
runtime.panic(0x7c64a0, 0xa34fb3)
    /home/rjeczalik/.gvm/gos/go1.3.3/src/pkg/runtime/panic.c:279 +0xf5
github.com/x-formation/pulsekit/cli.(*CLI).init(0xc2080f4000, 0xc2080f4180, 0x0, 0x0)
    /tmp/gobin497561534/src/github.com/x-formation/pulsekit/cli/cli.go:271 +0x825
github.com/x-formation/pulsekit/cli.(*CLI).Status(0xc2080f4000, 0xc2080f4180)
    /tmp/gobin497561534/src/github.com/x-formation/pulsekit/cli/cli.go:624 +0x42
github.com/x-formation/pulsekit/cli.*CLI.Status·fm(0xc2080f4180)
    /tmp/gobin497561534/src/github.com/x-formation/pulsekit/cli/cli.go:210 +0x30
github.com/codegangsta/cli.Command.Run(0x821170, 0x6, 0x0, 0x0, 0x847370, 0x14, 0x0, 0x0, 0x0, 0x0, ...)
    /tmp/gobin497561534/src/github.com/codegangsta/cli/command.go:113 +0xeb2
github.com/codegangsta/cli.(*App).Run(0xc20803f380, 0xc20800e000, 0x2, 0x2, 0x0, 0x0)
    /tmp/gobin497561534/src/github.com/codegangsta/cli/app.go:156 +0xaea
github.com/x-formation/pulsekit/cli.(*CLI).Run(0xc2080f4000, 0xc20800e000, 0x2, 0x2)
    /tmp/gobin497561534/src/github.com/x-formation/pulsekit/cli/cli.go:660 +0x49
main.main()
    /tmp/gobin497561534/src/github.com/x-formation/pulsekit/cmd/pulsecli/main.go:10 +0x52

goroutine 19 [finalizer wait]:
runtime.park(0x412e80, 0xa39b28, 0xa37d29)
    /home/rjeczalik/.gvm/gos/go1.3.3/src/pkg/runtime/proc.c:1369 +0x89
runtime.parkunlock(0xa39b28, 0xa37d29)
    /home/rjeczalik/.gvm/gos/go1.3.3/src/pkg/runtime/proc.c:1385 +0x3b
runfinq()
    /home/rjeczalik/.gvm/gos/go1.3.3/src/pkg/runtime/mgc0.c:2644 +0xcf
runtime.goexit()
    /home/rjeczalik/.gvm/gos/go1.3.3/src/pkg/runtime/proc.c:1445

goroutine 17 [syscall]:
runtime.goexit()
    /home/rjeczalik/.gvm/gos/go1.3.3/src/pkg/runtime/proc.c:1445

goroutine 25 [select]:
net/http.(*persistConn).readLoop(0xc2080da0b0)
    /home/rjeczalik/.gvm/gos/go1.3.3/src/pkg/net/http/transport.go:868 +0x829
created by net/http.(*Transport).dialConn
    /home/rjeczalik/.gvm/gos/go1.3.3/src/pkg/net/http/transport.go:600 +0x93f

goroutine 26 [select]:
net/http.(*persistConn).writeLoop(0xc2080da0b0)
    /home/rjeczalik/.gvm/gos/go1.3.3/src/pkg/net/http/transport.go:885 +0x38f
created by net/http.(*Transport).dialConn
    /home/rjeczalik/.gvm/gos/go1.3.3/src/pkg/net/http/transport.go:601 +0x957
aquemy commented 9 years ago

I had the same error once, and some strange behavior in general, probably due to Puppy on my machine. However, when I am correctly logged, I have no problem: aquemy@dev-aquemy:~/xflibs-build$ pulsecli status pulse: invalid build: id=0, status=NEVER BUILT, reqid=

Any idea where it can comes from ?

ppknap commented 9 years ago

No error handling here: https://github.com/x-formation/pulsekit/blob/master/cli/cli.go#L251

rjeczalik commented 9 years ago

@ppknap @aquemy Fancy a PR?