majestrate / XD

meme bittorrent client
https://xd-torrent.github.io/
MIT License
241 stars 25 forks source link

invalid memory address or nil pointer dereference #5

Closed mathiasfriman closed 7 years ago

mathiasfriman commented 7 years ago

From the latest commit 2cad16d . Same conditions as in #3 otherwise, same torrent.

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

goroutine 1021 [running]:
panic(0x73eaa0, 0xc4200100f0)
          /usr/local/go/src/runtime/panic.go:500 +0x1a1
xd/lib/bittorrent/swarm.(*PeerConn).runReader(0xc4200fb6b0)
          /home/mathias/source/go/XD/src/xd/lib/bittorrent/swarm/peer.go:215 +0x9d1
created by xd/lib/bittorrent/swarm.(*PeerConn).start
          /home/mathias/source/go/XD/src/xd/lib/bittorrent/swarm/peer.go:68 +0x61
majestrate commented 7 years ago

i see the problem, think i fixed it in https://github.com/majestrate/XD/commit/6af021549b1b6fd0f4a122d42b8708611aa273fe

mathiasfriman commented 7 years ago

I've been running XD for four days without this occurring again, I think it's safe to close it.