--- title: "Fix: Server Crashes with a Segfault on Map Change" excerpt: "A CS 1.6 server boots fine but segfaults on changelevel. The real causes — a stale delta.lst, precache overflow, bad plugins, missing map assets — and how to pin the exact one." category: "errors" tags: "segfault, mapchange" image: "" read_time: "8 min read" ---
A crash on map change is a distinct and more interesting bug than a startup crash: the server boots, plays a full round, and then dies exactly at changelevel or when the round ends and rotation kicks in. Because it only triggers during the level transition, the causes are specific — the state carried across the boundary, the resources the next map precaches, and plugins that hook the transition. Here is how to find yours.
First separate "crashes when leaving any map" from "crashes when loading one specific map". Force changes manually:
changelevel de_dust2 changelevel de_inferno changelevel cs_assault
If you run ReGameDLL, the number-one cause of transition and connect crashes is a delta.lst that does not match the game DLL. It defines how entity state is serialised across the network and across level changes; a stale one corrupts state at exactly these boundaries. Copy the delta.lst that shipped with your ReGameDLL build over the top:
cp /path/to/regamedll-release/cstrike/delta.lst /home/steam/hlds/cstrike/delta.lst
Restart and re-test the map change. This single file fixes a large share of "random crash on map change" reports.
Plugins that run on round end, intermission, or map change (map-vote, stats-save, end-of-map handlers) are prime suspects because they only execute at the boundary. Watch the log through a crash:
tail -f /home/steam/hlds/cstrike/addons/amxmodx/logs/*.log
The last plugin to log before the crash is your first suspect. Disable third-party plugins in AMXX's plugins.ini, confirm map changes are clean, then re-enable in batches until it crashes again — see managing plugins. A stats plugin doing a database write at map end can also crash on a dropped SQL connection; check the module's log too.
CS 1.6 has hard limits on precached models, sounds and generic resources. A map plus your plugins' custom models and sounds can exceed them, and the overflow surfaces as a crash while loading that map. The tell-tale log line is a precache error or:
Host_Error: PF_precache_*: overflow
Reduce what is precached: trim plugin-added models/sounds, or move rarely-used content behind on-demand precache. Maps that reference many external assets are the usual trigger — see adding custom content for what a map pulls in.
A map whose models or sounds are absent from the server can fault as it precaches them. If section 1 pointed at one specific map, verify its assets are all present:
Host_Error: PF_precache_sound_I: '...' failed to load
Copy the map's complete asset set (sound/, models/, WADs). A map that loads standalone but crashes only in rotation is usually this plus precache pressure from plugins that a fresh boot did not have.
If nothing above holds, a mismatched ReHLDS/ReGameDLL pair can be stable mid-round and crash on transition. Update both to the same-era releases and confirm:
rehlds_version regamedll_version
changelevel, no useful log — stale delta.lst. Copy the matching one first.Host_Error: PF_precache_* overflow — too many precached resources; trim plugin/map content.Prove the fix under the exact condition that failed. Run several forced changes across different maps back to back:
changelevel de_dust2 changelevel de_nuke changelevel de_dust2
Each must complete without a Host_Error or segfault. Then let the server rotate naturally through a full mapcycle.txt with players (or bots) connected — the natural end-of-round transition is where a plugin-driven crash hides that a manual changelevel can miss. If the server cycles through the whole rotation with players on it and no crash, the map-change fault is fixed. A startup-time crash instead points back to the startup segfault guide.
It helps to understand why this boundary is special, because it tells you where to look first. A level change is the one moment the engine tears down the entire entity world and rebuilds it: it serialises surviving state, unloads the map, precaches every resource the next map and every plugin ask for, and reconstructs entities from the delta definitions. Three of those steps are exactly where the common causes live — serialisation reads delta.lst, precache hits the resource limits, and plugin end-of-map handlers fire in between. That is why a server can be rock-solid for an entire round and die at the seam. It also explains the ordering of this guide: check delta.lst first because it is both the most common cause and the cheapest to fix, then precache, then plugins, because that is the order the engine actually exercises them during the transition. Fix the delta list, keep precache under its limits, and keep transition-time plugins honest, and map changes stop being the thing you hold your breath through.