Skip to content

fix: nzmap slice index out of bound - #214

Merged
junghao merged 2 commits into
mainfrom
nzmap-crash
Sep 14, 2026
Merged

fix: nzmap slice index out of bound#214
junghao merged 2 commits into
mainfrom
nzmap-crash

Conversation

@junghao

@junghao junghao commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Proposed Changes

Saw a crash in logs

2026-09-01T11:50:51.562Z
www-geonet/96e661d 2026/09/01 23:50:51 http: panic serving 172.31.6.150:30538: runtime error: index out of range [140] with length 140

www-geonet/96e661d 2026/09/01 23:50:51 http: panic serving 172.31.6.150:30538: runtime error: index out of range [140] with length 140
2026-09-01T11:50:51.562Z
goroutine 2520026 [running]:
2026-09-01T11:50:51.562Z
net/http.(*conn).serve.func1()
2026-09-01T11:50:51.562Z
/usr/local/go/src/net/http/server.go:1897 +0xbd
2026-09-01T11:50:51.562Z
panic({0xb4f880?, 0x16050b3c60a8?})
2026-09-01T11:50:51.562Z
/usr/local/go/src/runtime/panic.go:860 +0x13a
2026-09-01T11:50:51.562Z
github.com/GeoNet/kit/map180/nzmap.Points.Medium({0x160509d3dc08, 0xa, 0x497e88?}, 0x16050c7a27e0)
2026-09-01T11:50:51.562Z
/repo/vendor/github.com/GeoNet/kit/map180/nzmap/nzmap.go:266 +0x517
2026-09-01T11:50:51.562Z
main.(*quakeHistory).originMap(0x16050b1cc420)
2026-09-01T11:50:51.562Z
/repo/cmd/www-geonet/quake_history.go:128 +0x2a5
2026-09-01T11:50:51.562Z
main.quakeHistoryHandler(0x160509d74140, 0x3?, 0x16050c822060, {0x16050b4be060, 0x14})
2026-09-01T11:50:51.562Z
/repo/cmd/www-geonet/quake_history.go:63 +0x43a
2026-09-01T11:50:51.562Z
main.createMux.MakeHandlerWithCspNonce.func25({0xc0e500, 0x16050c8a6000}, 0x160509d74140)
2026-09-01T11:50:51.562Z
/repo/vendor/github.com/GeoNet/kit/weft/handlers.go:208 +0x1b3
2026-09-01T11:50:51.562Z
net/http.HandlerFunc.ServeHTTP(0x160509bea000?, {0xc0e500?, 0x16050c8a6000?}, 0xb97788?)
2026-09-01T11:50:51.562Z
/usr/local/go/src/net/http/server.go:2286 +0x29
2026-09-01T11:50:51.562Z
net/http.(*ServeMux).ServeHTTP(0x16050c8240f0?, {0xc0e500, 0x16050c8a6000}, 0x160509d74140)
2026-09-01T11:50:51.562Z
/usr/local/go/src/net/http/server.go:2828 +0x1c7
2026-09-01T11:50:51.562Z
main.main.inbound.func2({0xc0e500, 0x16050c8a6000}, 0x160509d74140)
2026-09-01T11:50:51.562Z
/repo/cmd/www-geonet/inbound.go:13 +0x77
2026-09-01T11:50:51.562Z
net/http.HandlerFunc.ServeHTTP(0x485179?, {0xc0e500?, 0x16050c8a6000?}, 0x160509dcfb30?)
2026-09-01T11:50:51.562Z
/usr/local/go/src/net/http/server.go:2286 +0x29
2026-09-01T11:50:51.562Z
net/http.serverHandler.ServeHTTP({0x16050a41f140?}, {0xc0e500?, 0x16050c8a6000?}, 0x6?)
2026-09-01T11:50:51.562Z
/usr/local/go/src/net/http/server.go:3311 +0x8e
2026-09-01T11:50:51.562Z
net/http.(*conn).serve(0x16050b961560, {0xc0f168, 0x16050b260210})
2026-09-01T11:50:51.562Z
/usr/local/go/src/net/http/server.go:2067 +0x690
2026-09-01T11:50:51.562Z
created by net/http.(*Server).Serve in goroutine 1
2026-09-01T11:50:51.562Z
/usr/local/go/src/net/http/server.go:3464 +0x485

Changes proposed in this pull request:

  • nzmap.go

Production Changes

The following production changes are required to deploy these changes:

  • None

Review

Check the box that applies to this code review. If necessary please seek help with adding a checklist guide for the reviewer.
When assigning the code review please consider the expertise needed to review the changes.

  • This is a content (documentation, web page etc) only change.
  • This is a minor change (meta data, bug fix, improve test coverage etc).
  • This is a larger change (new feature, significant refactoring etc). Please use the code review guidelines to add a checklist below to guide the code reviewer.

Code Review Guide

Insert check list here if needed.

@junghao
junghao requested a review from bpeng September 14, 2026 03:13
@junghao
junghao merged commit 53303ab into main Sep 14, 2026
8 checks passed
@junghao
junghao deleted the nzmap-crash branch September 14, 2026 03:47
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.

2 participants