jash-kothari-forks / libtorrent

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

Assert hit in session_impl::listen_on() #243

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
This happens when calling s->listen_on() for the second time with the same port.
I do have some code that checks if the port has changed before trying to update 
it but s->listen_port() returns 0 instead of returning the actual port.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
v0.16 (latest trunk)

Please provide any additional information below.
version: 0.16.0.0
$Rev: 4683 $
file: 'session_impl.cpp'
line: 4435
function: void libtorrent::aux::session_impl::listen_on(const std::pair<int, 
int>&, boost::system::error_code&, const char*, int)
expression: ec

stack:
1: assert_fail(char const*, int, char const*, char const*, char const*)
2: libtorrent::aux::session_impl::listen_on(std::pair<int, int> const&, 
boost::system::error_code&, char const*, int)
3: boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, 
boost::_mfi::mf4<void, libtorrent::aux::session_impl, std::pair<int, int> 
const&, boost::system::error_code&, char const*, int>, 
boost::_bi::list5<boost::_bi::value<libtorrent::aux::session_impl*>, 
boost::_bi::value<std::pair<int, int> >, 
boost::reference_wrapper<boost::system::error_code>, boost::_bi::value<char 
const*>, boost::_bi::value<int> > >, 
void>::invoke(boost::detail::function::function_buffer&)
4: libtorrent::fun_wrap(bool*, libtorrent::condition*, 
boost::asio::detail::posix_mutex*, boost::function<void ()()>)
5: boost::asio::detail::handler_queue::handler_wrapper<boost::_bi::bind_t<void, 
void (*)(bool*, libtorrent::condition*, boost::asio::detail::posix_mutex*, 
boost::function<void ()()>), boost::_bi::list4<boost::_bi::value<bool*>, 
boost::_bi::value<libtorrent::condition*>, 
boost::_bi::value<boost::asio::detail::posix_mutex*>, 
boost::_bi::value<boost::function<void ()()> > > > 
>::do_call(boost::asio::detail::handler_queue::handler*)
6: libtorrent::aux::session_impl::main_thread()
7: boost::asio::detail::posix_thread::func<boost::_bi::bind_t<void, 
boost::_mfi::mf0<void, libtorrent::aux::session_impl>, 
boost::_bi::list1<boost::_bi::value<libtorrent::aux::session_impl*> > > >::run()
8: boost_asio_detail_posix_thread_function
9: 
10: clone

Original issue reported on code.google.com by dch...@gmail.com on 20 Sep 2011 at 5:08

GoogleCodeExporter commented 9 years ago
this assert appears to be invalid. I've removed it. thanks!

Original comment by arvid.no...@gmail.com on 22 Sep 2011 at 9:31