CUtlLinkedList overflow

From Valve Developer Community
Jump to navigation Jump to search
Icon-callout-orphan.png
This article is an orphan, meaning that few or no articles link to it (since January 2024). You can help by adding links to this article from other relevant articles.

A cryptic engine error can be encountered in certain situations, with the message CUtlLinkedList overflow! (exhausted memory allocator) or CUtlLinkedList overflow! (exhausted index range). This articles states potential causes and their solutions.

Todo: There is definitely more cases where this can happen

Big entity bounding boxes

Note.pngNote: If you are a regular person who found this page by searching this error: the error is usually caused by a map not configuring shadows correctly. You can prevent yourself from crashing by disabling shadows with r_shadows 0. The page below describes the issue in technical details and how to fix it as a map or plugin author.

The most common reason for this issue is an entity with inflated bounding box size, usually 1000 units or more in size, casting dynamic shadows across a large area which hits the shadow triangle limit in the engine. Models with big bounding boxes can be identified with ent_bbox command, or for brush entities, checking the yellow box when selecting an entity in Hammer. Some may not be easy to catch at first glance, for example 2 chimneys grouped into a func_brush several thousands of units apart will create a very big bounding box which will easily cause the engine error. Another way this can occur is because of a huge translation in any of the model's $sequences (for example, shifting a model 10000 units down during an animation). In this case, the bounding box should be overriden with $bbox to be the "correct" size.

Team Fortress 2 Example: The sentry blueprint model has a nearly 4000 unit long bounding box due to the sphere range visualizer!

The solution is to disable shadows on such entities, by setting the Disable Shadows property on the entity to true (internally named disableshadows 1).

Tip.pngTip: In games that support VScript, run this .nut file via script_execute in console to find these entities automatically
for (local ent = Entities.First(); ent; ent = Entities.Next(ent))
{
	local modelname = ent.GetModelName()
	if (modelname.len() == 0)
		continue
		
	if (endswith(modelname, ".vmt"))
		continue
	
	local mins = ent.GetBoundingMins()
	local maxs = ent.GetBoundingMaxs()
	local delta = (maxs - mins).Length()
	if (delta < 512.0)
		continue
		
	if (NetProps.GetPropInt(ent, "m_fEffects") & 16) // EF_NOSHADOW
		continue
	
	printf( "Entity %s at (%s) [%s] has too big bounds for shadow casting (radius %g)\n", 
		ent.GetClassname(), ent.GetOrigin().ToKVString(), modelname, delta)
}
Wikipedia - Letter.png
This article has not been added to any content categories. Please help out by adding categories.
January 2024