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

"segmentation violation" issue on executing generate command #14

Open
MatteoGauthier opened this issue Aug 30, 2023 · 2 comments
Open

Comments

@MatteoGauthier
Copy link

Hey ! I got an issue by running commitlog generate after a fresh install

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x102fecdbc]

goroutine 1 [running]:
github.com/barelyhuman/commitlog/pkg.(*Generator).readCommitsInTags(0x140001b2140)
        /root/go/pkg/mod/github.com/barelyhuman/[email protected]/pkg/generator.go:91 +0x1bc
github.com/barelyhuman/commitlog/pkg.(*Generator).ReadCommmits(0x140001b2140)
        /root/go/pkg/mod/github.com/barelyhuman/[email protected]/pkg/generator.go:175 +0x4c
github.com/barelyhuman/commitlog/commands.Commitlog(0x14000136230?)
        /root/go/pkg/mod/github.com/barelyhuman/[email protected]/commands/commitlog.go:57 +0x538
main.main.func2(0x14000000a20?)
        /root/go/pkg/mod/github.com/barelyhuman/[email protected]/main.go:32 +0x1c
github.com/urfave/cli/v2.(*Command).Run(0x14000000a20, 0x1400010d840)
        /root/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:169 +0x4f8
github.com/urfave/cli/v2.(*App).RunContext(0x14000140680, {0x1031ffb90?, 0x103551e20}, {0x1400001e040, 0x2, 0x2})
        /root/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:341 +0x85c
github.com/urfave/cli/v2.(*App).Run(...)
        /root/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:247
main.main()
        /root/go/pkg/mod/github.com/barelyhuman/[email protected]/main.go:143 +0xc60
@barelyhuman
Copy link
Owner

barelyhuman commented Aug 30, 2023

Thanks for the report, I'm assuming the repository has no tags and that might have caused this issue, can you confirm if it throws at after adding a tag as well?

That should help debug , or I'd be fixing an unknown problem

Also, that looks like an older version of commitlog , can you try updating to the latest one?

curl -sLf https://goblin.run/github.com/barelyhuman/commitlog | sh

@barelyhuman
Copy link
Owner

Seems to be happening with the latest version as well,
Should be fixed in v3.0.0

curl -sLf https://goblin.run/github.com/barelyhuman/commitlog/v3@v3 | sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants