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: create single-line comment in code review #25697

Closed
Bisstocuz opened this issue Jul 5, 2023 · 0 comments · Fixed by #25698
Closed

panic: create single-line comment in code review #25697

Bisstocuz opened this issue Jul 5, 2023 · 0 comments · Fixed by #25698
Labels

Comments

@Bisstocuz
Copy link

Bisstocuz commented Jul 5, 2023

Description

2023/07/05 16:30:34 routers/web/base.go:134:1() [E] [64a52a2a] PANIC: runtime error: invalid memory address or nil pointer dereference
        /usr/local/go/src/runtime/panic.go:260 (0x458f5c)
        /usr/local/go/src/runtime/signal_unix.go:841 (0x458f2c)
        /go/src/code.gitea.io/gitea/routers/web/repo/pull_review.go:31 (0x2403145)
        /go/src/code.gitea.io/gitea/modules/web/wrap_convert.go:46 (0x2114753)
        /go/src/code.gitea.io/gitea/modules/web/wrap.go:40 (0x2112c44)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/mux.go:444 (0x182b375)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/src/code.gitea.io/gitea/modules/web/wrap.go:62 (0x2113088)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/src/code.gitea.io/gitea/modules/web/wrap.go:62 (0x2113088)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/src/code.gitea.io/gitea/modules/web/wrap.go:62 (0x2113088)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/middleware/get_head.go:37 (0x22c80cd)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/src/code.gitea.io/gitea/modules/web/wrap.go:62 (0x2113088)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/src/code.gitea.io/gitea/modules/context/context.go:841 (0x1c82354)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/mux.go:73 (0x18290f4)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/mux.go:316 (0x182ab03)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/mux.go:444 (0x182b375)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/src/code.gitea.io/gitea/routers/web/base.go:174 (0x24420b1)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/pkg/mod/gitea.com/go-chi/session@v0.0.0-20221220005550-e056dc379164/session.go:257 (0x175c16a)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/src/code.gitea.io/gitea/modules/web/wrap.go:109 (0x2113a48)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/mux.go:73 (0x18290f4)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/mux.go:316 (0x182ab03)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/mux.go:444 (0x182b375)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/src/code.gitea.io/gitea/routers/common/middleware.go:80 (0x22462a2)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/src/code.gitea.io/gitea/modules/web/routing/logger_manager.go:122 (0x210ed53)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/src/code.gitea.io/gitea/routers/common/middleware.go:112 (0x2244e95)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/pkg/mod/github.com/chi-middleware/proxy@v1.1.1/middleware.go:37 (0x2243bb6)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/src/code.gitea.io/gitea/routers/common/middleware.go:32 (0x22460f4)
        /usr/local/go/src/net/http/server.go:2122 (0x9ba38e)
        /go/pkg/mod/github.com/go-chi/chi/v5@v5.0.8/mux.go:90 (0x18290af)
        /go/src/code.gitea.io/gitea/modules/web/route.go:191 (0x211212d)
        /usr/local/go/src/net/http/server.go:2936 (0x9bd995)
        /usr/local/go/src/net/http/server.go:1995 (0x9b8eb1)
        /usr/local/go/src/runtime/asm_amd64.s:1598 (0x478fc0)

2023/07/05 16:30:34 routers/web/base.go:169:1() [E] [64a52a2a] template: base/head_navbar:155:7: executing "base/head_navbar" at <avatar $.Context .SignedUser 24 "tiny">: error calling avatar: runtime error: invalid memory address or nil pointer dereference

Gitea Version

1.19.4

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

a0117d1d200189a14ede395357b5f9ad

Git Version

No response

Operating System

No response

How are you running Gitea?

docker-compose

Database

MySQL

silverwind pushed a commit that referenced this issue Jul 5, 2023
Fix #25697.

Just avoid panic, maybe there's another bug to trigger this case.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
GiteaBot added a commit to GiteaBot/gitea that referenced this issue Jul 5, 2023
Fix go-gitea#25697.

Just avoid panic, maybe there's another bug to trigger this case.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
silverwind pushed a commit that referenced this issue Jul 6, 2023
Backport #25698 by @wolfogre

Fix #25697.

Just avoid panic, maybe there's another bug to trigger this case.

Co-authored-by: Jason Song <i@wolfogre.com>
silverwind pushed a commit that referenced this issue Jul 7, 2023
Backport #25698.

Fix #25697.

Just avoid panic, maybe there's another bug to trigger this case.

Co-authored-by: Giteabot <teabot@gitea.io>
Codeberg-org pushed a commit to Codeberg-org/gitea that referenced this issue Jul 12, 2023
…#25714)

Backport go-gitea#25698.

Fix go-gitea#25697.

Just avoid panic, maybe there's another bug to trigger this case.

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 53276d3)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant