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

SIGSEGV when generating design #3573

Closed
njaremko opened this issue Aug 8, 2024 · 2 comments
Closed

SIGSEGV when generating design #3573

njaremko opened this issue Aug 8, 2024 · 2 comments

Comments

@njaremko
Copy link

njaremko commented Aug 8, 2024

I've attached the file here: design.go

exit status 2
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x1005c1938]

goroutine 1 [running]:
goa.design/goa/v3/expr.DupScheme(...)
	/Users/njaremko/go/pkg/mod/goa.design/goa/[email protected]/expr/security.go:123
goa.design/goa/v3/dsl.Security({0x1400039fa90, 0x12?, 0x0?})
	/Users/njaremko/go/pkg/mod/goa.design/goa/[email protected]/dsl/security.go:255 +0x168
com/census/catalog/design.init.func1()
	/Users/njaremko/Development/delta/catalog/design/design.go:27 +0xe0
goa.design/goa/v3/eval.Execute(0x100c36c70?, {0x1008b4628?, 0x140001d8300?})
	/Users/njaremko/go/pkg/mod/goa.design/goa/[email protected]/eval/eval.go:78 +0x104
goa.design/goa/v3/eval.runSet({0x1400036edc0, 0x1, 0x1})
	/Users/njaremko/go/pkg/mod/goa.design/goa/[email protected]/eval/eval.go:196 +0x254
goa.design/goa/v3/expr.(*RootExpr).WalkSets(0x140001c6840, 0x1008b11c8)
	/Users/njaremko/go/pkg/mod/goa.design/goa/[email protected]/expr/root.go:61 +0x1bc
goa.design/goa/v3/eval.RunDSL()
	/Users/njaremko/go/pkg/mod/goa.design/goa/[email protected]/eval/eval.go:33 +0x3e0
main.main()
	/Users/njaremko/Development/delta/catalog/goa1222155152/main.go:55 +0x2d4
@tchssk
Copy link
Member

tchssk commented Aug 9, 2024

OAuth2Security is a top level DSL.
It must be assigned to a variable once and then pass it to the Security DSL.

var OAuth2 = OAuth2Security("oauth2")

var _ = API("api", func() {
	Security(OAuth2)
})

@raphael
Copy link
Member

raphael commented Aug 14, 2024

Thank you for the PR @tchssk !

@raphael raphael closed this as completed Aug 14, 2024
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

3 participants