Skip to content

Instantly share code, notes, and snippets.

@cybe
Created December 28, 2016 10:26
Show Gist options
  • Save cybe/603458382308f3bd27ee98b95641feb9 to your computer and use it in GitHub Desktop.
Save cybe/603458382308f3bd27ee98b95641feb9 to your computer and use it in GitHub Desktop.
Gogs API: nil pointer dereference
[Macaron] 2016-12-28 11:03:09: Started GET /api/v1/repos/test/test/raw/master/Dockerfile for 172.22.0.1
[Macaron] PANIC: runtime error: invalid memory address or nil pointer dereference
/usr/lib/go/src/runtime/panic.go:443 (0x434ac9)
/usr/lib/go/src/runtime/panic.go:62 (0x433185)
/usr/lib/go/src/runtime/sigpanic_unix.go:24 (0x4498da)
/tmp/go/src/github.com/gogits/gogs/routers/api/v1/repo/file.go:22 (0xc966f2)
/usr/lib/go/src/runtime/asm_amd64.s:472 (0x464a4e)
/usr/lib/go/src/reflect/value.go:435 (0x51d5fd)
/usr/lib/go/src/reflect/value.go:303 (0x51c2c1)
/tmp/go/src/github.com/gogits/gogs/vendor/github.com/go-macaron/inject/inject.go:117 (0xc8b172)
/tmp/go/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/context.go:113 (0x853503)
/tmp/go/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/context.go:104 (0x8533ec)
/tmp/go/src/github.com/gogits/gogs/vendor/github.com/go-macaron/session/session.go:186 (0x7997e6)
/usr/lib/go/src/runtime/asm_amd64.s:472 (0x464a4e)
/usr/lib/go/src/reflect/value.go:435 (0x51d5fd)
/usr/lib/go/src/reflect/value.go:303 (0x51c2c1)
/tmp/go/src/github.com/gogits/gogs/vendor/github.com/go-macaron/inject/inject.go:117 (0xc8b172)
/tmp/go/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/context.go:113 (0x853503)
/tmp/go/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/context.go:104 (0x8533ec)
/tmp/go/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/recovery.go:161 (0x869e42)
/usr/lib/go/src/runtime/asm_amd64.s:472 (0x464a4e)
/usr/lib/go/src/reflect/value.go:435 (0x51d5fd)
/usr/lib/go/src/reflect/value.go:303 (0x51c2c1)
/tmp/go/src/github.com/gogits/gogs/vendor/github.com/go-macaron/inject/inject.go:117 (0xc8b172)
/tmp/go/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/context.go:113 (0x853503)
/tmp/go/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/context.go:104 (0x8533ec)
/tmp/go/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/logger.go:43 (0x8689b9)
/usr/lib/go/src/runtime/asm_amd64.s:472 (0x464a4e)
/usr/lib/go/src/reflect/value.go:435 (0x51d5fd)
/usr/lib/go/src/reflect/value.go:303 (0x51c2c1)
/tmp/go/src/github.com/gogits/gogs/vendor/github.com/go-macaron/inject/inject.go:117 (0xc8b172)
/tmp/go/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/context.go:113 (0x853503)
/tmp/go/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/router.go:184 (0x86b7d4)
/tmp/go/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/router.go:288 (0x861d3d)
/tmp/go/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/macaron.go:177 (0x858b6a)
/usr/lib/go/src/net/http/server.go:2081 (0x7431be)
/usr/lib/go/src/net/http/server.go:1472 (0x73fb4e)
/usr/lib/go/src/runtime/asm_amd64.s:1998 (0x467141)
[Macaron] 2016-12-28 11:03:09: Completed /api/v1/repos/test/test/raw/master/Dockerfile 500 Internal Server Error in 57.234282ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment