getnamo / TCP-Unreal

Convenience TCP wrapper for Unreal Engine
MIT License
106 stars 36 forks source link

Unhandled Exception tcpservercomponent.cpp: Line 87 #5

Open robotogre opened 4 years ago

robotogre commented 4 years ago

Unhandled exception

UE4Editor_TCPWrapper!::operator()() [c:\users\robot\desktop\myproject\plugins\tcpwrapper\source\tcpwrapper\private\tcpservercomponent.cpp:87] UE4Editor_TCPWrapper!SetPromise<TUniqueFunction<void __cdecl(void)> &>() [c:\program files\epic games\ue_4.23\engine\source\runtime\core\public\async\async.h:49] UE4Editor_TCPWrapper!TAsyncRunnable::Run() [c:\program files\epic games\ue_4.23\engine\source\runtime\core\public\async\async.h:404] UE4Editor_Core UE4Editor_Core kernel32 ntdll

Here is the line in question:

//Did we disconnect? Note that this almost never changed from connected due to engine bug, instead it will be caught when trying to send data ESocketConnectionState ConnectionState = Client->Socket->GetConnectionState();

Unfortunately, I have very little context for what action caused this exception. I think it happened either:

I will do more tests, and I will post again if I can reproduce it.

alext12 commented 4 years ago

Hi, I'm facing the same issue on my side. It's very ambiguous what produces the error so quite hard to reproduce

longlong10086 commented 2 years ago

Is there any new progress on this issue?

getnamo commented 2 years ago

Likely https://github.com/getnamo/tcp-ue4/blob/master/Source/TCPWrapper/Private/TCPServerComponent.cpp#L86 Client->Socket is nullptr/invalid when queried. This needs a barrier check probably.