Fix: 'S_FindName: out of sound slots' / Sound Precache Overflow

July 2, 2025 Daemon666 8 min read 4 görüntülenme

Your server crashes on map load or when a plugin fires, and the console shows S_FindName: out of sound slots or PF_precache_sound_I: '<file>' overflow. Both are the same underlying problem: GoldSrc reserves a fixed number of slots for precached sounds, and something — usually a stack of plugins each precaching their own sound pack — has run past that ceiling. The engine cannot register more, so it aborts. This is how to find what is eating the slots and cut it back.

1. Understand the hard limit

GoldSrc precaches every sound a map might play at load time into a fixed table (historically 512 slots). Maps, the base game, and every plugin that calls precache_sound all draw from the same pool. You do not get 512 per plugin — you get 512 total. A single ambient-sounds plugin, a hitsound plugin, a round-sound plugin and a quake-sounds plugin stacked together can each add dozens of files and blow the budget on a content-heavy map. The error is not a corrupt file; it is arithmetic.

2. Read the error precisely

Two forms show up, and they mean slightly different things:

S_FindName: out of sound slots
PF_precache_sound_I: 'sound/foo/bar.wav' overflow

The second form names the exact file that tipped it over — the last one that tried to register when the table was already full. That file is not necessarily the guilty party; it is simply the straw. The real cause is the total, so do not just delete that one sound and assume you are done.

3. Count what each plugin precaches

Precaching happens in plugin_precache() and on map start. Disable plugins one at a time to see which ones are heavy. Comment a line in addons/amxmodx/configs/plugins.ini (see plugins.ini load order), change map, and watch whether the overflow clears:

; ambience_sounds.amxx
; quake_sounds.amxx

Sound-pack plugins are the usual suspects: quake/HLDM announcer sounds, hitsound packs, ambient map sounds, custom bomb/round sounds. Each can register 20–80 files. Start with those. The moment the map loads without the error after disabling one, you have found a major contributor.

4. Trim the sound sets, do not just disable

You rarely need to remove a whole plugin — you need to shrink its sound list. Most sound plugins keep their file list in a config or a directory:

addons/amxmodx/configs/  (plugin .cfg or .ini with a sound list)
cstrike/sound/          (the .wav files themselves)

Edit the plugin's sound list down to the ones you actually want. A quake-sounds plugin with 40 announcer variations can lose the redundant ones and free 30 slots instantly. If two plugins precache the same sound, that is double-spend — consolidate onto one plugin.

5. Check for a runtime precache mistake

Precaching must happen at plugin_precache/map start, never mid-round. A plugin that calls precache_sound in a runtime event (on a kill, on a chat command) will keep adding slots as the map runs and eventually overflow even if the load was fine. If the crash happens after minutes of play rather than at load, look for a plugin precaching on the fly — that is a bug in the plugin, and a maintained one from the plugin directory will not do it.

Troubleshooting

  • Overflow only on certain maps — those maps ship many custom sounds of their own, leaving less room for plugins. Trim plugin sounds so the total fits the heaviest map.
  • Names a specific file in the overflow — that file is the straw, not the cause. Reduce the total count, not just that one.
  • Clears when you disable one plugin — that plugin is heavy but you can likely keep it by shrinking its sound list instead of removing it.
  • Crash appears minutes into a map, not at load — a plugin is precaching at runtime. That is a plugin bug; replace it.
  • Also seeing model/generic overflow — the same fixed-table problem hits models and generic files too. The approach is identical: count and trim.

Verification

Load your heaviest custom map with the full plugin set and confirm the console shows no out of sound slots or overflow line during precache. Play a full round and trigger every sound-producing plugin — hitsounds, round end, ambience — and confirm the server stays up. If it survives the busiest map with all sound plugins active, you are inside the budget. Keep a note of roughly how many sounds each plugin adds so the next plugin you install does not silently push you back over the edge.

Katkıda bulunanlar: Daemon666 ✦
Paylaş: