Bug Report - 4 rails join to a straight section.

Fixed Trains
Espression [github] · 1 year ago

Issue description

I tried to expand a 2 track main line, 1 branch line rail connection to make it into a full two way T junction - 4 lines into the siding. The original setup allowed a train to enter without issue. When I expanded the T to include the other direction, only the two outer rails connected. The inner two would not connected to the straight part of the siding. I tried to delete the outer rails to make the small straight piece bi-directional, but I couldn't toggle these rails. I also couldn't delete the rails and further couldn't use the demolish tool at all. I saved the game and tried to reload and receive this error.

Reproduction steps

Load attached save file

Game version and build number

v0.7.8 b481

Operating system

Windows

Attachments

Save 2025-08-09, 09-54-02.save

25-08-09_08-59-13_4393.log

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]

Files not imported: Save 2025-08-09, 09-54-02.save

1 attachment only for registered users
Captain Filip Captain Filip · 1 year ago

We found a case where this corruption can occur and fixed it. We hope that was it, but one can never rule out another possibility If this happens again, please file another issue so we can investigate more.

Closed as ✅ Fixed

5 Showing 1–2 of 2