-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5.1.0 Crash on Connect #358
Comments
I worked around this by adding a check for obj_ptr. It avoids the crash, and seems to be working. I'm not sure what effect this might have to the rest of the codebase. sio_socket.cpp line 407:
|
Likely needs more context (e.g. socket.io host type) because it appears the packet you receive on connection has an empty object returned, which isn't standard socket.io server spec IIRC. The if barrier is valid workaround, but it does mean m_socket_id might not be filled in your connection setup, which means if you access socketid later on it will likely be invalid. |
Thanks for the response. Is this due to incorrect setup client side? Or a server running an old/incompatible version? |
Suspecting a non standard server, e.g. a incomplete spec python server maybe? Check that it support socket.io protocol v3+ |
I'm updating my code to 5.1.0 and I'm getting a crash on connect. I'm using NativeClient within c++
Win10 development client build, VS 2022
Exception thrown: read access violation.
obj_ptr was nullptr.
Top of the call stack:
My Code:
FSIOConnectParams Params;
Params.AddressAndPort = InAddressAndPort;
//Params.Path = InPath;
//Params.AuthToken = InAuthToken;
Params.Query = USIOMessageConvert::JsonObjectToFStringMap(Query);
Params.Headers = USIOMessageConvert::JsonObjectToFStringMap(Headers);
NativeClient->Connect(Params);
Also maybe related?
NativeClient->OnConnectedCallback = [this](const FString& InSocketId, const FString& InSessionId )
{
FCULambdaRunnable::RunShortLambdaOnGameThread([this, InSocketId, InSessionId]
{
if (this)
{
bIsConnected = true;
SessionId = InSessionId;
SocketId = InSocketId;
bIsHavingConnectionProblems = false;
}
});
};
The text was updated successfully, but these errors were encountered: