id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 11991,Application crashes when yield/resume an coroutine after handing an exception,misko.pawel@…,chris_kohlhoff," {{{ #include #include #include #include #include int main() { using namespace boost::asio; using std::chrono::seconds; using yield_completion_t = detail::async_result_init< yield_context, void () >; io_service ios; spawn( ios, [&ios]( auto yield ) { try { throw std::runtime_error{ """" }; } catch( ... ) { std::cerr << ""[1] "" << std::endl; yield_completion_t completion{ yield_context{ yield } }; auto handler = completion.handler; ios.post( [=] { std::this_thread::sleep_for( seconds{ 1 } ); asio_handler_invoke( handler, &handler ); } ); completion.result.get(); std::cerr << ""[2] "" << std::endl; } } ); // needs more than one thread std::thread t{ [&]{ ios.run(); } }; ios.run(); t.join(); return 0; } }}} Prints: {{{ [1] [2] }}} and crashes. Debugger points to `_FindAndUnlinkFrame` (inside `trnsctrl.cpp` file): `pCurFrameInfo->pNext` causes AV because pCurFrameInfo is null. VS 2015, Win7",Bugs,new,To Be Determined,asio,Boost 1.61.0,Problem,,asio coroutine windows Visual Studio 2015,