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

Panic on repo page load #1023

Closed
FiloSottile opened this issue Mar 10, 2015 · 2 comments
Closed

Panic on repo page load #1023

FiloSottile opened this issue Mar 10, 2015 · 2 comments

Comments

@FiloSottile
Copy link
Contributor

Gogs version 0.5.13.0212 Beta, SQLite

I renamed a repository from BERserker to berserk. After that every time I load the homepage of the repo, I get this exact panic. /settings loads fine, as does /compare.

runtime error: invalid memory address or nil pointer dereference
/usr/src/go/src/runtime/panic.go:387 (0x491748)
/usr/src/go/src/runtime/panic.go:42 (0x490a6e)
/usr/src/go/src/runtime/sigpanic_unix.go:26 (0x497204)
/root/go/src/github.com/gogits/gogs/routers/repo/view.go:150 (0x7c408f)
/usr/src/go/src/runtime/asm_amd64.s:401 (0x4ba625)
/usr/src/go/src/reflect/value.go:419 (0x7f2115)
/usr/src/go/src/reflect/value.go:296 (0x7f0f0c)
/root/go/src/github.com/Unknwon/macaron/inject/inject.go:102 (0x9b90e7)
/root/go/src/github.com/Unknwon/macaron/context.go:112 (0x6e7da5)
/root/go/src/github.com/Unknwon/macaron/context.go:103 (0x6e7ca3)
/root/go/src/github.com/macaron-contrib/session/session.go:188 (0x72c198)
/usr/src/go/src/runtime/asm_amd64.s:401 (0x4ba625)
/usr/src/go/src/reflect/value.go:419 (0x7f2115)
/usr/src/go/src/reflect/value.go:296 (0x7f0f0c)
/root/go/src/github.com/Unknwon/macaron/inject/inject.go:102 (0x9b90e7)
/root/go/src/github.com/Unknwon/macaron/context.go:112 (0x6e7da5)
/root/go/src/github.com/Unknwon/macaron/context.go:103 (0x6e7ca3)
/root/go/src/github.com/Unknwon/macaron/recovery.go:161 (0x6fbae3)
/usr/src/go/src/runtime/asm_amd64.s:401 (0x4ba625)
/usr/src/go/src/reflect/value.go:419 (0x7f2115)
/usr/src/go/src/reflect/value.go:296 (0x7f0f0c)
/root/go/src/github.com/Unknwon/macaron/inject/inject.go:102 (0x9b90e7)
/root/go/src/github.com/Unknwon/macaron/context.go:112 (0x6e7da5)
/root/go/src/github.com/Unknwon/macaron/context.go:103 (0x6e7ca3)
/root/go/src/github.com/Unknwon/macaron/logger.go:40 (0x6fa820)
/usr/src/go/src/runtime/asm_amd64.s:401 (0x4ba625)
/usr/src/go/src/reflect/value.go:419 (0x7f2115)
/usr/src/go/src/reflect/value.go:296 (0x7f0f0c)
/root/go/src/github.com/Unknwon/macaron/inject/inject.go:102 (0x9b90e7)
/root/go/src/github.com/Unknwon/macaron/context.go:112 (0x6e7da5)
/root/go/src/github.com/Unknwon/macaron/router.go:158 (0x6fcffc)
/root/go/src/github.com/Unknwon/macaron/router.go:245 (0x6f37f8)
/root/go/src/github.com/Unknwon/macaron/macaron.go:171 (0x6ec4bc)
/usr/src/go/src/net/http/server.go:1703 (0x6c8d4a)
/usr/src/go/src/net/http/server.go:1204 (0x6c67b7)
/usr/src/go/src/runtime/asm_amd64.s:2232 (0x4bc741)
@FiloSottile
Copy link
Contributor Author

Gogs version 0.5.16.0301 Beta

runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/runtime/panic.go:387 (0x4a6f38)
    gopanic: reflectcall(unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
/usr/local/go/src/runtime/panic.go:42 (0x4a625e)
    panicmem: panic(memoryError)
/usr/local/go/src/runtime/sigpanic_unix.go:26 (0x4ac9f4)
    sigpanic: panicmem()
/home/git/go/src/github.com/gogits/gogs/routers/repo/view.go:150 (0x75655f)
    Home: files = append(files, []interface{}{te, git.NewSubModuleFile(c, sm.Url, te.Id.String())})
/usr/local/go/src/runtime/asm_amd64.s:401 (0x4ba165)
    call16: CALLFN(·call16, 16)
/usr/local/go/src/reflect/value.go:419 (0x780705)
    Value.call: call(fn, args, uint32(frametype.size), uint32(retOffset))
/usr/local/go/src/reflect/value.go:296 (0x77f4fc)
    Value.Call: return v.call("Call", in)
/home/git/go/src/github.com/Unknwon/macaron/inject/inject.go:102 (0x9c68e7)
    (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil
/home/git/go/src/github.com/Unknwon/macaron/context.go:112 (0x67a145)
    (*Context).run: vals, err := c.Invoke(c.handler())
/home/git/go/src/github.com/Unknwon/macaron/context.go:103 (0x67a043)
    (*Context).Next: c.run()
/home/git/go/src/github.com/macaron-contrib/session/session.go:188 (0x6be728)
    func.004: ctx.Next()
/usr/local/go/src/runtime/asm_amd64.s:401 (0x4ba165)
    call16: CALLFN(·call16, 16)
/usr/local/go/src/reflect/value.go:419 (0x780705)
    Value.call: call(fn, args, uint32(frametype.size), uint32(retOffset))
/usr/local/go/src/reflect/value.go:296 (0x77f4fc)
    Value.Call: return v.call("Call", in)
/home/git/go/src/github.com/Unknwon/macaron/inject/inject.go:102 (0x9c68e7)
    (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil
/home/git/go/src/github.com/Unknwon/macaron/context.go:112 (0x67a145)
    (*Context).run: vals, err := c.Invoke(c.handler())
/home/git/go/src/github.com/Unknwon/macaron/context.go:103 (0x67a043)
    (*Context).Next: c.run()
/home/git/go/src/github.com/Unknwon/macaron/recovery.go:161 (0x68de83)
    func.008: c.Next()
/usr/local/go/src/runtime/asm_amd64.s:401 (0x4ba165)
    call16: CALLFN(·call16, 16)
/usr/local/go/src/reflect/value.go:419 (0x780705)
    Value.call: call(fn, args, uint32(frametype.size), uint32(retOffset))
/usr/local/go/src/reflect/value.go:296 (0x77f4fc)
    Value.Call: return v.call("Call", in)
/home/git/go/src/github.com/Unknwon/macaron/inject/inject.go:102 (0x9c68e7)
    (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil
/home/git/go/src/github.com/Unknwon/macaron/context.go:112 (0x67a145)
    (*Context).run: vals, err := c.Invoke(c.handler())
/home/git/go/src/github.com/Unknwon/macaron/context.go:103 (0x67a043)
    (*Context).Next: c.run()
/home/git/go/src/github.com/Unknwon/macaron/logger.go:40 (0x68cbc0)
    func.004: ctx.Next()
/usr/local/go/src/runtime/asm_amd64.s:401 (0x4ba165)
    call16: CALLFN(·call16, 16)
/usr/local/go/src/reflect/value.go:419 (0x780705)
    Value.call: call(fn, args, uint32(frametype.size), uint32(retOffset))
/usr/local/go/src/reflect/value.go:296 (0x77f4fc)
    Value.Call: return v.call("Call", in)
/home/git/go/src/github.com/Unknwon/macaron/inject/inject.go:102 (0x9c68e7)
    (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil
/home/git/go/src/github.com/Unknwon/macaron/context.go:112 (0x67a145)
    (*Context).run: vals, err := c.Invoke(c.handler())
/home/git/go/src/github.com/Unknwon/macaron/router.go:158 (0x68f39c)
    func.015: c.run()
/home/git/go/src/github.com/Unknwon/macaron/router.go:245 (0x685b98)
    (*Router).ServeHTTP: h(rw, req, p)
/home/git/go/src/github.com/Unknwon/macaron/macaron.go:171 (0x67e85c)
    (*Macaron).ServeHTTP: m.Router.ServeHTTP(rw, req)
/usr/local/go/src/net/http/server.go:1703 (0x65ac8a)
    serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/local/go/src/net/http/server.go:1204 (0x6586f7)
    (*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/local/go/src/runtime/asm_amd64.s:2232 (0x4bc281)
    goexit: 

@FiloSottile
Copy link
Contributor Author

Ok, it's unrelated to the rename, the .gitmodules file is corrupted, so I have a submodule without a .gitmodules entry. PR incoming.

unknwon added a commit that referenced this issue Mar 10, 2015
Handle submodules without a .gitmodules entry - fix #1023
bill-auger pushed a commit to bill-auger/gogs that referenced this issue Aug 8, 2016
@vc12345679 vc12345679 mentioned this issue Sep 21, 2017
7 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant