Skip to content

FXServer Crashes & Trace Logs

Server crashes and freezes are almost always caused by server artifact incompatibilities, unhandled infinite loops in custom scripts, or oversized streaming textures. Follow this guide to analyze log dumps and restore stability.


When your server crashes, stops, or hangs:

  1. Navigate to your server directory and open CitizenFX.log (or logs/ directory in txAdmin).
  2. Scroll to the very bottom of the log file to locate the last executed thread or error trace.
  3. Look for the following signature keywords:
    • SCRIPT ERROR: ... (Indicates a specific line in a Lua script caused a fatal exception).
    • Assertion failed ... (Indicates an entity routing, state bag, or artifact incompatibility).
    • Segmentation fault / Access violation (Outdated FXServer binary build).

2. Server Freeze / CPU 100% Hang (Infinite Loops)

Section titled “2. Server Freeze / CPU 100% Hang (Infinite Loops)”

Cause: Occurs when a background thread (CreateThread) executes a while true do loop without yielding execution to the engine via Wait().

Example Resolution:

-- ❌ BAD: Infinite loop that hangs the server CPU thread instantly
CreateThread(function()
while true do
CheckState() -- No Wait! Causes 100% CPU lockup and crash
end
end)
-- ✅ GOOD: Yielding execution with an appropriate tick interval
CreateThread(function()
while true do
Wait(1000) -- Gives other threads time to execute
CheckState()
end
end)

3. Client Out of Memory (OOM) & Game Crashes

Section titled “3. Client Out of Memory (OOM) & Game Crashes”

Cause: High-poly custom 3D models or uncompressed .ytd texture dictionaries from poorly optimized vehicles or MLOs. When the player’s GPU VRAM budget is exceeded, FiveM crashes with an ERR_GFX_D3D_ALLOC or Texture memory pool overflow error.

Prevention:

  • Ensure custom props, MLOs, and vehicle mods stay within FiveM texture budgets (texture dictionaries under 16 MB, .ydr models with proper LOD levels).
  • All Mountain Mods 3D models and props are strictly optimized with low polygon counts, clean collision meshes, and compressed textures to guarantee zero client memory crashes.

4. OneSync Entity Routing & State Bag Crashes

Section titled “4. OneSync Entity Routing & State Bag Crashes”

Cause: Starting modern FiveM scripts on servers with legacy routing or OneSync disabled.

Resolution: In your server.cfg, ensure OneSync Infinity is enabled:

set onesync on
set onesync_enableInfinity 1

If you have reviewed all common issue guides and still require technical assistance from the Mountain Mods team, follow these steps to get rapid resolution:

  1. Join our Discord Community and open a Technical Support Ticket.
  2. Provide the following information in your ticket:
    • Resource Name & Version (e.g. mtm-matrixborden v1.0.0).
    • FXServer Artifact Build Number (e.g. Build 7290 Windows/Linux).
    • Framework & Version (e.g. QBCore v1.2.6 / ESX Legacy 1.10.2 / Standalone).
    • Database Engine (e.g. oxmysql v2.4.0).
    • Log Attachment: Attach the relevant excerpt from CitizenFX.log or client F8 console.