Gogs 分支合并RP报错500


#1

请先搜索确保没有重复发帖。

Gogs 版本: 0.11.34.1122
系统类型及版本: Ubuntu 16.04
数据库:Mysql
问题描述: 页面上更改文件,提交到另外的分支,分支合并RP之后,报错500

测试地址: https://gogs.cuisongliu.com

Log:
gogs_1 | panic: runtime error: invalid memory address or nil pointer dereference
gogs_1 | [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xb7bc86]
gogs_1 |
gogs_1 | goroutine 2294 [running]:
gogs_1 | github.com/gogits/gogs/models.(*Repository).getOwner(0x0, 0x1759380, 0xc42027abe0, 0xc42245d180, 0xc420813800)
gogs_1 | /tmp/go/src/github.com/gogits/gogs/models/repo.go:324 +0x26
gogs_1 | github.com/gogits/gogs/models.(*Repository).mustOwner(0x0, 0x1759380, 0xc42027abe0, 0xc421a7eb88)
gogs_1 | /tmp/go/src/github.com/gogits/gogs/models/repo.go:337 +0x43
gogs_1 | github.com/gogits/gogs/models.(*Repository).repoPath(0x0, 0x1759380, 0xc42027abe0, 0x2, 0x2)
gogs_1 | /tmp/go/src/github.com/gogits/gogs/models/repo.go:457 +0x43
gogs_1 | github.com/gogits/gogs/models.(*Repository).RepoPath(0x0, 0x44, 0xc422909d08)
gogs_1 | /tmp/go/src/github.com/gogits/gogs/models/repo.go:461 +0x43
gogs_1 | github.com/gogits/gogs/models.(*PullRequest).PushToBaseRepo(0xc421a7eb60, 0x0, 0x0)
gogs_1 | /tmp/go/src/github.com/gogits/gogs/models/pull.go:612 +0x152
gogs_1 | github.com/gogits/gogs/models.addHeadRepoTasks(0xc421d4a890, 0x1, 0x2)
gogs_1 | /tmp/go/src/github.com/gogits/gogs/models/pull.go:694 +0x165
gogs_1 | github.com/gogits/gogs/models.AddTestPullRequestTask(0xc4220a0400, 0x35, 0xc4220942a8, 0x7, 0xc4222fe100)
gogs_1 | /tmp/go/src/github.com/gogits/gogs/models/pull.go:739 +0x6a6
gogs_1 | created by github.com/gogits/gogs/models.(*PullRequest).Merge.func1
gogs_1 | /tmp/go/src/github.com/gogits/gogs/models/pull.go:199 +0xc3
gogs_1 | 2018/01/11 02:51:48 [TRACE] Custom path: /data/gogs


#2

这个版本可能会有这个问题,建议有机会试下最新的 develop 分支或者等下个版本,一般是 webhook 导致的,你看下是不是启用的,禁用 webhook 应该可以临时解决。