• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

PC Custom Gamemodes crash game due to KFEngine.ini MaxObjectsNotConsideredByGC

Delta69er

Grizzled Veteran
Sep 13, 2017
176
73
Category: Code/Modding/Inis

Reproducibility: Seems to be random for users - those affected can be fixed by doing the following below

Summary: The Default values for MaxObjectsNotConsideredByGC within KFEngine.ini cause the game to Bugsplat when playing Custom game modes due to enormous allocation.

Description: When a custom game mode is loaded or switches to the next round, for some users this will crash the entire game and will continue to crash. The issue was traced down to the setting MaxObjectsNotConsideredByGC within KFGame.ini

The default value for MaxObjectsNotConsideredByGC seems to be 179220, which is too large and causes the crash.

Changing it to 20480 or 33476 (which is suspected to be the original default value) fixes the issue.

The solution seems pretty straightforward - just change the default value of MaxObjectsNotConsideredByGC

The bug is particularly annoying because the Crashlogs will not specify the issue. You are completely left in the dark what the cause is unless you know someone who mightve had the issue before.

Online/Offline: N/A
 
Last edited:
It would be nice to have these variables restored to the original value, or at least a way to change them from the server. I spent one day configuring a modded server and now just realizing that it was a waste of time, because 90% people who join crash (including myself, until I changed the .ini values).

The issue was raised 2 years ago, and so far nobody has had problem with the workaround, so why was the value changed initially ?

This issue makes mods like Controlled Difficulty unplayable on public servers, and we don't even have an explanation for the change.

Just look at how many people reported crashes and successfully fixed it by switching to the old values, this even affects certain people who don't play on modded servers:

1614714086869.png
 
Last edited:
Upvote 0
Those values are set by the engine in order to optimize garbage collection. The numbers to set those values to are reported by the engine when initially loading the game. It is standard practice to update those values to what the engine reports for each patch as it optimizes garbage collection time.

Q.A. was never able to reproduce these crashes playing the stock game. This is something they have looked into for quite some time. They even tried playing full games of versus with everyone in full cosmetics equipped on all slots while spamming emotes and using headshot effects.

We are relooking into these reports, though as this bug report suggests, it could be related to modded game modes. Keep in mind that we usually only deal with bugs that affect the stock game.
 
Last edited:
Upvote 0
I use the MaxObjectsNotConsideredByGC-fix in order to play vanilla KF2, without it it's an instant crash when joining server number two.

 
Upvote 0
In my experience, it does affect stock game.
Made my friends apply the GC fix and they're no longer crashing during map switch.
I use the MaxObjectsNotConsideredByGC-fix in order to play vanilla KF2, without it it's an instant crash when joining server number two.

But in these cases, on the installs you are referring to here, have you played mods or custom maps?
 
Upvote 0
But in these cases, on the installs you are referring to here, have you played mods or custom maps?
No mods and no custom maps. The KillingFloor2 folder on drive C: was deleted by the start of this week so everything should be clean.

I'm subscribed to a small amount of custom maps via Steam's workshop but have not played any of them recently.
 
Upvote 0
Stock game.
no mods, no custom maps... pure vanilla experience.
No mods and no custom maps. The KillingFloor2 folder on drive C: was deleted by the start of this week so everything should be clean.

I'm subscribed to a small amount of custom maps via Steam's workshop but have not played any of them recently
Can we get your logs from these crashes please? dxdiag too
 
Upvote 0
If I may suggest, rather than tweaking the .ini values (which we may want to leave to reduce stutter), it might be worth trying to reset the garbage collect state after leaving a server. I noticed that 90% of the time I can join without crash when it's the first server I join after starting the game The crash happens only the 2nd time, when I leave, then join another server. In my case it happens only on modded servers but I've also seen it happen on vanilla in extremely rare occurences (2-3 times out of 200 hours)

I could provide a log file, but even better, for testing purposes, here is a public modded server IP which crashes 100% of the time, exactly with the symptoms I and the previous users have described above: join once, leave, join again: it will crash shortly after zeds spawn.
Server join string is 35.246.157.149:7777
 
Last edited:
Upvote 0