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

Trying to retrieve default branch segfaults #12

Open
csmith opened this issue Feb 23, 2019 · 0 comments
Open

Trying to retrieve default branch segfaults #12

csmith opened this issue Feb 23, 2019 · 0 comments

Comments

@csmith
Copy link

csmith commented Feb 23, 2019

Running a build from master I reliably hit this shortly after startup (v0.4.7 works fine):

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

goroutine 1 [running]:
main.handleNotification(0x715ce0, 0xc00007c300, 0xc0000ee280, 0xc000504100, 0xc0001b2010, 0x6, 0x1c, 0xc0003be000)
	/go/src/github.com/genuinetools/ghb0t/main.go:185 +0x208
main.getNotifications(0x715ce0, 0xc00007c300, 0xc0000ee280, 0xc0001b2010, 0x6, 0x1, 0x14, 0x0, 0x0)
	/go/src/github.com/genuinetools/ghb0t/main.go:144 +0x1ab
main.main.func2(0x715ce0, 0xc00007c300, 0xc00008c010, 0x0, 0x0, 0x0, 0x0)
	/go/src/github.com/genuinetools/ghb0t/main.go:112 +0x401
github.com/genuinetools/ghb0t/vendor/github.com/genuinetools/pkg/cli.(*Program).run(0xc000104000, 0x715da0, 0xc00007ede0, 0xc00008c000, 0x2, 0x2, 0x4c15f0, 0xc00008a2a0)
	/go/src/github.com/genuinetools/ghb0t/vendor/github.com/genuinetools/pkg/cli/cli.go:179 +0x281
github.com/genuinetools/ghb0t/vendor/github.com/genuinetools/pkg/cli.(*Program).Run(0xc000104000)
	/go/src/github.com/genuinetools/ghb0t/vendor/github.com/genuinetools/pkg/cli/cli.go:89 +0x67
main.main()
	/go/src/github.com/genuinetools/ghb0t/main.go:120 +0x287

main.go:185 being:

 			defaultBranch := *notification.Repository.DefaultBranch 

Looking at the JSON returned from the /notifications endpoint by hand it looks like there isn't a default_branch key for the repository and it's not actually listed in the notification docs, so I'm not quite sure where that field is meant to come from.

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

1 participant