majestrate / XD

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

slice bounds out of range #3

Closed mathiasfriman closed 7 years ago

mathiasfriman commented 7 years ago

Git pulled three minutes ago, and compiled the latest version using go 1.7.1. Found Snowden 2016 and selected it because of many peers. After a while I get this:

panic: runtime error: slice bounds out of range

goroutine 31 [running]:

panic(0x73ea60, 0xc420010140)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
xd/lib/storage.(*fsTorrent).PutPiece(0xc42011c500, 0xc420133c60, 0x0, 0x0)
/home/mathias/source/go/XD/src/xd/lib/storage/fs.go:195 +0x796
xd/lib/bittorrent/swarm.(*pieceTracker).handlePieceData(0xc420122500, 0xc42030e5a0)
/home/mathias/source/go/XD/src/xd/lib/bittorrent/swarm/piece.go:191 +0xcb
xd/lib/bittorrent/swarm.(*PeerConn).runReader(0xc420094000)
/home/mathias/source/go/XD/src/xd/lib/bittorrent/swarm/peer.go:216 +0xa02
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

can you give me a git revision?

majestrate commented 7 years ago

heh, looks like multiple file torrents was broken in 0.0.1 after all.

majestrate commented 7 years ago

trying latest commit (https://github.com/majestrate/XD/commit/b40926c9aca86c342a05e2afdd53f569ee549236) , so far no error.

mathiasfriman commented 7 years ago

Works so far with commit 39c2541, but I guess that's old by now.. ;)

mathiasfriman commented 7 years ago

Just dropping this here, not sure if it's related or if I should file a new issue.. From the latest commit 2cad16d

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

new issue please