Skip to content

error calling AvatarLink: runtime error: invalid memory address or nil pointer dereference #22516

Closed
@renothing

Description

@renothing

Description

homepage render 500 after upgraded to 1.18.1

2023/01/18 20:48:53 ...s/context/context.go:220:HTML() [D] [63c85b34] Template: user/dashboard/dashboard
2023/01/18 20:48:53 ...user/notification.go:46:func1() [I] [63c85b34] [SQL] SELECT count(*) FROM `notification` WHERE (user_id = ?) AND (status = ?) [1 1] - 1.62181ms
2023/01/18 20:48:53 ...ls/system/setting.go:122:GetSettings() [I] [63c85b34] [SQL] SELECT `id`, `setting_key`, `setting_value`, `version`, `created`, `updated` FROM `system_setting` WHERE setting_key IN (?) [picture.disable_gravatar] - 1.402161ms
2023/01/18 20:48:53 ...bce556200f/engine.go:1244:Get() [I] [63c85b34] [SQL] SELECT `id`, `uid`, `email`, `lower_email`, `is_activated`, `is_primary` FROM `email_address` WHERE `lower_email`=? LIMIT 1 [53425593+taylover2016@users.noreply.github.com] - 1.397ms
2023/01/18 20:48:53 ...ls/system/setting.go:122:GetSettings() [I] [63c85b34] [SQL] SELECT `id`, `setting_key`, `setting_value`, `version`, `created`, `updated` FROM `system_setting` WHERE setting_key IN (?) [picture.enable_federated_avatar] - 1.352367ms
2023/01/18 20:48:53 ...s/context/context.go:233:HTML() [E] [63c85b34] Render failed: template: user/dashboard/feeds:91:29: executing "user/dashboard/feeds" at <$push.AvatarLink>: error calling AvatarLink: runtime error: invalid memory address or nil pointer dereference
2023/01/18 20:48:53 ...s/context/context.go:220:HTML() [D] [63c85b34] Template: status/500

settings

[picture]
DISABLE_GRAVATAR   = true
AVATAR_UPLOAD_PATH = /data/gitea/avatars
[server]
OFFLINE_MODE       = true
DISABLE_ROUTER_LOG = true

Gitea Version

1.18.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image

Git Version

2.36.3

Operating System

docker

How are you running Gitea?

we use official docker image gitea/gitea

Database

MySQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions