PANIC 'runtime error: index out of range' on pull request #2136

Closed
opened 2025-11-02 04:25:06 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @nuno-silva on GitHub (Aug 3, 2018).

Description

I was editing a comment on a pull request. When I tried to submit the comment, I got an internal server error. Since then, the page for this pull request always fails with runtime error: index out of range. Other pages in gitea work.

I remember starting time tracking while editing the comment.

I couldn't reproduce the error in try.gitea.io so far.

Any pointers on where to start debugging the error would be appreciated.
...

Screenshots

Originally created by @nuno-silva on GitHub (Aug 3, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) 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): 1.4.3 - Git version: 2.16.4 - Operating system: Gentoo Linux - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: https://gist.github.com/nuno-silva/5bef3d8dd47523a1ed7d461349f34a9f ## Description I was editing a comment on a pull request. When I tried to submit the comment, I got an internal server error. Since then, the page for this pull request always fails with `runtime error: index out of range`. Other pages in gitea work. I remember starting time tracking while editing the comment. I couldn't reproduce the error in try.gitea.io so far. Any pointers on where to start debugging the error would be appreciated. ... ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** -->
Author
Owner

@lunny commented on GitHub (Aug 3, 2018):

@nuno-silva could you upgrade to v1.4.3 and confirm the bug is still there?

@lunny commented on GitHub (Aug 3, 2018): @nuno-silva could you upgrade to v1.4.3 and confirm the bug is still there?
Author
Owner

@nuno-silva commented on GitHub (Aug 3, 2018):

@lunny the error is still happening on v1.4.3. I've updated the gist and issue description.

@nuno-silva commented on GitHub (Aug 3, 2018): @lunny the error is still happening on v1.4.3. I've updated the gist and issue description.
Author
Owner

@nuno-silva commented on GitHub (Aug 3, 2018):

@lunny I was able to reproduce the bug again in v1.4.3.

Simply opening a new issue and writing either of these in a comment triggers an internal error:

[[https://www.freedesktop.org/software/systemd/man/networkd.conf.html#DUIDType=]]
[[=]]

In try.gitea.io (9c354a5), the rendered comment is empty, but does NOT trigger an internal error:
https://try.gitea.io/nuno-silva/test/issues/3

@nuno-silva commented on GitHub (Aug 3, 2018): @lunny I was able to reproduce the bug again in v1.4.3. Simply opening a new issue and writing either of these in a comment triggers an internal error: ``` [[https://www.freedesktop.org/software/systemd/man/networkd.conf.html#DUIDType=]] ``` ``` [[=]] ``` In try.gitea.io (9c354a5), the rendered comment is empty, but does NOT trigger an internal error: https://try.gitea.io/nuno-silva/test/issues/3
Author
Owner

@nuno-silva commented on GitHub (Aug 3, 2018):

As a workaround, I altered the affected comment's content in the database:

update comment set content="workaround" where issue_id=504 and id=1392;
@nuno-silva commented on GitHub (Aug 3, 2018): As a workaround, I altered the affected comment's content in the database: ``` update comment set content="workaround" where issue_id=504 and id=1392; ```
Author
Owner

@lunny commented on GitHub (Aug 6, 2018):

It seems master have fixed that issue.

@lunny commented on GitHub (Aug 6, 2018): It seems `master` have fixed that issue.
Author
Owner

@nuno-silva commented on GitHub (Aug 6, 2018):

Yes. [[=]] seems to be invalid markdown anyway, so as long as it doesn't crash I think it's acceptable behaviour.
Reopen if you disagree.

@nuno-silva commented on GitHub (Aug 6, 2018): Yes. `[[=]]` seems to be invalid markdown anyway, so as long as it doesn't crash I think it's acceptable behaviour. Reopen if you disagree.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2136