Issue description
I was copy/pasting train stations when I received the below error, which kicked me out of the game (back to main menu).
The game failed to initialize. Please file a bug report if this issue persists.
Mafi.Serialization.CorruptedSaveException: Failed to initialize 'Train' when calling 'initAfterLoad' ---> Mafi.Serialization.CorruptedSaveException: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Mafi.Core.Trains.Train.initAfterLoad (System.Int32 saveVersion) [0x001c5] . Train initialization failed.
at Mafi.Core.Trains.Train.initAfterLoad (System.Int32 saveVersion) [0x00594]
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a]
--- End of inner exception stack trace ---
at Mafi.Serialization.BlobReader+<FinalizeLoadingTimeSliced>d__34.MoveNext () [0x005c7]
at Mafi.Core.SaveGame.GameLoader+<FinishGameLoadAndDisposeTimeSliced>d__7.MoveNext () [0x004a9]
at Mafi.Core.Game.GameBuilder+<BuildLoadedGameTimeSliced>d__3.MoveNext () [0x002fe]
at Mafi.Unity.GamePlayScene+<loadGame>d__25.MoveNext () [0x00297]
at Mafi.Unity.GamePlayScene+<Initialize>d__22.MoveNext () [0x000a5]
at Mafi.Unity.Main+<unloadAndStartNewScene>d__89.MoveNext () [0x0011b]
at Mafi.Unity.Main.stepSceneInitialization () [0x000dd]
Reproduction steps
Unable to replicate issue after loading earlier save. The crashing save is included in the attachment.
Game version and build number
v0.7.8a b486
Operating system
Windows
Attachments
Save 2025-08-22, 13-33-43.save