Substepping unusable: causes freeze since 4.17

Game freezes / stops rendering randomly if physics substepping is enabled. This happens in 4.17.2 and 4.18. We didn’t experience this in 16.3.

Steps to reproduce:

  • open attached example project
  • build packaged shipping game WindowsNoEditor / by the book
  • start packaged game
  • leave idle running
  • get a coffee
  • wait for freeze (most often while idle within the first 30 minutes)

If substepping is disabled it won’t stop responding.
Doesn’t seem to happen (or not so often) when “in action”.
Setting a fixed/lower framerate also seems to lessen the chance of a freeze.

Update:
As a workaround we have now set the TG_DuringPhysics to block till complete
LevelTick.cpp: RunTickGroup(TG_DuringPhysics, true);
which lessens the chance of a freeze considerably (to hours rather than minutes), but it still happens. Looks like it is waiting on a task trying to execute TStaticMeshVertexData::GetResourceArray().

I also have random random freeze in shipping. Could it be related to these bugs?

We tracked it down to the tick group TG_EndPhysics waiting for the ParticleSystemComponent to finish TG_DuringPhysics and this probably only happens with physics substepping enabled. At least that is what we suspect at the moment - should really be looked into by someone experienced with the thread management / task graph. As a workaround you can set the ParticleSystemComponent to use TG_PostPhysics - not sure how much performance this costs and if this can cause other problems, but it doesn’t stop responding anymore.

We didn’t experience any crashes, only freezes / non responding game after a random amount of time.

Thank you, I can confirm that by disabling the Substepping fix the issue…

Update: Disabling substepping have decreased the frequency of freeze, but continues to happen occasionally :frowning: also during loading…

Any update on this issue?

Look here Packaged Game freezing !FEventWin::Wait(unsigned int WaitTime, const bool bIgnoreThreadIdleStats) Line 1158 C++ - Programming & Scripting - Epic Developer Community Forums