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

[makevalid] [constrainted triangulation] panic in (*QuadEdge).Sym #76

Closed
ear7h opened this issue Sep 29, 2019 · 3 comments
Closed

[makevalid] [constrainted triangulation] panic in (*QuadEdge).Sym #76

ear7h opened this issue Sep 29, 2019 · 3 comments

Comments

@ear7h
Copy link
Contributor

ear7h commented Sep 29, 2019

Testing the new simplification function, I am running into a nil pointer dereference.

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x467a656]

goroutine 407 [running]:
github.com/go-spatial/tegola/atlas.Map.Encode.func1.1.1(0xc0002e1aa0, 0xc000c67e00, 0xc0070f7358)
	/Users/julio/lib/go/src/github.com/go-spatial/tegola/atlas/map.go:215 +0x505
panic(0x49c0580, 0x527c920)
	/usr/local/go/src/runtime/panic.go:679 +0x1b2
github.com/go-spatial/geom/planar/triangulate/quadedge.(*QuadEdge).Sym(...)
	/Users/julio/lib/go/src/github.com/go-spatial/geom/planar/triangulate/quadedge/quadedge.go:251
github.com/go-spatial/geom/planar/triangulate/constraineddelaunay.(*Triangulator).deleteEdge(0xc0070f6f58, 0xc0009644e0, 0x41716c4ca9fb7e18, 0x415ffcf349193de5)
	/Users/julio/lib/go/src/github.com/go-spatial/geom/planar/triangulate/constraineddelaunay/triangulator.go:162 +0xa6
github.com/go-spatial/geom/planar/triangulate/constraineddelaunay.(*Triangulator).insertEdgeCDT(0xc0070f6f58, 0xc0070f6a88, 0x0, 0x0, 0x0, 0x0)
	/Users/julio/lib/go/src/github.com/go-spatial/geom/planar/triangulate/constraineddelaunay/triangulator.go:757 +0x1678
github.com/go-spatial/geom/planar/triangulate/constraineddelaunay.(*Triangulator).insertConstraints(0xc0070f6f58, 0x49d6e80, 0xc0014c3320, 0x0, 0x0, 0x0, 0x42d7c700ad4cb1c5)
	/Users/julio/lib/go/src/github.com/go-spatial/geom/planar/triangulate/constraineddelaunay/triangulator.go:460 +0x5a8
github.com/go-spatial/geom/planar/triangulate/constraineddelaunay.(*Triangulator).InsertGeometries(0xc0070f6f58, 0xc0070f6f48, 0x1, 0x1, 0x0, 0x0, 0x0, 0xc0070f6ee0, 0x466d202)
	/Users/julio/lib/go/src/github.com/go-spatial/geom/planar/triangulate/constraineddelaunay/triangulator.go:373 +0x13b
github.com/go-spatial/geom/planar/makevalid.TriangulateGeometry(0x4c38980, 0xc0008cd350, 0x49d6e80, 0xc0014c3320, 0x54, 0x5c, 0x56, 0xc0070f7010, 0x409f999)
	/Users/julio/lib/go/src/github.com/go-spatial/geom/planar/makevalid/triangulate.go:19 +0xb3
github.com/go-spatial/geom/planar/makevalid.InsideTrianglesForGeometry(0x4c38980, 0xc0008cd350, 0x49d6e80, 0xc0014c3320, 0x4c31c00, 0xc00411fd20, 0x0, 0x0, 0x0, 0xc000099800, ...)
	/Users/julio/lib/go/src/github.com/go-spatial/geom/planar/makevalid/triangulate.go:57 +0x6a
github.com/go-spatial/geom/planar/makevalid.(*Makevalid).makevalidPolygon(0xc0070f7388, 0x4c38980, 0xc0008cd350, 0xc000798020, 0xc0014c3320, 0x1, 0x0, 0xc0070f7218)
	/Users/julio/lib/go/src/github.com/go-spatial/geom/planar/makevalid/makevalid.go:194 +0x11c
github.com/go-spatial/geom/planar/makevalid.(*Makevalid).Makevalid(0xc0070f7388, 0x4c38980, 0xc0008cd350, 0x49cd360, 0xc00683a2a0, 0xc000798020, 0x0, 0xc00683a2a0, 0x0, 0x0, ...)
	/Users/julio/lib/go/src/github.com/go-spatial/geom/planar/makevalid/makevalid.go:235 +0x57c
github.com/go-spatial/tegola/atlas.Map.Encode.func1.1(0xc0015a0000, 0x0, 0x0)
	/Users/julio/lib/go/src/github.com/go-spatial/tegola/atlas/map.go:254 +0x384
github.com/go-spatial/tegola/provider/postgis.Provider.TileFeatures(0xc0000d1570, 0x9, 0x1538, 0xc0000d15a0, 0xd, 0xc0000d15d0, 0x6, 0x0, 0x0, 0x0, ...)
	/Users/julio/lib/go/src/github.com/go-spatial/tegola/provider/postgis/postgis.go:601 +0xa41
github.com/go-spatial/tegola/atlas.Map.Encode.func1(0xc000cbe450, 0xc000c67e00, 0xc000255d90, 0x2, 0xc00027ede0, 0x10, 0x520d660, 0xc053119efffcb851, 0x404393a5a4fa85e7, 0x4014000000000000, ...)
	/Users/julio/lib/go/src/github.com/go-spatial/tegola/atlas/map.go:166 +0x272
created by github.com/go-spatial/tegola/atlas.Map.Encode
	/Users/julio/lib/go/src/github.com/go-spatial/tegola/atlas/map.go:154 +0x208
@gdey
Copy link
Member

gdey commented Sep 29, 2019

Do you have the geo that is getting simplified that is causing that panic? It would be interesting to see what is being passed into the make valid.

Looks the issue is happening after edge delation to add a constraint.

@ear7h
Copy link
Contributor Author

ear7h commented Sep 29, 2019

@gdey yep, just took me a bit to upload

https://gist.github.com/ear7h/b231f1bf4ff4b3c74555a0c2fb30208d

@gdey gdey changed the title makevalid: panic in (*QuadEdge).Sym [makevalid] [constrainted triangulation] panic in (*QuadEdge).Sym Sep 29, 2019
@gdey
Copy link
Member

gdey commented Nov 14, 2019

We moved away from this library.

@gdey gdey closed this as completed Nov 14, 2019
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

2 participants