Simulation error Array index is out of range
Verified: January 2022 - TM:PE 11.5.2 / TM:PE 11.6
Notes:
- If the error is
IndexOutOfRangeException: Array index is out of range
, it might be caused by Broken road assets (see that link for solutions).- All versions of Loading Screen Mod include Safe Mode options that can sometimes help recover from the "Array index" errors. See Loading Screen Mod section at bottom of this guide for details.
You will see this error on-screen - either while a savegame is loading, or in-game:
Simulation error: Array index is out of range.
There are several variants, each caused by a different mod or sometimes broken workshop asset. You can determine which one you have by searching for the above error message in your log file and then checking what is on the next line...
There are so many differnt causes of the error that we created separate pages for most of them; click
Array Index - Symptom x
links, where available, for solutions to that specific error.
Array Index - Symptom 1:
at WG_PopOnly.CommercialBuildingAIMod ...
- or something similar starting with
at WG_
Symptom 1 has been fixed! Make sure you are using latest version of WG Configurable Population Modifiers mod.- Update November 2021: Use the Realistic Population Revisited mod instead.
at PassengerTrainAI.SimulationStep ...
- or
at PassengerTrainAI.StartPathFind ...
- or something similar starting with
at PassengerTrainAI
- or
at MetroOverhaul.Detours.PassengerTrainAIDetour.StartPathFind
at TransportLine.GetNextStop ...
- followed by
at BusAI.ArriveAtTarget ...
at WaterSimulation.LockWaterSource ...
at ImprovedPublicTransport2.Detour.VehicleManagerMod.ReleaseWaterSource ...
at BuildingThemes.Detour.ZoneBlockDetour ...
at BuildingAI.EnsureCitizenUnits ...
at CargoInfoMod.CargoData.Count ...
at UnlockManager.Unlocked ...
Node is not connected to segment
Warning #: ExtSegmentEndManager.GetIndex(#, #): Node is not connected to segment.
at TerrainModify.ApplyQuad ...
at TerrainModify.UpdateAreaImplementation ...
at TerrainManager.GetSurfaceCell ...
-
Parameter name: index
followed byat System.Collections.Generic.List ...
at GeneratedScrollPanel.IntializeUIAssetFilters
at TransportLineAI.CheckNodePosition
at EPTUI2.UITransportLineRow.Update
Array Index - Symptom 15:
at TransportLine.GetNextStop
- #867: If the stack trace mentions aircraft or helicopters or blimps, it's likely due to building a airport/helipad/depot outside of the central 25 tile area.
Array Index - Symptom 16:
NetManager+Data.Deserialize
- #1195: Likely caused by outdated mods or broken road assets.
- Use LSM "Safe Mode" (detailed further down this page) which can sometimes recover a broken save.
- Use Compatibility Report mod which can help track dowmn broken mods and suggest better alternatives.
There are some other things you can try...
Use Compatibility Report mod from Steam Workshop - it can help track dowmn broken mods and suggest better alternatives.
Also, check the Steam Guide on Finding Broken and Bloated Workshop Subscriptions which can help track down other broken mods and assets.
Some array index errors can be fixed using the "Safe Mode" options in Loading Screen Mod:
- Exit game to desktop
- Subscribe and enable Loading Screen Mod (LSM)
- In it's mod options:
- Enable the optimisation/sharing options to reduce RAM use (will make games load faster)
- Enable the safe mode options
- Now load your save - LSM will do everything it can to beat those errors
In some cases it might only work once, but the error will come back on the next load. If that happens, you'll have to try and track down what specifically is causing the error and fix it at source.
- Please post details of your error on the workshop page of the mod or asset causing the problem
- You can often get help on the official Cities: Skylines Discord server.
- If you use More Vehicles mod please note that lots of other mods aren't compatible as they generally hard-code the vehicle limit. The "Compatibility Report" mod will often tell you if that is the case.
- TM:PE versions 10.21.1, 11.0 and later are all compatible with More Vehicles.
- If you think it's caused by TM:PE, please Report a bug (TM:PE users only, please - we can't help debug other mods, sorry) and we'll investigate.
Other problems? See: Troubleshooting
Red links are broken; this wiki is a work in progress
Getting Started (click to open)
Troubleshooting / Bugs (click to open)
- Hints Panel
- Road & Rail:
- Junctions:
- Despawning:
- Info Views:
- Roads/Tracks:
- Nodes, Segments, Lanes
- Collector Roads
- Dedicated Turning Lanes
- Enter Blocked Junctions
- High Priority Roads
- Highway Junction Rules
- Lane Changes
- Pedestrian Crossings
- Priority Routes
- Road Conditions
- Roundabouts
- Roundabout Policies
- Stay in Lane
- Turn on Red
- U-Turns
- Unprotected Turns
- Vehicle Restriction Aggression
- Public Transport:
- Vehicles:
Todo: