Skip to content
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

Panic in models.migrations/v156.go #15923

Closed
2 of 6 tasks
adeepn opened this issue May 19, 2021 · 1 comment
Closed
2 of 6 tasks

Panic in models.migrations/v156.go #15923

adeepn opened this issue May 19, 2021 · 1 comment
Labels
issue/duplicate The issue has already been reported. type/bug
Milestone

Comments

@adeepn
Copy link

adeepn commented May 19, 2021

  • Gitea version (or commit ref):1.14.2

  • Git version: 2.31.1

  • Operating system: FreeBSD 12.2-RELEASE r366954 GENERIC amd64

  • Database (use [x]):

    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:

    • Yes (provide example URL)
    • No

Description

Error in line:
if user == nil || !strings.EqualFold(user.Email, commit.Author.Email) {
Sometimes commit.Author is nil and this value not checked.

Logs:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x4a43461]

goroutine 1 [running]:
code.gitea.io/gitea/models/migrations.fixPublisherIDforTagReleases(0xc0013c0630, 0x0, 0x0)
/usr/local/var/ports-tmp/usr/ports/www/gitea/work/gitea-1.14.2/models/migrations/v156.go:128 +0xba1
code.gitea.io/gitea/models/migrations.(*migration).Migrate(0xc0023df998, 0xc0013c0630, 0x902149, 0x11)
/usr/local/var/ports-tmp/usr/ports/www/gitea/work/gitea-1.14.2/models/migrations/migrations.go:49 +0x34
code.gitea.io/gitea/models/migrations.Migrate(0xc0013c0630, 0x0, 0x0)
/usr/local/var/ports-tmp/usr/ports/www/gitea/work/gitea-1.14.2/models/migrations/migrations.go:397 +0x538
code.gitea.io/gitea/models.NewEngine(0x1e259e8, 0xc00247d0f8, 0x164b598, 0x2b, 0xc00003d3e0)
/usr/local/var/ports-tmp/usr/ports/www/gitea/work/gitea-1.14.2/models/models.go:220 +0x9b
code.gitea.io/gitea/routers.initDBEngine(0x1e259e8, 0xc00247d0f8, 0x903535, 0x11)
/usr/local/var/ports-tmp/usr/ports/www/gitea/work/gitea-1.14.2/routers/init.go:76 +0x1fc
code.gitea.io/gitea/routers.GlobalInit(0x1e259e8, 0xc00247d0f8)
/usr/local/var/ports-tmp/usr/ports/www/gitea/work/gitea-1.14.2/routers/init.go:154 +0x376
code.gitea.io/gitea/cmd.runWeb(0xc001a9b4a0, 0x0, 0x0)
/usr/local/var/ports-tmp/usr/ports/www/gitea/work/gitea-1.14.2/cmd/web.go:128 +0x478
github.com/urfave/cli.HandleAction(0x3df720, 0x164b508, 0xc001a9b4a0, 0xc001a9b4a0, 0x0)
/usr/local/var/ports-tmp/usr/ports/www/gitea/work/gitea-1.14.2/vendor/github.com/urfave/cli/app.go:524 +0x105
github.com/urfave/cli.Command.Run(0x7eb9be, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x94f53b, 0x16, 0x0, ...)
/usr/local/var/ports-tmp/usr/ports/www/gitea/work/gitea-1.14.2/vendor/github.com/urfave/cli/command.go:173 +0x579
github.com/urfave/cli.(*App).Run(0xc001439dc0, 0xc000132000, 0x2, 0x2, 0x0, 0x0)
/usr/local/var/ports-tmp/usr/ports/www/gitea/work/gitea-1.14.2/vendor/github.com/urfave/cli/app.go:277 +0x808
main.main()
/usr/local/var/ports-tmp/usr/ports/www/gitea/work/gitea-1.14.2/main.go:115 +0xa6a

@zeripath zeripath added the issue/duplicate The issue has already been reported. label May 19, 2021
@zeripath zeripath added this to the 1.14.3 milestone May 19, 2021
@zeripath
Copy link
Contributor

I think this is a duplicate of #15827 and is already fixed by #15835 and #15839

@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/duplicate The issue has already been reported. type/bug
Projects
None yet
Development

No branches or pull requests

3 participants