-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR Error 500 on CreateCsvDiff when trying to merge some branches: invalid memory address #19530
Comments
It's likely caused by a bug in
|
Is it possible that you could add a |
Yes, I will build from source and try this, and try to have more debug |
I have tested a small csv in the pull request and it works. Maybe the csv file has a special format. |
The CSV File format is not in cause Okay, so here is the full history:
So the Error comes up as it cannot make a diff on files not existing anymore... EDIT : adding back the file in a new commit avoid the Error 500 |
gitea/routers/web/repo/compare.go Line 114 in 8eb1cd9
I will do some tests, because it may fail if we try to compare a CSV then deleted... The full error is "object does not exist" but somehow it is not displayed => gitea/routers/web/repo/compare.go Line 132 in 8eb1cd9
|
Update (2022-09-16): the comment above seems incorrect, as discussed in #21184, the CreateCsvDiff is intended to handle nil head or base commit. So, the 500 error is likely to be caused by other reasons. Update (2023-02-17): according to #22946, the first guess seems reasonable, the CreateCsvDiff logic was incomplete, it should be able to process the situation when base and head are both nil. |
* giteaofficial/main: Fix some slice problems (incorrect slice length) (go-gitea#19592) Fix sending empty notifications (go-gitea#19589) Handle the error of a missing blob object fix go-gitea#19530 (go-gitea#19552) Remove legacy `+build:` constraint (go-gitea#19582) Federation: return useful statistic information for nodeinfo (go-gitea#19561) Upgrade required git version to 2.0 (go-gitea#19577) add smtp password to install page (go-gitea#17564) ignore DNS error when doing migration allow/block check (go-gitea#19566) [skip ci] Updated translations via Crowdin Dont overwrite err with nil & rename PullCheckingFuncs to reflect there usage (go-gitea#19572) Improve UI on mobile (go-gitea#19546) Add API to check if team has repo access (go-gitea#19540)
…a#19552) * Handle the error of a missing blob object * Show error in logs * as per @zeripath * Add missing error check * Add missing error check * Update compare.go * Use formal code * Update compare.go Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Fixes go-gitea#21184 Regression of go-gitea#19552 Instead of using `GetBlobByPath` I use the already existing instances. We need more information from go-gitea#19530 if that error is still present.
Replaces: #22947 Fixes #22946 Probably related to #19530 Basically, many of the diffs were broken because they were comparing to the base commit, where a 3-dot diff should be comparing to the [last common ancestor](https://matthew-brett.github.io/pydagogue/git_diff_dots.html). This should have an integration test so that we don’t run into this issue again. --------- Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Backport go-gitea#22949 Fixes go-gitea#22946 Probably related to go-gitea#19530 Co-authored-by: Jonathan Tran <jonnytran@gmail.com> (cherry picked from commit 760cf41)
Description
Hello
We have a huge repo (800 branches, 6Gb lfs files, 12k commits, with branch protection) that we have migrated from Gitlab 2 weeks ago, on a Self hosted Gitea 1.16.5 with Pgsql
Since 2 days, some users encounters a 500 error when trying to create a pull request, there are some branches that generates this error
I tested this on the 1.16.5 & 1.16.6 instances I have. We have not many other repo to test otherwise
If we recreate the same branch with another name, the PR works as intended.
short version log :
2022/04/27 14:44:11 ...rs/web/repo/issue.go:751:setTemplateIfExists() [D] could not extract metadata fdev .gitea/pull_request_template.md [mainrepo/dev]: frontmatter must start with a separator line
2022/04/27 14:44:11 ...s/context/context.go:204:HTML() [D] Template: repo/diff/compare
2022/04/27 14:44:12 ...s/context/context.go:214:HTML() [E] Render failed: template: repo/diff/csv_diff:3:15: executing "repo/diff/csv_diff" at <call .root.CreateCsvDiff .file .root.BaseCommit .root.HeadCommit>: error calling call: runtime error: invalid memory address or nil pointer dereference
2022/04/27 14:44:12 ...s/context/context.go:204:HTML() [D] Template: status/500
2022/04/27 14:44:12 Completed GET /mainrepo/dev/compare/release/master...release/calibration 500 Internal Server Error in 1.331171119s
Gitea Version
1.16.5 / 1.16.6 / latest dev on master
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
https://try.gitea.io/99rgosse/issues/issues/1
Screenshots
Git Version
2.30.3
Operating System
Docker Gitea with Ubuntu
How are you running Gitea?
Docker official Gitea v.16.6
Caching enabled :
I tried :
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: