Closed Gliptal closed 6 months ago
Which callback type are you using? Got some examples?
I add a dynamic delegate in the constructor of an UCLASS of mine:
socket->OnReceivedBytes.AddDynamic(this, &AMyClass::OnReceive);
The function is declared as:
UFUNCTION()
virtual void OnReceive(const TArray<uint8>& Data, const FString& SourceIp, const int& SourcePort);
That function is defined in AMyClass
and then overridden by child classes.
I tried commenting my AddDynamic()
call and I still get a crash. I have no other AddDynamic()
calls related to UDPWrapper anywhere else in the project.
Does port 55971
ring a bell?
After some more testing it seems like the culprit is something within the code that opens the receive socket.
Looking at https://github.com/getnamo/UDP-Unreal/blob/master/Source/UDPWrapper/Private/UDPComponent.cpp#L270, just checking do you have 'receive data on game thread' enabled? If not it's possible you're getting a callback when the game is being unwound on a separate thread. Test with receive on gamethread enabled and see if that changes anything.
Hi.So it will work properly on ue5?
I closed this issue since I haven't seen this error in more than a year.
Whenever PIE is stopped while a datastream is still sending UDP packets on a socket handled by UDPWrapper, the editor crashes with with the following trace: