1 May 2010 19:45
Re: Assertion failures when using add_piece
<arvid <at> cs.umu.se>
2010-05-01 17:45:12 GMT
2010-05-01 17:45:12 GMT
Quoting Henry Rodrick <moshisushi <at> gmail.com>: > Hello list! > > I have problems with various libtorrent assertions failing when using > add_piece. I've included the patch I temporarily use to get around them. > Looks like they assert things that are no longer valid when adding pieces > from more places than the piece_picker (i.e add_piece). > The assertions typically fail when i do alot of add_piece and there are > seeders in the swarm. Could you try to see if this patch makes it work for you? I'm checking this in to 0.15 and trunk as well. Index: branches/RC_0_15/src/piece_picker.cpp =================================================================== --- branches/RC_0_15/src/piece_picker.cpp (revision 4495) +++ branches/RC_0_15/src/piece_picker.cpp (working copy) <at> <at> -2134,7 +2134,10 <at> <at> info.peer = peer; if (info.state == block_info::state_requested) --(Continue reading)i-≥requested; TORRENT_ASSERT(i->requested >= 0); - TORRENT_ASSERT(info.state != block_info::state_writing); + if (info.state == block_info::state_writing + || info.state == block_info::state_finished) + return; + ++i->writing; info.state = block_info::state_writing;
RSS Feed