UE4 garbage collection fix?

I wanted to know if theres a work around to the automated garbage collection at 60 seconds and if not could that be requested? Like a means to specify when to call it?

It seems big hitches called by the first gargbage collection of any gaming session are more or less unavoidable on Mobile. Even In the GooglePlay version of Tappy Chicken you can quite easily test for its interuption in gameplay. Open the app, wait 50-55 seconds before starting a game to ensure garbage collection happens during play and you will see that it causes a notable freeze during gameplay. In the instance of Tappy Chicken it was typically halted for 0.5-1 second, in faster paced games such as my UE4 project it can more or less guarantee a game over for the player.

I’ve tried my best to optimise my project in order to minimise the impact of the GC by reusing actors and such (The hitches are not noticable on PC although they’re detectable by “stat hitches”), but its occurence in such a simple project as Tappy Chicken shows theres little room for mobility when it comes to mobile (Tappy Chicken hitches were not detectable on my laptop even with “stat hitches”). I’ve incorporated “Collect Garbage” command nodes before every match and even at intervals right before the 60th second and everything still halts at that initial 60th second (afterwards every other GC runs smoothy until you reset the game).

Some sort of response on this is hugely appreciated, it makes for a terrible first impression for the game to force a loss on the player.

Just for ref I’m using:
UE4.8
Samsung Galaxy Note 3

Thanks :slight_smile:

Did you ever find a solution to this issue? I’m seeing this as well on 4.11.2

My project is fairly empty with a few actors in it running on iOS and around 60sec in I will get a hitch

Hopefully this should help with your problem:

If you want to disable GC in release builds to avoid hitches (if you are experiencing them);
In the commandline when you run the game:

-NoVerifyGC

Source: UE4 Wiki - Includes additional links

Thanks. I will check this out.

I tried NoVerifyGC using blueprint command and I still get a hitch about 60 sec in. Assuming it works, then it’s something else. I don’t know enough about coding or UE4 to figure it out.

Unless I’m mistaken, the command is something you add to the executable file~

If you right click the game executable/shortcut and open Properties, you should be given the option of a parameter: this is where you put -NoVerifyGC, and if not you simply append it after “YourGame.exe”. While this is true for Windblowz, I’m not sure about Mobile.

Hope this helps!