[FIXED] Error when Loading Game

willvette · 24 days ago

Started a game with your mod, all good there. Played for a few hours, saved and quit. next day loaded and got the following error. Error percepts as long as mod is active and game tries to load existing save, disabling allows save to be loaded.

The game failed to initialize. If this issue persists, please file a bug report.

Mafi.DependencyResolverException: Failed to instantiate FastStart.FactoryStartService. ---> Mafi.DependencyResolverException: TargetInvocationException thrown by constructor of 'FastStart.FactoryStartService'. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Registration of new 'NewGameCreated' event by 'FactoryStartService' but the event was already invoked. Current state: None, last state: RenderUpdateEnd
at Mafi.Core.GameLoop.GameLoopEvents.Mafi.Core.GameLoop.INewGameCreatedEvents.RegisterNewGameCreated (System.Object registrator, System.Collections.Generic.IEnumerator1[T] iterativeCallback) [0x00045] at FastStart.FactoryStartService..ctor (Mafi.Core.GameLoop.IGameLoopEvents gameLoopEvents, Mafi.Core.Research.ResearchManager researchManager, Mafi.Core.Vehicles.VehiclesManager vehiclesManager, Mafi.Core.Entities.EntitiesManager entitiesManager, Mafi.Core.Entities.EntitiesCreator entitiesCreator, Mafi.Core.Entities.EntitiesBuilder entitiesBuilder, Mafi.Core.Economy.IAssetTransactionManager assets, Mafi.Core.Prototypes.ProtosDb protosDb) [0x00010] at (wrapper managed-to-native) System.Reflection.RuntimeConstructorInfo.InternalInvoke(System.Reflection.RuntimeConstructorInfo,object,object[],System.Exception&) at System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x00005] --- End of inner exception stack trace --- at System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x0001a] at System.Reflection.RuntimeConstructorInfo.DoInvoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00086] at System.Reflection.RuntimeConstructorInfo.Invoke (System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] at System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) [0x00000] at Mafi.DependencyResolver.instantiate (System.Type type, Mafi.Collections.Set1[T] pendingResolves, System.Int32 recursionDepth, System.Object[] args) [0x00284]
--- End of inner exception stack trace ---
at Mafi.DependencyResolver.instantiate (System.Type type, Mafi.Collections.Set`1[T] pendingResolves, System.Int32 recursionDepth, System.Object[] args) [0x002b2]
at Mafi.DependencyResolver.EnsureResolved (System.Type implType, System.Type asType) [0x0008f]
--- End of inner exception stack trace ---
at Mafi.DependencyResolver.EnsureResolved (System.Type implType, System.Type asType) [0x000ae]
at Mafi.DependencyResolver.InstantiateAllAndLock () [0x00316]
at Mafi.Core.Game.GameBuilder+<initializeGame>d__5.MoveNext () [0x0007d]
at Mafi.Core.Game.GameBuilder+<BuildLoadedGameTimeSliced>d__1.MoveNext () [0x00650]
at Mafi.Unity.GamePlayScene+<loadGame>d__28.MoveNext () [0x002ca]
at Mafi.Unity.GamePlayScene+<Initialize>d__25.MoveNext () [0x000ad]
at Mafi.Unity.Main+<unloadAndStartNewScene>d__116.MoveNext () [0x0013b]
at Mafi.Unity.Main.stepSceneInitialization () [0x00104]

Game version: 0.8.6a
Loaded mods: (Kayser's Automatic Forestry Designations 0.1.11), (Kayser's Automatic Terrain Designations 0.5.2), (Elevation++ 0.9.3), (Advanced Farm & Food Optimiser 0.1.0), (Fast Start 1.0.2), (Industrial Expansion 1.0.5), (Modular Ramp 3.0.0), (Pier Wall Mod 1.0.0), (Programable Network 1.1.4a), (Research Queue 1.0.1), (ShipAutoExplore 0.1.0)
Failed mods: none

Duugrim · 22 days ago

Hello!

Yep, since the mod is only supposed to work at the start of the game, I forgot to test loading save.

Fixed, thanks for the catch!

51
Showing 1–2 of 2