Crash Report Help Needed: "bad allocation" Error
-
Hello everyone,
I've encountered a perma freeze (Not crashing though) in FAF during a game, and I’m not sure what might be causing it. Below is the relevant portion of the log file, where it reports a crash in DoSimBeat() with the error "bad allocation." Unfortunately, I'm not familiar enough to pinpoint the issue.
Here’s a snippet from the log:
info: Sim crashed hard in DoSimBeat(): bad allocation ... debug: Session time: 00:54:38 Game time: 00:48:54 Heap: 808.8M / 729.2M ...
It looks like memory usage was a factor, but I’m uncertain if it’s tied to my mods or a specific in-game event.
Mods I'm Using:
UI Mods:
- Advanced Selection Info
- Advanced Target Priorities
- BrewLAN: Gameplay Mods
- Build Range Preview
- Phillip Crofts Soundtrack
- Penguin's Icon Mod
- Redux ACU Icons
- SupCom Vanilla Music FAF
- ShareMouse
- Supreme Economy Next
- Supreme Score Board
SIM Mods:
- BlackOps FAF: ACUs
- BlackOps FAF: EXUnits
- BlackOps FAF: Unleashed
- BrewLAN
- BrewLAN: Additional Unit Mods
- Buildable Lower Tiers Experimentals in Factories for TotalMayhem
- Damage Numbers
- EXPERIMENTAL UNIT HEALTH X1.5
- Kennel Engineering Stations for All
- M28AI
- No Build Restrictions in Campaign
- No Friendly Fire
- PJ Infrastructure Pack
- Reclaim Turret Aggressive
- Smart Tactical Missiles
- T4 Energy Generators
- Total Mayhem
If anyone has experience debugging this kind of crash or sees a potential mod conflict that might be triggering the issue, I’d really appreciate your insights. Could it be memory-related due to heavy mod usage, or is something else at play here?
Let me know if more information is needed.
Thanks in advance for your help!
-
Please attach the log. Maybe it will help to identify the issue.
-
Too big for it to get uploaded, maybe if I could upload it I would have.
Here's a drive link then : https://drive.google.com/file/d/1uA5UOUl5IwPe9nDYq7_ApYnflfQYklt4/view?usp=sharing -
@maudlin27 Is the error related to m28 or/and the gigantic mod list?
Half a million lines about:
warning: Error running lua script: ...er forged alliance\mods\m28ai\lua\ai\m28unitinfo.lua(439): bad argument #1 to `max' (number expected, got nil)
and a few
Line 15058: warning: stack traceback: Line 15059: warning: [C]: in function `assert' Line 15060: warning: [C]: in function `pcall' Line 15061: warning: ...r forged alliance\mods\m28ai\lua\ai\m28utilities.lua(247): in function `ErrorHandler' Line 15062: warning: ...er forged alliance\mods\m28ai\lua\ai\m28engineer.lua(1361): in function `GetBlueprintAndLocationToBuild' Line 15063: warning: ...mmander forged alliance\mods\m28ai\lua\ai\m28acu.lua(98): in function `ACUBuildUnit' Line 15064: warning: ...mmander forged alliance\mods\m28ai\lua\ai\m28acu.lua(332): in function `ACUActionBuildMex' Line 15065: warning: ...mmander forged alliance\mods\m28ai\lua\ai\m28acu.lua(2692): in function `ConsiderBuildingMex' Line 15066: warning: ...mmander forged alliance\mods\m28ai\lua\ai\m28acu.lua(5114): in function <...mmander forged alliance\mods\m28ai\lua\ai\m28acu.lua:4154> Line 15067: warning: false M28ERROR Count=2: GameTime 800: Dont have valid water or land zone but are looking to build a resource
And a bunch of other warnings which I have no clue about.
-
A decent chance it is, as repeated errors seem to have a significant correlation with crashes. I can look into/try and fix the error messages for the next M28 release, and even if it's not the cause of the crash it should at least make it a bit easier to diagnose the crash cause if it reoccurs.
-
I’ve gone through the game log, and the errors visible there have nothing to do with the crash. Most of the time, it’s just variables that can’t be found.
For example, M28 tries to access a variable where a number is expected, but nothing is returned. Here, the 92,574 error messages could have flooded the log and caused an issue with memory management. (I don’t think so, though — we’ve had worse log spam before, and the log continued to write.)
Brewlan expects a variable named TDFShipGaussCannonProjectile, which doesn’t exist. However, this only causes a standard projectile to be used and shouldn’t crash the game.
My gut feeling tells me that a mod like Buildable Lower Tiers Experimentals in Factories for Total Mayhem, Kennel Engineering Stations for All, or Reclaim Turret Aggressive is responsible. Most likely, it’s a modified unit where the engine expects certain values that aren’t present. But as I said, this is just my gut feeling, so it’s more guessing than knowing.
The only recommendation here is to thoroughly test the mods one by one. Even if you’re 100% certain which mod is causing the issue, debugging it is still difficult (to actually fix the mod).
-
The kind of crash you are describing is more consistent with something doing something illegal, rather than an out of memory error. Out of memory almost always will just dump you out to the desktop.