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

Fix: panic when config.ecs.launch_type is nil #66

Merged
merged 1 commit into from
Mar 29, 2024
Merged

Conversation

fujiwara
Copy link
Collaborator

Fix panic raised when launch_type is nil (not defined in yaml).

2024-03-29T05:47:33.811Z [info] [ecs.go:190] launching task subdomain:com taskdef:dev-app
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xcc36f5]
goroutine 161 [running]:
github.com/acidlemon/mirage-ecs/v2.(*ECS).launchTask(0xc0002e71a0, {0xfd2290, 0xc00012cc40}, {0xc0003b006a, 0x3}, {0xc0003b0084, 0x7}, 0xc000462240?)
	/stash/src/github.com/acidlemon/mirage-ecs/ecs.go:220 +0x735
github.com/acidlemon/mirage-ecs/v2.(*ECS).Launch.func1()
	/stash/src/github.com/acidlemon/mirage-ecs/ecs.go:259 +0x33
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/stash/pkg/mod/golang.org/x/sync@v0.3.0/errgroup/errgroup.go:75 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 145
	/stash/pkg/mod/golang.org/x/sync@v0.3.0/errgroup/errgroup.go:72 +0x96

@fujiwara fujiwara merged commit 3846b16 into v2 Mar 29, 2024
4 checks passed
@fujiwara fujiwara deleted the fix/lanunch-type-nil branch March 29, 2024 06:07
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

Successfully merging this pull request may close these issues.

1 participant