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

Crash if updating labels on google_project fails #1016

Closed
ewbankkit opened this issue Jan 27, 2018 · 1 comment · Fixed by #1017
Closed

Crash if updating labels on google_project fails #1016

ewbankkit opened this issue Jan 27, 2018 · 1 comment · Fixed by #1017
Labels

Comments

@ewbankkit
Copy link
Contributor

ewbankkit commented Jan 27, 2018

Crash when attempting to update labels on a google_project resource and that update fails:

panic: runtime error: invalid memory address or nil pointer dereference
2018-01-27T16:39:38.583-0500 [DEBUG] plugin.terraform-provider-google_v1.5.0_x4: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1e936ef]
2018-01-27T16:39:38.583-0500 [DEBUG] plugin.terraform-provider-google_v1.5.0_x4: 
2018-01-27T16:39:38.583-0500 [DEBUG] plugin.terraform-provider-google_v1.5.0_x4: goroutine 208 [running]:
2018-01-27T16:39:38.583-0500 [DEBUG] plugin.terraform-provider-google_v1.5.0_x4: github.com/terraform-providers/terraform-provider-google/google.resourceGoogleProjectUpdate(0xc42041d030, 0x20edc00, 0xc42067cd20, 0x24, 0x2e63f00)
2018-01-27T16:39:38.583-0500 [DEBUG] plugin.terraform-provider-google_v1.5.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-google/google/resource_google_project.go:292 +0xbaf
...

Relevant code:
https://github.com/terraform-providers/terraform-provider-google/blob/838296e155281a0014092248216cab4e2dc2b262/google/resource_google_project.go#L290-L293

The problem is that p is nil on failure so p.Name causes the nil pointer dereference panic.

@ghost ghost added the crash label Jan 27, 2018
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Sep 27, 2019
@ghost
Copy link

ghost commented Mar 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant