On dashboard feed, avatar func create nil exeption #6478

Closed
opened 2025-11-02 06:57:09 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @wanhuasong on GitHub (Dec 7, 2020).

  • Gitea version (or commit ref): latest docker image comment 1.14.0+dev-325-gf74a094fd
  • Git version: ignore
  • Operating system: ignore
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

I upgrade from gitea/gitea@sha256:daf33224f2a2b186eb8de97814c1d1934038c2ba08627dca5967109cae3f2829(1.13.0+dev-276-g217647f33) to gitea/gitea:latest(1.14.0+dev-325-gf74a094fd), appeared follow problem when I visit the index page of selfhosted gitea

template: user/dashboard/feeds:4:5: executing "user/dashboard/feeds" at <avatar .ActUser>: error calling avatar: runtime error: invalid memory address or nil pointer dereference

Screenshots

screenshots shows content above

Originally created by @wanhuasong on GitHub (Dec 7, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): latest docker image comment 1.14.0+dev-325-gf74a094fd - Git version: ignore - Operating system: ignore <!-- Please include information on whether you built gitea yourself, used one of our downloads or are using some other package --> <!-- Please also tell us how you are running gitea, e.g. if it is being run from docker, a command-line, systemd etc. ---> <!-- If you are using a package or systemd tell us what distribution you are using --> - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - Log gist: <!-- It really is important to provide pertinent logs --> <!-- Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems --> <!-- In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini --> ## Description I upgrade from gitea/gitea@sha256:daf33224f2a2b186eb8de97814c1d1934038c2ba08627dca5967109cae3f2829(`1.13.0+dev-276-g217647f33`) to gitea/gitea:latest(`1.14.0+dev-325-gf74a094fd`), appeared follow problem when I visit the index page of selfhosted gitea ``` template: user/dashboard/feeds:4:5: executing "user/dashboard/feeds" at <avatar .ActUser>: error calling avatar: runtime error: invalid memory address or nil pointer dereference ``` ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** --> screenshots shows content above
GiteaMirror added the type/bug label 2025-11-02 06:57:09 -06:00
Author
Owner

@lunny commented on GitHub (Dec 7, 2020):

It may related with #13649

@lunny commented on GitHub (Dec 7, 2020): It may related with #13649
Author
Owner

@techknowlogick commented on GitHub (Dec 8, 2020):

Do you use custom templates?

@techknowlogick commented on GitHub (Dec 8, 2020): Do you use custom templates?
Author
Owner

@6543 commented on GitHub (Dec 8, 2020):

we have to look why .ActUser is nil & make the avatar function resistant against nil argument ...
cc @silverwind

@6543 commented on GitHub (Dec 8, 2020): we have to look why .ActUser is nil & make the avatar function resistant against nil argument ... cc @silverwind
Author
Owner

@silverwind commented on GitHub (Dec 8, 2020):

Hmm, might have something to do with a.loadActUser() which the previous implementation did call but the current one doesn't.

https://github.com/go-gitea/gitea/pull/13649/files#diff-94580350088fd8ad06447d2eb73bc35e1fd2372f11078a0f9142038808328d13L145

@silverwind commented on GitHub (Dec 8, 2020): Hmm, might have something to do with `a.loadActUser()` which the previous implementation did call but the current one doesn't. https://github.com/go-gitea/gitea/pull/13649/files#diff-94580350088fd8ad06447d2eb73bc35e1fd2372f11078a0f9142038808328d13L145
Author
Owner

@silverwind commented on GitHub (Dec 8, 2020):

May need to introduce a avatarByAction that does this .loadActUser(). Are there any steps to reproduce the issue? It didn't show up during my testing.

@silverwind commented on GitHub (Dec 8, 2020): May need to introduce a `avatarByAction` that does this `.loadActUser()`. Are there any steps to reproduce the issue? It didn't show up during my testing.
Author
Owner

@silverwind commented on GitHub (Dec 8, 2020):

https://github.com/go-gitea/gitea/pull/13909

@silverwind commented on GitHub (Dec 8, 2020): https://github.com/go-gitea/gitea/pull/13909
Author
Owner

@wanhuasong commented on GitHub (Dec 10, 2020):

Fixed, thanks.

@wanhuasong commented on GitHub (Dec 10, 2020): Fixed, thanks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6478