timeglass / glass

Automated time tracking for Git repositories. [DEPRECATED]
Mozilla Public License 2.0
583 stars 27 forks source link

Nil Dereference under gentoo se-linux #74

Open murpyslaw opened 6 years ago

murpyslaw commented 6 years ago

First of all, awesome project. I love the easy concept that you work with. I have one bug to report:

glass: 22:39:53 Writing version control hooks...
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x553b81]

goroutine 1 [running]:
github.com/timeglass/glass/vcs.(*Git).Hook(0xc20803c4b0, 0x0, 0x0)
        /home/advanderveer/go/src/github.com/timeglass/glass/vcs/git.go:224 +0x1d1
github.com/timeglass/glass/command.(*Init).Run(0xc208044060, 0xc208056460, 0x0, 0x0)
        /home/advanderveer/go/src/github.com/timeglass/glass/command/init.go:53 +0x235
github.com/timeglass/glass/command.*Init.Run·fm(0xc208056460, 0x0, 0x0)
        /home/advanderveer/go/src/github.com/timeglass/glass/command/init.go:38 +0x43
github.com/timeglass/glass/command.func·001(0xc208056460)
        /home/advanderveer/go/src/github.com/timeglass/glass/command/types.go:27 +0x16e
github.com/timeglass/glass/_vendor/github.com/codegangsta/cli.Command.Run(0x7ad250, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x814170, 0x2d, 0xc20807a360, ...)
        /home/advanderveer/go/src/github.com/timeglass/glass/_vendor/github.com/codegangsta/cli/command.go:118 +0x104b
github.com/timeglass/glass/_vendor/github.com/codegangsta/cli.(*App).Run(0xc20807e000, 0xc20800a000, 0x2, 0x2, 0x0, 0x0)
        /home/advanderveer/go/src/github.com/timeglass/glass/_vendor/github.com/codegangsta/cli/app.go:154 +0xd04
main.main()
        /home/advanderveer/go/src/github.com/timeglass/glass/main.go:64 +0xb5d

goroutine 8 [syscall]:
os/signal.loop()
        /usr/local/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
        /usr/local/go/src/os/signal/signal_unix.go:27 +0x35

This happens after installing the rc-service under se-linux on permissive mode. It worked the first time, but it crashes on this nil dereference.

Maybe I've started two of them accidentally?

Cheers rivanov