SocketIOClient-Unreal icon indicating copy to clipboard operation
SocketIOClient-Unreal copied to clipboard

Constant crashes when entering play mode

Open JetSimon opened this issue 1 year ago • 3 comments

My Unreal editor crashes 1/3 of the time when entering play mode. I am using C++ but not native.

Abort signal received

ucrtbase
ucrtbase
ucrtbase
VCRUNTIME140_1
VCRUNTIME140_1
VCRUNTIME140_1
VCRUNTIME140_1
ntdll
ntdll
ntdll
KERNELBASE
VCRUNTIME140
UnrealEditor_SocketIOLib_0008!asio::detail::throw_exception<std::system_error>() [C:\Users\12508\GitRepos\ursula-sockets-repo\ShapeInworldTest\Plugins\SocketIOClient\Source\ThirdParty\asio\asio\include\asio\detail\throw_exception.hpp:42]
UnrealEditor_SocketIOLib_0008!asio::detail::do_throw_error() [C:\Users\12508\GitRepos\ursula-sockets-repo\ShapeInworldTest\Plugins\SocketIOClient\Source\ThirdParty\asio\asio\include\asio\detail\impl\throw_error.ipp:45]
UnrealEditor_SocketIOLib_0008!asio::detail::win_iocp_io_context::stop() [C:\Users\12508\GitRepos\ursula-sockets-repo\ShapeInworldTest\Plugins\SocketIOClient\Source\ThirdParty\asio\asio\include\asio\detail\impl\win_iocp_io_context.ipp:243]
UnrealEditor_SocketIOLib_0008!asio::io_context::run() [C:\Users\12508\GitRepos\ursula-sockets-repo\ShapeInworldTest\Plugins\SocketIOClient\Source\ThirdParty\asio\asio\include\asio\impl\io_context.ipp:61]
UnrealEditor_SocketIOLib_0008!sio::client_impl<websocketpp::client<websocketpp::config::asio_client> >::run_loop() [C:\Users\12508\GitRepos\ursula-sockets-repo\ShapeInworldTest\Plugins\SocketIOClient\Source\SocketIOLib\Private\internal\sio_client_impl.cpp:261]
UnrealEditor_SocketIOLib_0008!std::thread::_Invoke<std::tuple<std::_Binder<std::_Unforced,void (__cdecl sio::client_impl<websocketpp::client<websocketpp::config::asio_client> >::*)(void),sio::client_impl<websocketpp::client<websocketpp::config::asio_client> () [C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\INCLUDE\thread:56]
ucrtbase
kernel32
ntdll

JetSimon avatar Jul 04 '24 18:07 JetSimon

Points to https://github.com/getnamo/SocketIOClient-Unreal/blob/master/Source/SocketIOLib/Private/internal/sio_client_impl.cpp#L261 which is when the thread stops and reset gets called. Check your alloc/dealloc logic and compare vs how it's done for the component life cycle.

getnamo avatar Jul 06 '24 05:07 getnamo

I'm seeing this error now, looks like a recent version broke it, use older plugin version for now until fix is found.

getnamo avatar Jul 18 '24 02:07 getnamo

If it helps, I haven't had this issue occur since I stopped calling Disconnect and then Connect in the OnBegin (or whatever it is called) function of my socket actor c++ file. I think maybe a race condition there?

JetSimon avatar Jul 18 '24 02:07 JetSimon