Closed shemgp closed 4 years ago
[x]
2019/11/27 01:58:26 ...s/charset/charset.go:121:DetectEncoding() [D] Detected encoding: utf-8 (fast) 2019/11/27 01:58:26 ...les/context/panic.go:35:1() [E] PANIC:: runtime error: index out of range [-1] /usr/local/go/src/runtime/panic.go:75 (0x435452) /go/src/code.gitea.io/gitea/services/gitdiff/gitdiff.go:357 (0x11e9db3) /go/src/code.gitea.io/gitea/services/gitdiff/gitdiff.go:865 (0x11eda36) /go/src/code.gitea.io/gitea/services/gitdiff/gitdiff.go:809 (0x11ef1ec) /go/src/code.gitea.io/gitea/services/gitdiff/gitdiff.go:949 (0x11ef181) /go/src/code.gitea.io/gitea/routers/repo/commit.go:229 (0x12d3eed) /usr/local/go/src/reflect/value.go:460 (0x497ae5) /usr/local/go/src/reflect/value.go:321 (0x4972a3) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:177 (0x9aefa9) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:137 (0x9ae959) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:121 (0x9deaf8) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:112 (0x10ce30a) /go/src/code.gitea.io/gitea/modules/context/repo.go:751 (0x10ce2f3) /usr/local/go/src/reflect/value.go:460 (0x497ae5) /usr/local/go/src/reflect/value.go:321 (0x4972a3) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:177 (0x9aefa9) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:137 (0x9ae959) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:121 (0x9deaf8) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:112 (0x10ccb4c) /go/src/code.gitea.io/gitea/modules/context/repo.go:533 (0x10ccb35) /usr/local/go/src/reflect/value.go:460 (0x497ae5) /usr/local/go/src/reflect/value.go:321 (0x4972a3) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:177 (0x9aefa9) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:137 (0x9ae959) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:121 (0x9deaf8) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:112 (0x10ca4d1) /go/src/code.gitea.io/gitea/modules/context/panic.go:39 (0x10ca4bd) /usr/local/go/src/reflect/value.go:460 (0x497ae5) /usr/local/go/src/reflect/value.go:321 (0x4972a3) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:177 (0x9aefa9) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:137 (0x9ae959) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:121 (0x9deaf8) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:112 (0xaac295) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/session/session.go:192 (0xaac280) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:79 (0x9de9a0) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:157 (0x9aecb9) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:135 (0x9aea48) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:121 (0x9deaf8) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:112 (0x9f0199) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/recovery.go:161 (0x9f0187) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/logger.go:40 (0x9e2673) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:157 (0x9aecb9) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:135 (0x9aea48) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:121 (0x9deaf8) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:112 (0x9ef4d0) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/logger.go:52 (0x9ef4bb) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/logger.go:40 (0x9e2673) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:157 (0x9aecb9) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/inject/inject.go:135 (0x9aea48) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/context.go:121 (0x9deaf8) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/router.go:187 (0x9f13b6) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/router.go:303 (0x9ead95) /go/src/code.gitea.io/gitea/vendor/gitea.com/macaron/macaron/macaron.go:220 (0x9e3a0a) /go/src/code.gitea.io/gitea/vendor/github.com/gorilla/context/context.go:141 (0xc4cc8d) /usr/local/go/src/net/http/server.go:2007 (0x758973) /usr/local/go/src/net/http/server.go:2802 (0x75bdc3) /usr/local/go/src/net/http/server.go:1890 (0x757764) /usr/local/go/src/runtime/asm_amd64.s:1357 (0x466ec0)
Couldn't view commits with PANIC on services/gitdiff/gitdiff.go:357
Thanks for looking into this.
It looks like somehow diffFile.Sections is empty @ 357:
diffFile.Sections
https://github.com/go-gitea/gitea/blob/b50dee5a61b3959bb3606973d359741f0ca9af9a/services/gitdiff/gitdiff.go#L344-L360
@blueworrybear
[x]
):Description
Couldn't view commits with PANIC on services/gitdiff/gitdiff.go:357
Screenshots
Thanks for looking into this.