Crash and Trains dont work

Fixed Crash Trains
emie801 [github] · 1 year ago

Issue description

The game could not be initialized. Please send us a report with details.

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.TrainTracksGraphManager.claimBlockInSuperBlock (Mafi.Core.Trains.TrainTracksGraphManagerBase1+BlockData[Mafi.Core.Trains.IEntityWithTrainTrack]& dataRef, Mafi.Core.TrainId trainId) [0x000e8] at Mafi.Core.Trains.TrainTracksGraphManager.ReserveBlockNoChecks (Mafi.Core.Trains.TrainTrackBlockId blockId, Mafi.Core.TrainId trainId, System.Predicate1[T] ignoreSuperBlock) [0x000c2]
at Mafi.Core.Trains.TrainTracksGraphManager.TryReserveBlock (Mafi.Core.Trains.TrainTrackBlockId blockId, Mafi.Core.TrainId trainId, System.Predicate`1[T] ignoreSuperBlock, System.Boolean ignoreSelfBlocking) [0x0001a]
at Mafi.Core.Trains.Train.initAfterLoad (System.Int32 saveVersion) [0x00260] . Train initialization failed.
at Mafi.Core.Trains.Train.initAfterLoad (System.Int32 saveVersion) [0x00470]
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__33.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__23.MoveNext () [0x00297]
at Mafi.Unity.GamePlayScene+<Initialize>d__20.MoveNext () [0x000a5]
at Mafi.Unity.Main+<unloadAndStartNewScene>d__88.MoveNext () [0x000fc]
at Mafi.Unity.Main.stepSceneInitialization () [0x000dd]

Reproduction steps

Load AutoSave game where problem with the Trains an Tracks. Trains dont move and no free tracks

Game version and build number

v0.7.5b b454

Operating system

Windows

Originally posted in German
### Issue description Das Spiel konnte nicht initialisiert werden. Bitte senden Sie uns einen Bericht mit Details. 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.TrainTracksGraphManager.claimBlockInSuperBlock (Mafi.Core.Trains.TrainTracksGraphManagerBase`1+BlockData[Mafi.Core.Trains.IEntityWithTrainTrack]& dataRef, Mafi.Core.TrainId trainId) [0x000e8] at Mafi.Core.Trains.TrainTracksGraphManager.ReserveBlockNoChecks (Mafi.Core.Trains.TrainTrackBlockId blockId, Mafi.Core.TrainId trainId, System.Predicate`1[T] ignoreSuperBlock) [0x000c2] at Mafi.Core.Trains.TrainTracksGraphManager.TryReserveBlock (Mafi.Core.Trains.TrainTrackBlockId blockId, Mafi.Core.TrainId trainId, System.Predicate`1[T] ignoreSuperBlock, System.Boolean ignoreSelfBlocking) [0x0001a] at Mafi.Core.Trains.Train.initAfterLoad (System.Int32 saveVersion) [0x00260] . Train initialization failed. at Mafi.Core.Trains.Train.initAfterLoad (System.Int32 saveVersion) [0x00470] 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__33.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__23.MoveNext () [0x00297] at Mafi.Unity.GamePlayScene+<Initialize>d__20.MoveNext () [0x000a5] at Mafi.Unity.Main+<unloadAndStartNewScene>d__88.MoveNext () [0x000fc] at Mafi.Unity.Main.stepSceneInitialization () [0x000dd] ### Reproduction steps Load AutoSave game where problem with the Trains an Tracks. Trains dont move and no free tracks ### Game version and build number v0.7.5b b454 ### Operating system Windows
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

6 Showing 1–2 of 2