Skip to content
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

Unreal Crashes After Several Start/Stops when SocketIOComponent is on GameMode #49

Closed
LordNed opened this issue Jun 26, 2017 · 3 comments
Labels

Comments

@LordNed
Copy link

LordNed commented Jun 26, 2017

Hi all,

We've added the SocketIOComponent to the GameMode as we want to ensure it attempts the connection each time the GameMode is started. Unfortunately after 3 or 4 start/stop plays Unreal Engine crashes with the callstack posted below. This is fairly easy to test by rapidly starting/stopping Simulate.

This uses Unreal 4.16.1. (Windows) I have created a gist with our setup inside the GameMode which should let you replicate it. You will be missing a node for how we get our address/port but they should be easy. Add a SocketIOClient component and disable Auto-connect and then paste the gist's contents into the GameMode and hook up the connect functions to BeginPlay.

https://gist.github.com/LordNed/ace0d2492ae1e18b532536db98b41e1e

Access violation - code c0000005 (first/second chance not available)

UE4Editor_SocketIOClient!TMulticastScriptDelegate<FWeakObjectPtr>::ProcessMulticastDelegate<UObject>() [e:\program files\epic games\ue_4.16\engine\source\runtime\core\public\uobject\scriptdelegates.h:457]
UE4Editor_SocketIOClient!TGraphTask<FFunctionGraphTask>::ExecuteTask() [e:\program files\epic games\ue_4.16\engine\source\runtime\core\public\async\taskgraphinterfaces.h:884]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:954]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilIdle() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:716]
UE4Editor_Engine!FFrameEndSync::Sync() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\engine\private\unrealengine.cpp:8502]
UE4Editor!FEngineLoop::Tick() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3247]
UE4Editor!GuardedMain() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\launch\private\launch.cpp:166]
UE4Editor!GuardedMainWrapper() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
UE4Editor!WinMain() [d:\build\++ue4+release-4.16+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253]
kernel32
ntdll
@getnamo getnamo added the bug label Jun 26, 2017
@getnamo
Copy link
Owner

getnamo commented Jun 26, 2017

Interesting, I've never attached it to a game mode, this is a good description for repro. Call stack points to a nullptr reference from the taskgraph system, so likely trying to pass back information on the game thread after the world has been destroyed. Will look through this bug on the next pass.

@LordNed
Copy link
Author

LordNed commented Jun 26, 2017

After having a gander at #47 I'm wondering if they're related. I'll change code on my end to my suggested fix I left there and see if that resolves this issue as well.

@LordNed
Copy link
Author

LordNed commented Jun 26, 2017

Either fixing #47 or #48 seems to have resolved this issue as I can no longer get it to crash. Closing the Issue.

@LordNed LordNed closed this as completed Jun 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants