Packaged Game freezing !FEventWin::Wait(unsigned int WaitTime, const bool bIgnoreThreadIdleStats) Line 1158 C++

Multiplayer game keeps freezing randomly and the only logs we can pull are from the dmp files, dedicated servers won’t show anything nor will the game log files. We receive the following callstack.

`>	Game.exe!FEventWin::Wait(unsigned int WaitTime, const bool bIgnoreThreadIdleStats) Line 1158	C++
 	Game.exe!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 628	C++
 	Game.exe!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 560	C++
 	Game.exe!FTickTaskSequencer::ReleaseTickGroup(ETickingGroup WorldTickGroup, bool bBlockTillComplete) Line 542	C++
 	Game.exe!FTickTaskManager::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 1454	C++
 	Game.exe!UWorld::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 760	C++
 	Game.exe!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1427	C++
 	Game.exe!UGameEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1221	C++
 	Game.exe!FEngineLoop::Tick() Line 3296	C++
 	Game.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 166	C++
 	Game.exe!GuardedMainWrapper(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 134	C++
 	Game.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 210	C++
`

And then the following from the Autos section
Event 0x00000000000002cc void *
WaitForSingleObject 0x00007ff76b49b120 {Game.exe!WaitForSingleObject} void *
WaitTime 4294967295 unsigned int
- this 0x0000020b79388900 {Event=0x00000000000002cc ManualReset=false } FEventWin *
+ FEvent {EventId=6 EventStartCycles=0 } FEvent
Event 0x00000000000002cc void *
ManualReset false bool

We’re having a very similar and frustrating experience. I’ve been scouring and debugging and I can’t figure this out. We assumed it was 4.17 and hoped 4.18 would solve the freeze, but it’s in both versions. Seemingly random with it’s timing.

We’re having the same issue.

DO you by chance have either of these PRs .com/EpicGames/UnrealEngine/pull/2135 or .com/EpicGames/UnrealEngine/pull/3232

I’ve just set up a new clean engine without the PR and I haven’t frozen yet.

I have an old version of 2135. I don’t know if its been changed in a while. We had to remove a lot of its code when it SteamOSS was moved to plugins. But its still in our code base to some degree. Is that the one you’re using? Or both?

Are you using your same engine but without the PR? Or an entirely fresh engine?

I downloaded an entirely new copy of 4.18 and build it fresh without the PR. We’re going to continue testing tonight, I’ll keep you updated. If I don’t post it means we didn’t freeze.

edit; froze again, I’m going to run the debugger if I don’t jump out of a window first.

I’ve already jumped. But seriously, I’m debugging this thing and can’t get anything in my watch window. I’m testing with debug game and all symbols loaded. OnlineAsyncManager or w/e is ticking fine. Render is ticking fine. Game thread does not seem to move. Its waiting for an object, and I don’t know how to debug this object and elsewhere in the thread there’s just no IDE interpretation of the app memory.

EDIT: It’s stuck indefinitely because its given a wait time of MAX_uint32. This probably isn’t new, but whatever task its waiting for is not completing and will not complete until an very long time.

Queue(QueueIndex).StallRestartEvent->Wait(MAX_uint32, bCountAsStall);

We’re banging our heads against the same wall, and I’m wondering why are we the only two on here with this issue? I had the same waittime error in the new 4.18 build as I had before. I’m at a loss now. Like you I’ve done every possible thing I can think of, I’ve even started disabling widgets because they’re generally the last things to get logged before a freeze. No avail.

The unsigned int should mean an infinite waittime, which makes sense if our games freeze as they’re waiting for something. I just can’t figure out what’s causing this.

I guess its the game thread waiting on some other task to finish. Can’t tell what that task is though, have no idea why my watch and auto windows are so useless right now.

Not the same exactly, but maybe we can learn from this: .com/ue4plugins/NdiMedia/issues/4

I’m going to stay digging. Not sure what code he changed to make their problem work, maybe if I can see that I can find an appropriate change for us.

So I mean, epic has games that were on 4.17 right? At least for some time? And 4.18. So what would be different for our games than theirs? Steam? Anything else you’re doing with your project that’s different?

That’s the thing, pretty sure Epic is using their own backend for everything, and what we’re doing is not what they do. I don’t know if an Epic-made game has been on steam. However there are TONS of games on steam using UE4 and I can’t understand what is different from ours.

Currently we’re using dedicated servers, steam and a clean UE4.18, and we get this terrible freeze. We’re doing everything about as standard as we know how.

Do you freeze without steam enabled? Just connecting via IP?

I tested launching with -nosteam and still got it.

Been testing with async & substepping off & on, testing with assigning particle components to Post-Physics tick group, tested frame smoothing & fixed frame rates… it always happens.

Do you dynamically load any levels? I mean I copied this from a fortnite dev. But I dynamically load our character preview level into every level (including the main menu). Just trying to think of anything not frequently done that could be on the game side.

I posted on the forums.
https://forums.unrealengine.com/development-discussion/c-gameplay-programming/1380031-packaged-networked-game-freezes-hangs-for-client-in-4-17-2-need-epic-engine-programmer-response

Did you try to re-save all assets? Using the commandlet
resavepackages ResavePackages commandlet - Programming & Scripting - Epic Developer Community Forums

I will try this soon.