-
-
Notifications
You must be signed in to change notification settings - Fork 197
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 nil pointer dereference when using implicit zooms #387
Conversation
…ying to local variable
Pull Request Test Coverage Report for Build 965
💛 - Coveralls |
Pull Request Test Coverage Report for Build 964
💛 - Coveralls |
@ear7h can you add a test to prove the bug and that it's handled? We like to make sure all bug reports have an associated test to avoid the issue in the future. |
@ARolek will do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I built with 6029db7 and I still get an error
$ ~/go/src/github.com/go-spatial/tegola/cmd/tegola/tegola serve
2018-04-01 17:37:02 [INFO] config.go:203: loading local config (config.toml)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x55933f5ba760]
goroutine 1 [running]:
panic(0x55933fc198a0, 0xc4200140d0)
/usr/lib/go-1.7/src/runtime/panic.go:500 +0x1a1
github.com/go-spatial/tegola/config.(*Config).Validate(0x559340310680, 0xb, 0x0)
/home/pnorman/go/src/github.com/go-spatial/tegola/config/config.go:108 +0x2b0
github.com/go-spatial/tegola/cmd/tegola/cmd.initConfig()
/home/pnorman/go/src/github.com/go-spatial/tegola/cmd/tegola/cmd/root.go:71 +0xf5
github.com/go-spatial/tegola/cmd/tegola/cmd.glob..func3(0x5593402b7dc0, 0x55934032d8a0, 0x0, 0x0)
/home/pnorman/go/src/github.com/go-spatial/tegola/cmd/tegola/cmd/server.go:21 +0x45
github.com/go-spatial/tegola/vendor/github.com/spf13/cobra.(*Command).execute(0x5593402b7dc0, 0x55934032d8a0, 0x0, 0x0, 0x5593402b7dc0, 0x55934032d8a0)
/home/pnorman/go/src/github.com/go-spatial/tegola/vendor/github.com/spf13/cobra/command.go:702 +0x4a3
github.com/go-spatial/tegola/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x5593402b7ba0, 0x0, 0x5593402b7dc0, 0xc420199ef0)
/home/pnorman/go/src/github.com/go-spatial/tegola/vendor/github.com/spf13/cobra/command.go:783 +0x377
github.com/go-spatial/tegola/vendor/github.com/spf13/cobra.(*Command).Execute(0x5593402b7ba0, 0x0, 0x0)
/home/pnorman/go/src/github.com/go-spatial/tegola/vendor/github.com/spf13/cobra/command.go:736 +0x2b
main.main()
/home/pnorman/go/src/github.com/go-spatial/tegola/cmd/tegola/main.go:13 +0x31
LGTM. @pnorman when you have a moment can you give this a test with your problematic config? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
See #386
Fix to apply layer MaxZoom and MinZoom to underlying config. Was applying to local variable