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: runtime error: invalid memory address or nil pointer dereference #460

Closed
gnuletik opened this issue Feb 19, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@gnuletik
Copy link
Contributor

Hello,

We got the following panic in one of our CI.
The strange thing is that this occurred only once. It was fixed after a retry.

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

goroutine 5661 [running]:
github.com/daveshanley/vacuum/functions/openapi.DescriptionDuplication.RunRule({}, {0xc000d140a8?, 0x1b63a20?, 0x1?}, {0xc0018621e0, 0xc000478540, {0x1b37020, 0x20ab3a0}, {0x0, 0x0}, ...})
	/home/actions-runner-1/.cache/pre-commit/repojvpy7jiz/functions/openapi/description_duplication.go:59 +0x2c9
github.com/daveshanley/vacuum/motor.buildResults({0xc000478540, 0xc000122140, 0xc000122140, {0x20b9960, 0xc000126000}, 0xc000138018, 0xc000d32300, 0xc0002fc508, 0xc000146000, 0x0, ...}, ...)
	/home/actions-runner-1/.cache/pre-commit/repojvpy7jiz/motor/rule_applicator.go:827 +0x669
github.com/daveshanley/vacuum/motor.runRule({0xc000478540, 0xc000122140, 0xc000122140, {0x20b9960, 0xc000126000}, 0xc000138018, 0xc000d32300, 0xc0002fc508, 0xc000146000, 0x0, ...}, ...)
	/home/actions-runner-1/.cache/pre-commit/repojvpy7jiz/motor/rule_applicator.go:749 +0xbd6
created by github.com/daveshanley/vacuum/motor.ApplyRulesToRuleSet.func7 in goroutine 5787
	/home/actions-runner-1/.cache/pre-commit/repojvpy7jiz/motor/rule_applicator.go:605 +0x2a8
@daveshanley
Copy link
Owner

strange, I have no idea it would fail a single time, however I can prevent it from happening again with a nil pointer check here.

@daveshanley daveshanley added the bug Something isn't working label Feb 19, 2024
daveshanley added a commit that referenced this issue Feb 20, 2024
Signed-off-by: quobix <dave@quobix.com>
@daveshanley daveshanley mentioned this issue Feb 20, 2024
daveshanley added a commit that referenced this issue Feb 20, 2024
Signed-off-by: quobix <dave@quobix.com>
@daveshanley
Copy link
Owner

in v0.9.8 there is a nil pointer check added to stop this from being able to fire.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants