The Game Failed to Initialize - System.IndexOutOfRangeException

Fixed
undergroundwebdesigns [github] · 1 year ago

Issue description

Attempting to reload a saved game that I last played 10 days ago now fails with the following error. This seems to be consistent across all 7 saves from the last time I played _except the first save of that playthrough, which does load. Saves prior to this (from a previous session 15 days ago) also load.

The game failed to initialize. Please file a bug report if this issue persists.

System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Mafi.Unity.Terrain.TerrainRenderer.encodeSplatsData (Mafi.Collections.Pair`2[Mafi.Core.Products.TerrainMaterialSlimId,Mafi.Fix32][] data, System.Int32 count) [0x0006c]
at Mafi.Unity.Terrain.TerrainRenderer+TerrainRendererChunk.InitializeData () [0x00116]
at Mafi.Unity.Terrain.TerrainRenderer.initState () [0x00391]
at Mafi.Core.GameLoop.IGameLoopEventsExtensions+<makeEnumerator>d__3.MoveNext () [0x00013]
at Mafi.Core.GameLoop.GameLoopEvents+<InvokeRendererInitializeState>d__66.MoveNext () [0x000d3]
at Mafi.Core.GameLoop.GameRunner+<Initialize>d__104.MoveNext () [0x0039f]
at Mafi.Core.Game.GameBuilder+<initializeGame>d__6.MoveNext () [0x00127]
at Mafi.Core.Game.GameBuilder+<BuildLoadedGameTimeSliced>d__3.MoveNext () [0x0037a]
at Mafi.Unity.GamePlayScene+<loadGame>d__21.MoveNext () [0x00296]
at Mafi.Unity.GamePlayScene+<Initialize>d__18.MoveNext () [0x000a5]
at Mafi.Unity.Main+<unloadAndStartNewScene>d__70.MoveNext () [0x000fc]
at Mafi.Unity.Main.stepSceneInitialization () [0x000dc]

Reproduction steps

  1. Load any of last several saves in my current playthrough.
  2. Loading fails with error.

Game version and build number

v0.6.4d b347

Operating system

Windows

Attachments

25-03-03_14-52-09_4356.log

Save 2025-02-21, 20-47-31.save, 25-02-21_20-34-autosave.save

Files not imported: Save 2025-02-21, 20-47-31.save, 25-02-21_20-34-autosave.save

1 attachment only for registered users
poltime poltime · 1 year ago

Most likely, the files are corrupted. Check the RAM and drive for errors.

Captain Filip Captain Filip · 1 year ago

This was fixed as part of v0.7.9. Thank you!

Closed as ✅ Fixed

7 Showing 1–3 of 3