{"action":"created","issue":{"url":"https://api.github.com/repos/chihaya/chihaya/issues/54","labels_url":"https://api.github.com/repos/chihaya/chihaya/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/chihaya/chihaya/issues/54/comments","events_url":"https://api.github.com/repos/chihaya/chihaya/issues/54/events","html_url":"https://github.com/chihaya/chihaya/issues/54","id":58058641,"number":54,"title":"Panic error when accessing stats","user":{"login":"Power2All","id":2010549,"avatar_url":"https://avatars.githubusercontent.com/u/2010549?v=3","gravatar_id":"","url":"https://api.github.com/users/Power2All","html_url":"https://github.com/Power2All","followers_url":"https://api.github.com/users/Power2All/followers","following_url":"https://api.github.com/users/Power2All/following{/other_user}","gists_url":"https://api.github.com/users/Power2All/gists{/gist_id}","starred_url":"https://api.github.com/users/Power2All/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Power2All/subscriptions","organizations_url":"https://api.github.com/users/Power2All/orgs","repos_url":"https://api.github.com/users/Power2All/repos","events_url":"https://api.github.com/users/Power2All/events{/privacy}","received_events_url":"https://api.github.com/users/Power2All/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chihaya/chihaya/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-18T11:54:20Z","updated_at":"2015-02-20T08:59:13Z","closed_at":null,"body":"Trying this tracker out for the first time to possible replace ocelot.\r\nSadly, when I access stats, I get a immediate panic error.\r\nIP address in the bottom log is censored.\r\nHere is the full error log:\r\n\r\n\r\n\r\n2015/02/18 12:42:15 http: panic serving x.x.x.x:58379: runtime error: invalid memory address or nil pointer dereference\r\ngoroutine 16 [running]:\r\nnet/http.func·011()\r\n        /usr/local/go/src/net/http/server.go:1130 +0xa8\r\nencoding/json.func·002()\r\n        /usr/local/go/src/encoding/json/encode.go:262 +0x7a\r\nsync/atomic.LoadUint64(0x18632024, 0xf757f338, 0x18632000)\r\n        /usr/local/go/src/sync/atomic/asm_386.s:165 +0xb\r\ngithub.com/pushrax/faststats.(*Percentile).Value(0x18632000, 0x80522ce, 0x18642950)\r\n        /usr/local/gosrc/src/github.com/pushrax/faststats/percentile.go:47 +0x3a\r\ngithub.com/pushrax/faststats.(*Percentile).MarshalJSON(0x18632000, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n        /usr/local/gosrc/src/github.com/pushrax/faststats/json.go:10 +0x50\r\nencoding/json.marshalerEncoder(0x1867a820, 0x829ab00, 0x1863c184, 0xd6, 0x0)\r\n        /usr/local/go/src/encoding/json/encode.go:416 +0xea\r\nencoding/json.(*structEncoder).encode(0x1872e600, 0x1867a820, 0x8291140, 0x1863c184, 0xd9, 0x0)\r\n        /usr/local/go/src/encoding/json/encode.go:584 +0x211\r\nencoding/json.*structEncoder.(encoding/json.encode)·fm(0x1867a820, 0x8291140, 0x1863c184, 0xd9, 0x0)\r\n        /usr/local/go/src/encoding/json/encode.go:598 +0x50\r\nencoding/json.(*structEncoder).encode(0x1872e4c0, 0x1867a820, 0x82ae940, 0x1863c140, 0xd9, 0x18636100)\r\n        /usr/local/go/src/encoding/json/encode.go:584 +0x211\r\nencoding/json.*structEncoder.(encoding/json.encode)·fm(0x1867a820, 0x82ae940, 0x1863c140, 0xd9, 0x1863c100)\r\n        /usr/local/go/src/encoding/json/encode.go:598 +0x50\r\nencoding/json.(*ptrEncoder).encode(0x18730150, 0x1867a820, 0x82a88a0, 0x1863c140, 0x16, 0x0)\r\n        /usr/local/go/src/encoding/json/encode.go:706 +0xc7\r\nencoding/json.*ptrEncoder.(encoding/json.encode)·fm(0x1867a820, 0x82a88a0, 0x1863c140, 0x16, 0x1863c100)\r\n        /usr/local/go/src/encoding/json/encode.go:711 +0x50\r\nencoding/json.(*encodeState).reflectValue(0x1867a820, 0x82a88a0, 0x1863c140, 0x16)\r\n        /usr/local/go/src/encoding/json/encode.go:299 +0x64\r\nencoding/json.(*encodeState).marshal(0x1867a820, 0x82a88a0, 0x1863c140, 0x0, 0x0)\r\n        /usr/local/go/src/encoding/json/encode.go:270 +0xb1\r\nencoding/json.(*Encoder).Encode(0x18630940, 0x82a88a0, 0x1863c140, 0x0, 0x0)\r\n        /usr/local/go/src/encoding/json/stream.go:160 +0x6c\r\ngithub.com/chihaya/chihaya/http.(*Server).stats(0x1861c348, 0xf757f298, 0x18634a80, 0x18634a10, 0x0, 0x0, 0x0, 0x54e47a97, 0x0, 0x0)\r\n        /usr/local/gosrc/src/github.com/chihaya/chihaya/http/routes.go:70 +0x2c0\r\ngithub.com/chihaya/chihaya/http.*Server.(github.com/chihaya/chihaya/http.stats)·fm(0xf757f298, 0x18634a80, 0x18634a10, 0x0, 0x0, 0x0, 0x840ec20, 0x0, 0x0)\r\n        /usr/local/gosrc/src/github.com/chihaya/chihaya/http/http.go:95 +0x67\r\ngithub.com/chihaya/chihaya/http.func·001(0xf757f298, 0x18634a80, 0x18634a10, 0x0, 0x0, 0x0)\r\n        /usr/local/gosrc/src/github.com/chihaya/chihaya/http/http.go:38 +0xb5\r\ngithub.com/julienschmidt/httprouter.(*Router).ServeHTTP(0x1860a640, 0xf757f298, 0x18634a80, 0x18634a10)\r\n        /usr/local/gosrc/src/github.com/julienschmidt/httprouter/router.go:298 +0x141\r\nnet/http.serverHandler.ServeHTTP(0x186b2080, 0xf757f298, 0x18634a80, 0x18634a10)\r\n        /usr/local/go/src/net/http/server.go:1703 +0x145\r\nnet/http.(*conn).serve(0x186483c0)\r\n        /usr/local/go/src/net/http/server.go:1204 +0x9d8\r\ncreated by net/http.(*Server).Serve\r\n        /usr/local/go/src/net/http/server.go:1751 +0x2ce\r\n"},"comment":{"url":"https://api.github.com/repos/chihaya/chihaya/issues/comments/75207583","html_url":"https://github.com/chihaya/chihaya/issues/54#issuecomment-75207583","issue_url":"https://api.github.com/repos/chihaya/chihaya/issues/54","id":75207583,"user":{"login":"Power2All","id":2010549,"avatar_url":"https://avatars.githubusercontent.com/u/2010549?v=3","gravatar_id":"","url":"https://api.github.com/users/Power2All","html_url":"https://github.com/Power2All","followers_url":"https://api.github.com/users/Power2All/followers","following_url":"https://api.github.com/users/Power2All/following{/other_user}","gists_url":"https://api.github.com/users/Power2All/gists{/gist_id}","starred_url":"https://api.github.com/users/Power2All/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Power2All/subscriptions","organizations_url":"https://api.github.com/users/Power2All/orgs","repos_url":"https://api.github.com/users/Power2All/repos","events_url":"https://api.github.com/users/Power2All/events{/privacy}","received_events_url":"https://api.github.com/users/Power2All/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T08:59:13Z","updated_at":"2015-02-20T08:59:13Z","body":"Good point.\r\nI notice I did the 32bit version.\r\nTrying out with 64bit now, will let you know."}}