Dedicated Server Crash
Hello =)
I posted some stuff in the other thread about a bug and crashing but after a weekend and a few hours today trying to get to the bottom of it I think I finally nailed down my issue.
Whenever something is in the world that has a socket io component on the SERVER in a dedicated server setup is when I will eventually get a crash.
Examples:
Dedicated server, character has a socket IO component, login to the server and load the map when the character spawns in the first time he is fine but if I "open 127.0.0.1" or quit and start up the client again I will get a client or server crash depending on if this is PIE or a client build. Note in this case there is a has authority and a server switch set up before I connect to the socket IO server but this doesnt change anything for this example as there is a server version of my character with the component which is why it crashes
Same setup as before but I prevent the server from having the component, I don't put the component on the character and I attach a new one only on the client version of the character. No crashes
I remove the socket IO from the character and put it on another BP in the world and all this BP does is hold the socketIO component. I did this as I originally thought the crash was due to it being on a character. I then have my character talk to this BP and the component and do it's stuff and I get the same results as the first time (crashes due to the server spawning in a copy of this BP)
If I make it so the BP only spawns in on the clients, no server, then I get no crashes.
I thought the crashes were based on disconnecting and reconnecting the client but I actually let the clients sit for a bit today which is when I discovered this issue again. If I have a server blueprint with the component and then I disconnect SocketIO or destroy the BP I get the disconnect message in my node server as expected but if I just wait about 10 seconds or so I get a crash on the dedicated server. If I do the exact same thing but the blueprint is on the client only I get no issues.
I know, long read but maybe this can help figure out something?
The way I cleanup socket.io in 0.5.x versions in order to avoid server timeout hangs likely causes this (delete on background thread: https://github.com/getnamo/socketio-client-ue4/commit/688ffa41700d40a2b82a74902c961bacb2eea3ab#diff-33268d91d0d1d5e0171f6df4296420ccR37). It's very helpful to get these lengthy descriptions, and I will ensure to test this case in the next pass, though it may be a little while before I can carve out the time.
Dude seriously not a problem I am just hoping I finally identified the gremlin that has been causing me problems for a bit lol. I have some workarounds for now as this is just an example project I am showing people how to make so I am just going insecure for now and allowing communication thru the client rather than the server =)
candidate fix merged in: https://github.com/getnamo/socketio-client-ue4/commit/d7b3d81201c685d4f5e01e53373ecebcc3d7f83b, test the new release and see if it has been fixed for you: https://github.com/getnamo/socketio-client-ue4/releases/tag/0.6.0
Closed for tracking. Re-open if this is still an issue.