ERROR

Won't fix Mod issue
AraujoBr1 [github] · 3 months ago

Issue description

The game failed to start. If the problem persists, please submit an error report.

Mafi.DependencyResolverException: Failed to instantiate Mafi.Unity.Ui.Hud.Toolbar.MenuItems.Registrators.GeneralProtosToolbarRegistrator. ---> Mafi.DependencyResolverException: Failed to instantiate 'Mafi.Unity.Ui.Hud.Toolbar.MenuItems.Registrators.GeneralProtosToolbarRegistrator'. ---> Mafi.DependencyResolverException: TargetInvocationException thrown by constructor of 'Mafi.Unity.Ui.Controllers.TransportBuildController'. ---> 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.TransportBuildController..ctor (Mafi.Unity.Ui.Hud.ToolbarHud toolbar, Mafi.Unity.Ui.UiContext context, Mafi.NewInstanceOf1[T] terrainCursor, Mafi.Unity.InputControl.CursorPickingManager picker, Mafi.Unity.Ports.Io.IoPortsRenderer portsRenderer, Mafi.Unity.UiStatic.Cursors.CursorManager cursorManager, Mafi.Unity.Ui.Controllers.PathFindingTransportPreview transportPreview, Mafi.Core.Prototypes.UnlockedProtosDb unlockedProtosDb, Mafi.Unity.InputControl.TerrainCursorVisual terrainCursorVisual, Mafi.Unity.Mine.TowerAreasRenderer towerAreasRenderer, Mafi.Core.UiState.LastSelectedTierTracker lastSelectedTierTracker) <0x6834a6c0 + 0x00000> 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.Set1[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: (Trains expansion 1.0.0), (Supporter edition 1.1.0), (All Excavators Bucket Capacity x5 0.1.4), (All Farms Output x10 0.1.1), (All Trucks Capacity x5 0.1.1), (Kayser's Automatic Terrain Designations 0.4.3), (Blueprint Products Info 1.0.0), (Industrial Expansion 1.0.4), (Pillar Spacing and Height Mod 1.0.1), (Cheat++ 1.2.6), (Gameplay++ 1.2.5), (Storage++ 1.1.2), (Tweaks++ 1.1.6)
Failed mods: none

Reproduction steps

ERROR

Game version and build number

v0.8.5 b598

Operating system

Windows

Originally posted in Portuguese
### Issue description O jogo falhou ao iniciar. Se o problema persistir, por favor envie um relatório de erro. Mafi.DependencyResolverException: Failed to instantiate Mafi.Unity.Ui.Hud.Toolbar.MenuItems.Registrators.GeneralProtosToolbarRegistrator. ---> Mafi.DependencyResolverException: Failed to instantiate 'Mafi.Unity.Ui.Hud.Toolbar.MenuItems.Registrators.GeneralProtosToolbarRegistrator'. ---> Mafi.DependencyResolverException: TargetInvocationException thrown by constructor of 'Mafi.Unity.Ui.Controllers.TransportBuildController'. ---> 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.TransportBuildController..ctor (Mafi.Unity.Ui.Hud.ToolbarHud toolbar, Mafi.Unity.Ui.UiContext context, Mafi.NewInstanceOf`1[T] terrainCursor, Mafi.Unity.InputControl.CursorPickingManager picker, Mafi.Unity.Ports.Io.IoPortsRenderer portsRenderer, Mafi.Unity.UiStatic.Cursors.CursorManager cursorManager, Mafi.Unity.Ui.Controllers.PathFindingTransportPreview transportPreview, Mafi.Core.Prototypes.UnlockedProtosDb unlockedProtosDb, Mafi.Unity.InputControl.TerrainCursorVisual terrainCursorVisual, Mafi.Unity.Mine.TowerAreasRenderer towerAreasRenderer, Mafi.Core.UiState.LastSelectedTierTracker lastSelectedTierTracker) <0x6834a6c0 + 0x00000> 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.Set`1[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.resolveDependency (System.Type dependencyType, System.Boolean throwOnError, Mafi.Collections.Set`1[T] pendingResolves, System.Int32 recursionDepth) [0x000f5] at Mafi.DependencyResolver.instantiate (System.Type type, Mafi.Collections.Set`1[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: (Trains expansion 1.0.0), (Supporter edition 1.1.0), (All Excavators Bucket Capacity x5 0.1.4), (All Farms Output x10 0.1.1), (All Trucks Capacity x5 0.1.1), (Kayser's Automatic Terrain Designations 0.4.3), (Blueprint Products Info 1.0.0), (Industrial Expansion 1.0.4), (Pillar Spacing and Height Mod 1.0.1), (Cheat++ 1.2.6), (Gameplay++ 1.2.5), (Storage++ 1.1.2), (Tweaks++ 1.1.6) Failed mods: none ### Reproduction steps ERROR ### Game version and build number v0.8.5 b598 ### Operating system Windows
poltime poltime · 3 months ago

This crash is 100% caused by a conflict or an outdated version of one of your installed mods. The game (Captain of Industry, version 0.8.5) crashes during the UI initialization phase (TransportBuildController). This happens because a specific mod tries to modify conveyors, pipes, pillars, or transport logistics, but passes a null reference (NullReferenceException) that the game engine cannot process. Based on your mod list and the nature of the error (a crash inside the transport construction controller), the primary suspects are:
Pillar Spacing and Height Mod (1.0.1) — This directly modifies how conveyors and pipes are built (their height and spacing). If it is outdated for patch 0.8.5, it will trigger exactly this error.
Industrial Expansion (1.0.4) or the "" series mods (Tweaks, Gameplay++, Storage++) — These change recipes, buildings, or storage logic, which can cause the game to lose references to required game objects.

Captain Filip Captain Filip · 15 days ago

This error appeared with mods installed. If it still happens with all mods disabled, please open a new report here.

Closed as 🗑️ Won't fix

6 Showing 1–3 of 3