Game failing to initialize when reloading save

💥 Crash
This topic is closed (tagged ).
1 month ago

This was more present with v0.8.4b, but i had this specific crash bug come up again so i can now report it.

CHAIN OF EVENTS

  1. Load a save
  2. reloading the same save or an older save while in the game from the pause menu (instead of quitting back to main menu) (unsure if time is a factor between loading and reloading)\
  3. Game crash

ERROR SCREENimage.png
The pasted error screen:
"
The game failed to initialize. If this issue persists, please file a bug report.

Mafi.DependencyResolverException: Failed to instantiate Mafi.Unity.Ui.Hud.Toolbar.MenuItems.Registrators.TerraformingToolbarRegistrator. ---> Mafi.DependencyResolverException: Failed to instantiate 'Mafi.Unity.Ui.Hud.Toolbar.MenuItems.Registrators.TerraformingToolbarRegistrator'. ---> Mafi.DependencyResolverException: TargetInvocationException thrown by constructor of 'Mafi.Unity.Ui.Controllers.Designations.MiningDesignationController'. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
at Mafi.Unity.Ui.Controllers.Designations.AreaToolbox..ctor (Mafi.Unity.Ui.Hud.ToolbarHud toolbar, Mafi.Unity.InputControl.ShortcutsManager shortcutsManager, Mafi.Unity.Ui.Controllers.Designations.AreaToolbox+ToolType toolType) <0x7fd96420 + 0x00000>
at Mafi.Unity.Ui.Controllers.Designations.MiningDesignationController..ctor (Mafi.Unity.Ui.Hud.ToolbarHud toolbar, Mafi.Unity.Ui.UiContext context, Mafi.Unity.InputControl.TerrainCursor terrainCursor, Mafi.Unity.Terrain.Designation.TerrainDesignationsRenderer renderer, Mafi.Unity.Mine.TowerAreasRenderer towerAreasRenderer, Mafi.Unity.Vehicles.LogisticsZonesRenderer logisticsZonesRenderer, Mafi.Core.Terrain.Designation.TerrainDesignationsManager manager, Mafi.Unity.UiStatic.Controllers.DesignationControllerCursors cursors, Mafi.NewInstanceOf1[T] cursorMessage, Mafi.NewInstanceOf1[T] terrainOutlineRenderer, Mafi.Core.Terrain.Designation.ITerrainDesignationsManager designationManager, Mafi.Unity.InputControl.Inspectors.Buildings.OceanAreasOverlayRenderer oceanOverlayRenderer) [0x00005]
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.Set1[T] pendingResolves, System.Int32 recursionDepth, System.Object[] args) [0x002b2]
at Mafi.DependencyResolver.resolveDependency (System.Type dependencyType, System.Boolean throwOnError, Mafi.Collections.Set1[T] pendingResolves, System.Int32 recursionDepth) [0x000f5] at Mafi.DependencyResolver.instantiate (System.Type type, Mafi.Collections.Set1[T] pendingResolves, System.Int32 recursionDepth, System.Object[] args) [0x0023b]
--- 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) [0x0025f]
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__112.MoveNext () [0x0013b]
at Mafi.Unity.Main.stepSceneInitialization () [0x000fd]

Game version: 0.8.5
Loaded mods: (Kayser's Automatic Forestry Designations 0.1.3), (Kayser's Automatic Terrain Designations 0.4.0), (Union Pacific Big Boy 1.0.5), (Vertical Balancers 0.1.3), (Night Mod - Day & Night Cycle 0.1.1a), (Real Life Time 1.0.0), (Research Queue 1.0.1), (ShipAutoExplore 0.1.0), (Underground Transport 5.1.7), (Wind turbines 0.1.10b)
Failed mods: none
"

The same crash occurs when reloading from the main menu after a crash, this error is from the main menu after trying to reload

USER WORKAROUNDS

  1. Closing the game and restarting it removes the error
  2. quitting to the main menu before reloading doesn't seem to cause the error

OTHER INFO FROM USER
This was happening before i started modding my game i think, so i don't think modding is to blame
I am on linux playing through steam proton, if there are problems reproducing this crash that might be a factor
This kind of crash was a guarantee for me back on v0.8.4b, but i have managed to reload a save without quitting to menu on v0.8.5
This happened across 2 separate games, so it's not a savegame/world specific issue
I've included an older crash log from may 31st, given the only crashes i've had were from this problem, maybe it could help

Edited 1 month ago
1 attachment only for board moderators
51 Showing 11 of 1
Log in to reply.