snowyu / libtorrent

Automatically exported from code.google.com/p/libtorrent
Other
1 stars 0 forks source link

trunk: iterator assert in torrent::do_pause() #666

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I get iterator asserts in torrent::do_pause()
...
for (peer_iterator i = m_connections.begin();
  i != m_connections.end();)
{
..
  p->disconnect(errors::torrent_paused, peer_connection_interface::op_bittorrent);
  i = j;
}

seems p->disconnect() modifies m_connections - so iterator i/j can become 
invalid and the operator i!=m_connections.end() asserts

Original issue reported on code.google.com by webmas...@massaroddel.de on 20 Aug 2014 at 3:15

GoogleCodeExporter commented 9 years ago
is this in trunk?

Original comment by arvid.no...@gmail.com on 20 Aug 2014 at 4:21

GoogleCodeExporter commented 9 years ago
this is trunk 10213. :( see the topic

Original comment by webmas...@massaroddel.de on 20 Aug 2014 at 5:50

GoogleCodeExporter commented 9 years ago
according to the source code
peer_connection::disconnect() calls torrent::remove_peer()

Original comment by webmas...@massaroddel.de on 20 Aug 2014 at 6:02