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 nil pointer dereference when using implicit zooms #387

Merged
merged 3 commits into from
Apr 3, 2018

Conversation

ear7h
Copy link
Contributor

@ear7h ear7h commented Apr 1, 2018

See #386

Fix to apply layer MaxZoom and MinZoom to underlying config. Was applying to local variable

@ear7h ear7h requested review from ARolek and gdey as code owners April 1, 2018 18:46
@coveralls
Copy link

coveralls commented Apr 1, 2018

Pull Request Test Coverage Report for Build 965

  • 8 of 8 (100.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.07%) to 46.325%

Files with Coverage Reduction New Missed Lines %
provider/gpkg/binary_header.go 2 100.0%
Totals Coverage Status
Change from base Build 962: 0.07%
Covered Lines: 5824
Relevant Lines: 12572

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 964

  • 2 of 4 (50.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage remained the same at 46.252%

Changes Missing Coverage Covered Lines Changed/Added Lines %
config/config.go 2 4 50.0%
Files with Coverage Reduction New Missed Lines %
provider/gpkg/binary_header.go 2 100.0%
Totals Coverage Status
Change from base Build 962: 0.0%
Covered Lines: 5812
Relevant Lines: 12566

💛 - Coveralls

@ARolek
Copy link
Member

ARolek commented Apr 1, 2018

@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.

@ear7h
Copy link
Contributor Author

ear7h commented Apr 1, 2018

@ARolek will do

Copy link
Contributor

@pnorman pnorman left a 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

@ARolek
Copy link
Member

ARolek commented Apr 3, 2018

LGTM. @pnorman when you have a moment can you give this a test with your problematic config?

@pnorman
Copy link
Contributor

pnorman commented Apr 3, 2018

LGTM. @pnorman when you have a moment can you give this a test with your problematic config?

WFM with 0c4c0be

Copy link
Member

@gdey gdey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gdey gdey merged commit ecf3265 into go-spatial:v0.7.0 Apr 3, 2018
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.

5 participants