2020/02/27 04:08:58 http: panic serving 192.168.2.196:60407: runtime error: invalid memory address or nil pointer dereference
goroutine 607 [running]:
net/http.(*conn).serve.func1(0x3142540)
E:/Software/Go/src/net/http/server.go:1767 +0xf0
panic(0x6dbb00, 0xeb94e8)
E:/Software/Go/src/runtime/panic.go:679 +0x194
runtime/internal/atomic.goLoad64(0x306cce4, 0x0, 0x0)
E:/Software/Go/src/runtime/internal/atomic/atomic_arm.go:131 +0x1c
github.com/anacrolix/torrent.(*Count).Int64(...)
C:/Users/xspee/go/pkg/mod/github.com/anacrolix/[email protected]/conn_stats.go:61
github.com/jpillora/cloud-torrent/engine.(*Torrent).updateLoaded(0x306cc60, 0x323e800)
C:/Users/xspee/go/src/github.com/boypt/simple-torrent/engine/torrent.go:90 +0x334
github.com/jpillora/cloud-torrent/engine.(*Torrent).Update(0x306cc60, 0x323e800)
C:/Users/xspee/go/src/github.com/boypt/simple-torrent/engine/torrent.go:54 +0x1a8
github.com/jpillora/cloud-torrent/engine.(*Engine).upsertTorrent(0x30989a0, 0x323e800, 0xc182)
C:/Users/xspee/go/src/github.com/boypt/simple-torrent/engine/engine.go:296 +0x164
github.com/jpillora/cloud-torrent/engine.(*Engine).addTorrentTask(0x30989a0, 0x323e800, 0x323e800, 0x1)
C:/Users/xspee/go/src/github.com/boypt/simple-torrent/engine/engine.go:184 +0x64
github.com/jpillora/cloud-torrent/engine.(*Engine).NewTorrentBySpec(0x30989a0, 0x3161280, 0x3143140, 0x0)
C:/Users/xspee/go/src/github.com/boypt/simple-torrent/engine/engine.go:163 +0x7c
github.com/jpillora/cloud-torrent/server.(*Server).apiPOST(0x30758c0, 0x3079280, 0x0, 0x0)
C:/Users/xspee/go/src/github.com/boypt/simple-torrent/server/server_api.go:131 +0xae0
github.com/jpillora/cloud-torrent/server.(*Server).restAPIhandle(0x30758c0, 0x87ea30, 0x314aa40, 0x3079280)
C:/Users/xspee/go/src/github.com/boypt/simple-torrent/server/server_http.go:57 +0x198
github.com/jpillora/cloud-torrent/server.(*Server).webHandle(0x30758c0, 0x87ea30, 0x314aa40, 0x3079280)
C:/Users/xspee/go/src/github.com/boypt/simple-torrent/server/server_http.go:43 +0x1bc
net/http.HandlerFunc.ServeHTTP(0x30f66a0, 0x87ea30, 0x314aa40, 0x3079280)
E:/Software/Go/src/net/http/server.go:2007 +0x34
cloud-torrent/server/httpmiddleware.RealIP.func1(0x87ea30, 0x314aa40, 0x3079280)
C:/Users/xspee/go/src/github.com/boypt/simple-torrent/server/httpmiddleware/realip.go:34 +0x80
net/http.HandlerFunc.ServeHTTP(0x323af10, 0x87ea30, 0x314aa40, 0x3079280)
E:/Software/Go/src/net/http/server.go:2007 +0x34
cloud-torrent/server/httpmiddleware.Liveness.func1(0x87ea30, 0x314aa40, 0x3079280)
C:/Users/xspee/go/src/github.com/boypt/simple-torrent/server/httpmiddleware/liveness.go:15 +0x50
net/http.HandlerFunc.ServeHTTP(0x323af20, 0x87ea30, 0x314aa40, 0x3079280)
E:/Software/Go/src/net/http/server.go:2007 +0x34
github.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1(0x87e850, 0x32430e0, 0x3079280)
C:/Users/xspee/go/pkg/mod/github.com/!n!y!times/[email protected]/gzip.go:336 +0x1c4
net/http.HandlerFunc.ServeHTTP(0x3346120, 0x87e850, 0x32430e0, 0x3079280)
E:/Software/Go/src/net/http/server.go:2007 +0x34
net/http.serverHandler.ServeHTTP(0x3242090, 0x87e850, 0x32430e0, 0x3079280)
E:/Software/Go/src/net/http/server.go:2802 +0x88
net/http.(*conn).serve(0x3142540, 0x87f5d0, 0x327d700)
E:/Software/Go/src/net/http/server.go:1890 +0x7e0
created by net/http.(*Server).Serve
E:/Software/Go/src/net/http/server.go:2928 +0x2e4
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x11ffc]
goroutine 38 [running]:
runtime/internal/atomic.goLoad64(0x306cce4, 0x0, 0x0)
E:/Software/Go/src/runtime/internal/atomic/atomic_arm.go:131 +0x1c
github.com/anacrolix/torrent.(*Count).Int64(...)
C:/Users/xspee/go/pkg/mod/github.com/anacrolix/[email protected]/conn_stats.go:61
github.com/jpillora/cloud-torrent/engine.(*Torrent).updateLoaded(0x306cc60, 0x323e800)
C:/Users/xspee/go/src/github.com/boypt/simple-torrent/engine/torrent.go:90 +0x334
github.com/jpillora/cloud-torrent/engine.(*Torrent).Update(0x306cc60, 0x323e800)
C:/Users/xspee/go/src/github.com/boypt/simple-torrent/engine/torrent.go:54 +0x1a8
github.com/jpillora/cloud-torrent/engine.(*Engine).upsertTorrent(0x30989a0, 0x323e800, 0x1)
C:/Users/xspee/go/src/github.com/boypt/simple-torrent/engine/engine.go:296 +0x164
github.com/jpillora/cloud-torrent/engine.(*Engine).TaskRoutine(0x30989a0)
C:/Users/xspee/go/src/github.com/boypt/simple-torrent/engine/engine.go:221 +0x1bc
github.com/jpillora/cloud-torrent/server.(*Server).backgroundRoutines.func1(0x30758c0)
C:/Users/xspee/go/src/github.com/boypt/simple-torrent/server/server_bg.go:36 +0x9c
created by github.com/jpillora/cloud-torrent/server.(*Server).backgroundRoutines
C:/Users/xspee/go/src/github.com/boypt/simple-torrent/server/server_bg.go:20 +0x58