id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 8613,"[Windows] boost::asio::ip::tcp::socket::async_write(boost::asio::null_buffers(), ...) WriteHandler gets a boost::system::error_code with a NULL category pointer on success",Segev Finer ,chris_kohlhoff,"The `boost::asio::ip::tcp::socket::async_write()` WriteHandler gets a `boost::system::error_code` with a `NULL` category pointer on success. This is essentially an invalid `boost::system::error_code` that will cause an access violation when you try to print it has the code doesn't expect the category pointer to be `NULL`. `boost::system::error_code` is printed like so: {{{#!c++ os << ec.category().name() << ':' << ec.value(); }}} Which throws an access violation when `ec.category()` tries to dereference the unexpected NULL category pointer which shouldn't happen. Code that reproduces this problem: {{{#!c++ #include #include #include using boost::asio::ip::tcp; void write_handler(const boost::system::error_code & ec) { std::cout << ec << std::endl; } int main(void) { boost::asio::io_service io_service; tcp::resolver resolver(io_service); tcp::resolver::query query(""www.google.com"", ""80""); tcp::resolver::iterator endpoint_iterator = resolver.resolve(query); boost::asio::ip::tcp::socket socket(io_service); boost::asio::connect(socket, endpoint_iterator); socket.async_write_some(boost::asio::null_buffers(), boost::bind(write_handler, boost::asio::placeholders::error)); io_service.run(); } }}}",Bugs,closed,To Be Determined,asio,Boost 1.53.0,Problem,fixed,,