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

bug: invalid memory address or nil pointer dereference at getFileSHA() #84

Closed
daniel-hutao opened this issue Dec 28, 2021 · 0 comments · Fixed by #85
Closed

bug: invalid memory address or nil pointer dereference at getFileSHA() #84

daniel-hutao opened this issue Dec 28, 2021 · 0 comments · Fixed by #85
Assignees
Labels
bug Something isn't working
Projects

Comments

@daniel-hutao
Copy link
Member

daniel-hutao commented Dec 28, 2021

Describe the Bug

invalid memory address or nil pointer dereference at getFileSHA()

2021/12/28 13:18:02 language is go-1.17
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x12bbfc7e0]

goroutine 1 [running]:
github.com/merico-dev/stream/internal/pkg/githubactions.(*GithubActions).getFileSHA(0x1400006a7e0, {0x12bc03c3c, 0xe})
	github.com/merico-dev/stream/internal/pkg/githubactions/githubactions.go:125 +0x1a0
github.com/merico-dev/stream/internal/pkg/githubactions.(*GithubActions).DeleteWorkflow(0x1400006a7e0, 0x140001c65d0)
	github.com/merico-dev/stream/internal/pkg/githubactions/githubactions.go:80 +0x60
github.com/merico-dev/stream/internal/pkg/githubactions.Uninstall(0x14000113c10)
	github.com/merico-dev/stream/internal/pkg/githubactions/uninstall.go:17 +0x218
github.com/merico-dev/stream/cmd/githubactions.Plugin.Uninstall({0x0, 0x0}, 0x14000113c10)
	github.com/merico-dev/stream/cmd/githubactions/main.go:27 +0x34
github.com/merico-dev/stream/internal/pkg/pluginengine.Uninstall(0x14000113bf0)
	github.com/merico-dev/stream/internal/pkg/pluginengine/plugin.go:42 +0xd4
github.com/merico-dev/stream/internal/pkg/planmanager.(*Plan).Execute(0x14000113b60)
	github.com/merico-dev/stream/internal/pkg/planmanager/plan.go:61 +0x3b0
main.installCMDFunc(0x10348b980, {0x1400006a3e0, 0x0, 0x2})
	github.com/merico-dev/stream/cmd/devstream/install.go:45 +0x318
github.com/spf13/cobra.(*Command).execute(0x10348b980, {0x1400006a3c0, 0x2, 0x2})
	github.com/spf13/cobra@v1.2.1/command.go:860 +0xa04
github.com/spf13/cobra.(*Command).ExecuteC(0x10348bc00)
	github.com/spf13/cobra@v1.2.1/command.go:974 +0x7b8
github.com/spf13/cobra.(*Command).Execute(0x10348bc00)
	github.com/spf13/cobra@v1.2.1/command.go:902 +0x30
main.main()
	github.com/merico-dev/stream/cmd/devstream/main.go:28 +0x30

image

Other notes

I've fixed this bug at #74 but it's reopen at #76 by "resolve conflict".

image

This is not a criticism of @lfbdev
Just remind us all that we should pay more attention at "avoid confict"/"resolve conflict"/"code review"

/kind bug
/cc @merico-dev/devstream

@daniel-hutao daniel-hutao added the bug Something isn't working label Dec 28, 2021
@daniel-hutao daniel-hutao self-assigned this Dec 28, 2021
daniel-hutao added a commit that referenced this issue Dec 28, 2021
fix: #84 invalid memory address or nil pointer dereference at getFileSHA()
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
No open projects
v0.1.0
Awaiting triage
Development

Successfully merging a pull request may close this issue.

1 participant