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

Unreal Editor Crashes on Stop

Open oandreassen opened this issue 9 years ago • 22 comments

When clicking on Stop after testing a blueprint the entire editor freezes. The only option is to kill the process with the task manager. This occurs most of the times - making it impossible to make any progress using the socket-io plugin.

I'm using Uneal 4.14.3, socket.IO 1.7

oandreassen avatar Mar 14 '17 11:03 oandreassen

Seems to be related to if the socket-server is responding or not (sometimes it is caught in a breakpoint)

oandreassen avatar Mar 15 '17 06:03 oandreassen

This is correct, I've seen this behavior before. It appears the connection timeout happens on the gamethread at times which is unexpected and needs to be investigated. Are you connecting manually or via default address?

getnamo avatar Mar 15 '17 11:03 getnamo

It dosent happen when I manually connect (so far). it does however happen when I hit a breakpoint in the server and wait too long before releasing it (5-10 seconds).

oandreassen avatar Mar 15 '17 14:03 oandreassen

Having a breakpoint in the socket.io server while disconnecting the client (clicking on stop) crashes the editor every time.

oandreassen avatar Mar 16 '17 06:03 oandreassen

try the latest release for 4.15 (https://github.com/getnamo/socketio-client-ue4/releases/tag/0.4.8) and let me know if you still have the same issues.

note: this may only fix things for you if you've been using the releases and not the master repo. If there are still issues, can you make a minimal project to repro the issue?

getnamo avatar Mar 17 '17 19:03 getnamo

Tested using 4.15.

Setting breakpoints anywhere in the server while the game is active seems to be working fine. Having a break point (paused execution) on the server while clicking on Stop in the editor still freezes everything.

Thank you very much for compiling for 4.15!1!

oandreassen avatar Mar 20 '17 05:03 oandreassen

Hi, I get: Unhandled exception at 0x00007FFF541E7E5E (UE4Editor-SocketIOClient-796.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF. and editor crashes when I press stop

Using 4.15 with 0.4.8 with blueprints.

cattomic avatar Mar 21 '17 18:03 cattomic

If I'm understanding you correctly, the server is paused via e.g. breakpoint and it cannot respond. If you then disconnect and there is no response from the server due to breakpoint you will freeze or crash on the ue4 client?

getnamo avatar Mar 21 '17 21:03 getnamo

@getnamo correct.

Also, now I'm in a situation when I need to shutdown the server first before stopping the editor. Trying to shutdown the editor before the server causes the IDE to crash.

oandreassen avatar Mar 22 '17 06:03 oandreassen

Made some fixes and a few updates, let me know if https://github.com/getnamo/socketio-client-ue4/releases/tag/0.5.0 finally fixes this issue for you :)

getnamo avatar Apr 04 '17 05:04 getnamo

Works like a char efter latest release!

oandreassen avatar Apr 05 '17 17:04 oandreassen

Hi there, I see this issue is closed but I am still getting consistent crashes on disconnect with 0.5.2. I'm not doing anything out of the ordinary, and it crashes when disconnect is called manually or when stopping the editor. There is somewhat heavy traffic from the server to client.

floticerus avatar Apr 07 '17 18:04 floticerus

Will need more detailed examples of what you're doing and logs of when it's crashing (found in Saved/Logs)

getnamo avatar Apr 07 '17 19:04 getnamo

Basically I am just connecting to a socket server with ws://domain.com, which is emitting to the client every 500ms for testing. Since I see you asked the OP, I am opening the connection manually and leave autoconnect disabled. It's running in a LAN environment only on the host computer. It all seems to work fine, and then will sometimes crash on disconnect.

The log file is quite long so I just zipped the folder ue4_crash_logs.zip

This line seems interesting to me: LogModuleManager:Warning: Found module file ../../../../../../Users/vonfl/Documents/Unreal Projects/SDLive/Plugins/socketio-client-ue4/socketio-client-ue4/Binaries/Win64/UE4Editor-SIOJPlugin.dll (API version 3106830), but it was incompatible with the current engine API version (3299760). This is likely a stale module that must be recompiled.

floticerus avatar Apr 07 '17 22:04 floticerus

Whoops just noticed I left a few debug log functions active in the release, although they kinda were helpful here.

Regarding .. but it was incompatible with the current engine API version (3299760). This is likely a stale module that must be recompiled.

You may try to recompile the plugin yourself. Just add a C++ class to your project and recompile. But I don't think it will fix things since I found this in the dump image

Which points at a loose pointer error somewhere. Will need to find a way to replicate this, maybe trying to do something like sending information simultaneously while disconnecting might be the key.

getnamo avatar Apr 08 '17 01:04 getnamo

Glad I found this, I thought I was going crazy lol.

I was starting to get random crashing errors that I could reproduce but did not know quite what was causing it till I read this thread and thought of rolling back the plugin.

0.4.8 does not have this issue, updating to 0.5.0 or later does have this issue.

  1. Having the component on any active blueprint in the scene, even if it's not connected with auto connect or using any nodes can have this issue happen. Just having the component active on your blueprint in the scene.

  2. Open the map that you are currently in that has this blueprint that has the plugin on it using the console command for opening a map (OPEN MAPNAME) and the client should crash. This is reproducible on a packaged project only for the most part. I couldn't get it to crash the client when doing this with PIE or standalone view in the editor but doing this would end up crashing my dedicated server lol...

TLDR: New project, Make a new BP, add in the socket IO component, add the BP to the scene and save it all. Package the project and then run the packaged build (I did windows 64bit). The game should load up to that map with no problems. open the console (~) and type 'open MAPNAME' so it will load up the same map you are already in and it should crash the client.

This ONLY happens in 0.5.0 and above, 0.4.8 does not have this issue. Tested on 4.15.0, 4.15.1, and the 4.15 branches on the github (originally thought I had bad source...)

MWadstein avatar Apr 08 '17 18:04 MWadstein

@MWadstein awesome and descriptive, I'll try to replicate and debug this

getnamo avatar Apr 08 '17 22:04 getnamo

Just an update I narrowed this down to being an issue with possessing a character/pawn in the scene that you are opening again. I really don't have any idea why this is happening but that about all I can say for the cause.

If I have my character, which has the plugin, as the default pawn when I load up the new map I get this crashing issue. If I have none as the default pawn, no issue. If I have none as the default pawn, and then spawn in my character I get no issue. If I have none, spawn in the character, then possess it causes the crash.

Even if I spawn in a character without the component and add it in later once the character is fully in game the next time I open the map again (like above) even with the code to spawn in this component later it still crashes =(

I went back to 0.4.8 for now as I have no problems with it. I wish I had enough experience to actually figure this out but =(

MWadstein avatar Apr 17 '17 02:04 MWadstein

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

getnamo avatar May 07 '17 06:05 getnamo

Thank you for working on this issue! I was running into those kind of crashes too and was putting all my hope into your latest release :) Sadly, it won't compile on MacOS though. step1 step2 Any hints?

freddy-se avatar May 08 '17 13:05 freddy-se