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

Runtime error #1316

Closed
aplitvinov opened this issue Sep 4, 2022 · 1 comment
Closed

Runtime error #1316

aplitvinov opened this issue Sep 4, 2022 · 1 comment

Comments

@aplitvinov
Copy link

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x10 pc=0xbd8d28]

goroutine 1 [running]:
github.com/swaggo/swag.(*PackagesDefinitions).parseFunctionScopedTypesFromFile(0xc00009a018, 0xc00023ba80, {0xc00001cb58, 0x17}, 0xc00c254750)
        C:/Project/Golang/pkg/mod/github.com/swaggo/swag@v1.8.5/packages.go:168 +0xa8
github.com/swaggo/swag.(*PackagesDefinitions).ParseTypes(0xc00009a018)
        C:/Project/Golang/pkg/mod/github.com/swaggo/swag@v1.8.5/packages.go:110 +0xc9
github.com/swaggo/swag.(*Parser).ParseAPIMultiSearchDir(0xc0000a0000, {0xc000191f50?, 0x1?, 0x0?}, {0xc00001c180?, 0x13?}, 0x64)
        C:/Project/Golang/pkg/mod/github.com/swaggo/swag@v1.8.5/parser.go:362 +0x3bf
github.com/swaggo/swag/gen.(*Gen).Build(0xc000195aa0, 0xc000197380)
        C:/Project/Golang/pkg/mod/github.com/swaggo/swag@v1.8.5/gen/gen.go:177 +0x5c9
main.initAction(0xc000171680?)
        C:/Project/Golang/pkg/mod/github.com/swaggo/swag@v1.8.5/cmd/swag/main.go:151 +0x757
github.com/urfave/cli/v2.(*Command).Run(0xc00016f440, 0xc0001a8540)
        C:/Project/Golang/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:163 +0x5bb
github.com/urfave/cli/v2.(*App).RunContext(0xc0001756c0, {0xda36a8?, 0xc000024118}, {0xc000122000, 0x6, 0x8})
        C:/Project/Golang/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:313 +0xb48
github.com/urfave/cli/v2.(*App).Run(...)
        C:/Project/Golang/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:224
main.main()
        C:/Project/Golang/pkg/mod/github.com/swaggo/swag@v1.8.5/cmd/swag/main.go:221 +0x55d
make: *** [Makefile:24: swag] Error 2

To Reproduce
Steps to reproduce the behavior:
swag init -g internal/app/app.go --parseDependency --parseInternal

Your swag version
e.g. 1.8.5

Your go version
e.g. 1.18.1

Desktop (please complete the following information):

  • OS: Windows 10x64

Note:
swag version 1.8.4 it's work

@aplitvinov
Copy link
Author

Sorry, issue already exists #1309

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

1 participant