Weapon limit crash's
What happened?
Hello,
I’ve been running some tests regarding client crashes when loading into a FiveM server with custom melee weapon packs. I’m the creator behind Polars Armoury, and I’ve released 10 weapon packs so far.
Here’s what I’ve observed:
When I run all 10 of my weapon packs on a server, clients crash upon loading in.
If I remove some of the weapons, the crashing stops and players can join normally.
At first, I assumed the crashes were caused by my weapons specifically. However, after testing with weapons from other creators, I noticed the same issue — the game crashes when too many weapon packs are active at once.
The crash reports in those cases reference weapons from other creators, not mine, which leads me to believe the issue is not tied to a specific creator’s assets.
Based on these tests, it seems like there may be a limit to how many custom weapons can be loaded into a server before it starts causing client crashes.
Can you confirm if there is a known limit to the number of weapon packs or custom weapons that can be added to a server? If so, is there any chance this limit could be increased in the future to allow more weapons without causing instability? Also, is there any recommended workaround in the meantime?
Thank you for your time and support.
— Polars Armoury
ps. i have attached a few crash reports referencing my own weapons and other creators weapons
Expected result
the game should have loaded up without crashing
Reproduction steps
- you require 10 of my weapon packs (because i have roughly 330 custom addon melee weapons which i am happy to provide)
- place them in your test server
- it will crash
- remove 2 weapon packs (for example halloween pack and throwables pack as they have a decent amount of weapons inside them) or even just my pack called melee v3 which has 83 weapons inside it, regardless which pack you choose to remove as long as its a good amount of weapons removed to not hit that suspected Limit the game can handle
- load up server and see the crash doesnt happen
- to remove suspicion that it could be due to my weapons add these free weapon packs along with my some of my weapons (https://github.com/NoobySloth/Custom-Weapons) , (https://github.com/Branqueador/GGC-Weapons), (https://forum.cfx.re/t/free-addon-gang-weapons/5244495)
- the same crash with the similiar crash report you had from my weapons but now with one of those other creator being the suspected problem as the crash report may tell you
Importancy
Crash
Area(s)
FiveM
Specific version(s)
FiveM Artifacts 17000, Gamebuild 3258
Additional information
I had also noticed this around a year ago, however this issue has already been discussed and closed sadly :/
#3432
Yes, you’re hitting engine-side limits/constraints, not a single “bad” creator. The crash in data file mounter while loading WEAPONINFO_FILE is classic when the total number/size of weapon metas, personalities, and anim files crosses safe pool/heap bounds or contains duplicate hashes/names. Fix by consolidating, deduplicating, and reducing mounts.
Do this:
-
Consolidate metas
- Merge all per-weapon
weapons.metainto ONE file per resource (or a few big ones), inside a single<CWeaponInfoBlob><Infos>…</Infos></CWeaponInfoBlob>. - Do the same for
weaponanimations.metaandpedpersonality.meta(one file each if possible). - Fewer data_file mounts = fewer allocations; this alone stops many mounter crashes.
- Merge all per-weapon
-
Deduplicate and normalize
- Ensure every
<Name>(e.g., WEAPON_XYZ),<Model>,<Audio>AUDIO_HASH</Audio>, anim clipsets, and grenade/throwable names are UNIQUE across all packs. No reusing base names from other packs. - Remove identically named entries across packs; collisions can crash or corrupt.
- Keep display/loc names unique too (even if cosmetic).
- Ensure every
-
Reduce counts where possible
- Very large melee counts (300+) with separate anim/personality entries are risky. Group variants under the same weapon where possible (e.g., use tints or components for skins) to cut total weapon infos.
- Reuse vanilla throw/hold/attack clipsets when possible; avoid per-weapon custom
weaponanimations.metaunless it truly differs.
-
Validate the XMLs
- All metas must be well-formed UTF‑8 (no BOM), no stray comments inside numeric fields, no missing required tags.
- Each
weapons.metaneeds correct<ClipSize>,<DamageType>,<HumanNameHash>,<AnimReloadRate>etc. Bad or out-of-range fields can crash only when many are loaded. - Run a duplicate-hash/name scan across all metas before shipping.
-
Packfiles and textures
- Keep YDR/YDD within sane poly/texture budgets; compress static textures (DXT) but NEVER compress
script_rt_*(they must be A8R8G8B8). Oversized/RT-compressed TXDs increase memory pressure and instability. - Strip unused mipmaps; avoid 8K textures for melee.
- Keep YDR/YDD within sane poly/texture budgets; compress static textures (DXT) but NEVER compress
-
fxmanifest hygiene
- Mount each data file ONCE. Avoid mounting dozens of tiny metas; prefer one line per consolidated file:
- data_file 'WEAPONINFO_FILE' 'meta/weapons.meta'
- data_file 'WEAPON_ANIMATIONS_FILE' 'meta/weaponanimations.meta'
- data_file 'PED_PERSONALITY_FILE' 'meta/pedpersonality.meta'
- Remove unused or duplicate data_file lines.
- Mount each data file ONCE. Avoid mounting dozens of tiny metas; prefer one line per consolidated file:
-
Bisect to confirm the bound
- Start from a stable baseline; add packs in halves. If adding “N” crashes, try “N/2” to find the threshold. After consolidation, the threshold will move up significantly.
-
Server/runtime
- Pin a single game build (
sv_enforceGameBuildb2944/3095/3258) and keep artifacts up to date. - Clear client and server caches after you change pack structure.
- Pin a single game build (
-
Workarounds if you must keep >300 items
- Split into “rotation” packs; load only a subset at a time.
- Convert cosmetic variants to tints/components under a smaller set of base weapons.
- Share anim/personality entries between similar weapons (same clipsets) instead of one per weapon.
What your logs point to
- Crash while mounting
PolarsArmoury_Throwableweaponpack/.../weapons.metaafter a long series of WEAPONINFO/ANIM/PERSONALITY loads → not one file “bad”, but the aggregate. Duplicate names across packs will make the last one loaded look “guilty.” Consolidation + dedup fixes this.