Panic when attempting to load issue with invalid label #6758

Closed
opened 2025-11-02 07:05:47 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @CirnoT on GitHub (Jan 26, 2021).

  • Gitea version (or commit ref): 1.14.0+dev-605-gd2ea21d0d
  • Git version: 2.30.0
  • Operating system: Docker
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:
2021/01/26 10:41:58 ...els/issue_comment.go:382:LoadLabel() [W] Commit 839 cannot load label 0
2021/01/26 10:41:58 ...els/issue_comment.go:382:LoadLabel() [W] Commit 840 cannot load label 0

Description

template: repo/issue/view_content/comments:188:51: executing "repo/issue/view_content/comments" at <RenderLabels .AddedLabels>: error calling RenderLabels: runtime error: invalid memory address or nil pointer dereference

Additionally; this is a very old issue that might've had some labels before migrating to org-labels; possibly need migration or doctor command to address this issue.

Originally created by @CirnoT on GitHub (Jan 26, 2021). - Gitea version (or commit ref): 1.14.0+dev-605-gd2ea21d0d - Git version: 2.30.0 - Operating system: Docker - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - Log gist: ``` 2021/01/26 10:41:58 ...els/issue_comment.go:382:LoadLabel() [W] Commit 839 cannot load label 0 2021/01/26 10:41:58 ...els/issue_comment.go:382:LoadLabel() [W] Commit 840 cannot load label 0 ``` ## Description ``` template: repo/issue/view_content/comments:188:51: executing "repo/issue/view_content/comments" at <RenderLabels .AddedLabels>: error calling RenderLabels: runtime error: invalid memory address or nil pointer dereference ``` Additionally; this is a very old issue that might've had some labels before migrating to org-labels; possibly need migration or doctor command to address this issue.
GiteaMirror added the type/bug label 2025-11-02 07:05:47 -06:00
Author
Owner

@CirnoT commented on GitHub (Jan 30, 2021):

delete from comment where type = 7 and label_id = 0;

Seems to have solved the issue. The relevant issues/PRs are from around ~2018.

@CirnoT commented on GitHub (Jan 30, 2021): ``` delete from comment where type = 7 and label_id = 0; ``` Seems to have solved the issue. The relevant issues/PRs are from around ~2018.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6758