Skip to content

Error 500 when viewing a commit by its ID #23872

Closed
@a20eac1d

Description

@a20eac1d

Description

When trying to view commits by their ID, Gitea sometimes crashes and shows an "Error 500" page.

I can make this issue appear very reliably when I have multiple requests open at the same time (click on multiple commit IDs in short time) or if I abort the current page load and then reload it immediately. It seems like the previous request is still going on the server and the new request is messing it up.

The error:

An error occurred:

template: repo/diff/section_unified:32:28: executing "repo/diff/section_unified" at <$section.GetComputedInlineDiffFor>: error calling GetComputedInlineDiffFor: runtime error: slice bounds out of range [2:1]

Gitea Version: 1.19.0

Gitea Version

1.19.0

Can you reproduce the bug on the Gitea demo site?

YES! See comment below

Log Gist

Updated Gist with more info:

https://gist.github.com/a20eac1d/4f2037bdfe147d2ad8c7ea375724f72a

Screenshots

https://i.imgur.com/BDd2x90.png

Git Version

2.38.4, Wire Protocol Version 2 Enabled

Operating System

Ubuntu 22.04 LTS

How are you running Gitea?

Gitea is running in a Docker container, created with the official tutorial at: https://docs.gitea.io/en-us/install-with-docker/

Database

SQLite

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions