Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

Commented Issue: websocket_client - uncatchable exception when receive/close occurs [236]

$
0
0
Mentioned in a comment in https://casablanca.codeplex.com/workitem/177.

raffaeler wrote Fri at 6:41 AM [x]

Using 2.1.0 here.
I could not even catch the exception with websocket_exception nor "..."
When the receive is ongoing and the close is called, the rest sdk internal code crashes without any chance to catch the exception.

Stack trace of the error:
cpprest120d_2_1.dll!Concurrency::details::_ExceptionHolder::~_ExceptionHolder(void) Unknown
cpprest120d_2_1.dll!Concurrency::details::_ExceptionHolder::`scalar deleting destructor'(unsigned int) Unknown
cpprest120d_2_1.dll!std::_Ref_count_obj<struct Concurrency::details::_ExceptionHolder>::_Destroy(void) Unknown

WebsocketsTesterCpp.exe!std::_Ref_count_base::_Decref() Line 118 C++

WebsocketsTesterCpp.exe!std::_Ptr_base<Concurrency::details::_ExceptionHolder>::_Decref() Line 344 C++
WebsocketsTesterCpp.exe!std::shared_ptr<Concurrency::details::_ExceptionHolder>::~shared_ptr<Concurrency::details::_ExceptionHolder>() Line 611 C++
WebsocketsTesterCpp.exe!Concurrency::details::_Task_impl_base::~_Task_impl_base() Line 1677 C++
WebsocketsTesterCpp.exe!Concurrency::details::_Task_impl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::~_Task_impl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >() Line 2367 C++
WebsocketsTesterCpp.exe!Concurrency::details::_Task_impl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::`scalar deleting destructor'(unsigned int) C++
WebsocketsTesterCpp.exe!std::_Ref_count_obj<Concurrency::details::_Task_impl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Destroy() Line 944 C++
WebsocketsTesterCpp.exe!std::_Ref_count_base::_Decref() Line 118 C++
WebsocketsTesterCpp.exe!std::_Ptr_base<Concurrency::details::_Task_impl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Decref() Line 344 C++
WebsocketsTesterCpp.exe!std::shared_ptr<Concurrency::details::_Task_impl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::~shared_ptr<Concurrency::details::_Task_impl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >() Line 611 C++
WebsocketsTesterCpp.exe!Concurrency::details::_PPLTaskHandle<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>::_ContinuationTaskHandle<web::experimental::web_sockets::client::websocket_incoming_message,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Concurrency::task<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > <lambda>(Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorAsyncTask>,Concurrency::details::_ContinuationTaskHandleBase>::~_PPLTaskHandle<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>::_ContinuationTaskHandle<web::experimental::web_sockets::client::websocket_incoming_message,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Concurrency::task<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > <lambda>(Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorAsyncTask>,Concurrency::details::_ContinuationTaskHandleBase>() Line 1588 C++
WebsocketsTesterCpp.exe!Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>::_ContinuationTaskHandle<web::experimental::web_sockets::client::websocket_incoming_message,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Concurrency::task<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > <lambda>(Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorAsyncTask>::~_ContinuationTaskHandle<web::experimental::web_sockets::client::websocket_incoming_message,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Concurrency::task<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > <lambda>(Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorAsyncTask>() Line 3769 C++
WebsocketsTesterCpp.exe!Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>::_ContinuationTaskHandle<web::experimental::web_sockets::client::websocket_incoming_message,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Concurrency::task<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > <lambda>(Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorAsyncTask>::`scalar deleting destructor'(unsigned int) C++
msvcr120d.dll!0fbc72bc() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for msvcr120d.dll]
msvcr120d.dll!0fbfe801() Unknown
msvcr120d.dll!0fbc7e8a() Unknown
msvcr120d.dll!0fbd75b3() Unknown
msvcr120d.dll!0fbf9ac1() Unknown
msvcr120d.dll!0fbd4257() Unknown
msvcr120d.dll!0fbd4123() Unknown
msvcr120d.dll!0fbd2bae() Unknown
msvcr120d.dll!0fc00f94() Unknown
kernel32.dll!76b0919f() Unknown
ntdll.dll!7718a22b() Unknown
ntdll.dll!7718a201() Unknown


Suggestions?
Comments: I know the pattern and in fact in the first "then" I specified task<websocket_incoming_message> for the reason you said. I didn't use the task in the body continuation as the problem happens even when there is no communication at all. Anyway I made a test by adding the task<std::string body>. Unexpectedly, even if there is noone communicating, the body continuation is called, body is retrieved and is an empty string (and with this code no exception is thrown) .... why??? To repeat the scenario, the two parties (client and server) are not communicating and I just issue a close on the connection while the code I posted is 'listening'.

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>