Skip to content

[SmartPower] Game may crash in map editor due to SmartPower modules are not registered #138

@ihsoft

Description

@ihsoft

Reported via Steam Discussions: https://steamcommunity.com/workshop/filedetails/discussion/3305038022/4847651722853945789/?tscn=1771015078

Steps to reproduce

  1. Load a normal game that uses SmartPower.
  2. Exit to Main Menu.
  3. Start Map Editor.

Result

260213T205649.048 [EXCEPTION] [Bindito.Core.Internal.Container.GetInstance] BinditoException: No binding exists for type AutomationBehavior.
   at Bindito.Core.Internal.Container.GetInstance (System.Type type) (at <0190a2c803c649158b1d53d8292182ff>:0)
   at Bindito.Core.Internal.Container.GetInstance[T] () (at <0190a2c803c649158b1d53d8292182ff>:0)
   at IgorZ.Automation.AutomationSystem.Configurator.PatchMethod (Timberborn.BlueprintSystem.Blueprint blueprint, System.Collections.Generic.List`1[T] components) (at R:/TimberbornMods/Automation/AutomationSystem/Configurator.cs:29)
   at IgorZ.TimberDev.Utils.CustomizableInstantiator+BaseInstantiatorPatch.Postfix (Timberborn.BlueprintSystem.Blueprint blueprint, System.Collections.Generic.List`1[T] __result) (at R:/TimberbornMods/TimberDev/Utils/CustomizableInstantiator.cs:44)
   at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Timberborn.BaseComponentSystem.BaseInstantiator.InstantiateComponents_Patch2(Timberborn.BaseComponentSystem.BaseInstantiator,Timberborn.BlueprintSystem.Blueprint,Timberborn.BaseComponentSystem.BaseComponent,System.Collections.Immutable.ImmutableArray`1<System.Type>)
   at Timberborn.BaseComponentSystem.BaseInstantiator.InstantiateInactive (UnityEngine.GameObject prefab, UnityEngine.Transform parent, Timberborn.BlueprintSystem.Blueprint blueprint, System.Collections.Immutable.ImmutableArray`1[T] decoratedComponents, Timberborn.BaseComponentSystem.BaseComponent initializingComponent, System.Collections.Generic.List`1[System.Object]& instantiatedComponents) (at <6b79d803698b4ffea61ce05c07d38e72>:0)
   at Timberborn.TemplateInstantiation.TemplateInstantiator.Instantiate (Timberborn.BlueprintSystem.Blueprint blueprint, UnityEngine.Transform parent, Timberborn.BaseComponentSystem.BaseComponent initializingComponent) (at <b6f2340131604553a59ab7a780b2203b>:0)
   at Timberborn.BlockObjectTools.PreviewFactory.Create (Timberborn.BlockSystem.PlaceableBlockObjectSpec template) (at <c4da12ab3fc345de90df2c6ef9845764>:0)
   at Timberborn.BlockObjectTools.PreviewPlacerFactory.EagerlyCreateFirstPreview (Timberborn.BlockSystem.PlaceableBlockObjectSpec spec) (at <c4da12ab3fc345de90df2c6ef9845764>:0)
   at Timberborn.BlockObjectTools.PreviewPlacerFactory.Create (Timberborn.BlockSystem.PlaceableBlockObjectSpec placeableBlockObjectSpec) (at <c4da12ab3fc345de90df2c6ef9845764>:0)
   at Timberborn.BlockObjectTools.BlockObjectToolFactory.Create (Timberborn.BlockSystem.PlaceableBlockObjectSpec template, Timberborn.BlockObjectTools.IBlockObjectPlacer blockObjectPlacer, Timberborn.BlockObjectTools.IBlockObjectToolDescriber blockObjectToolDescriber) (at <c4da12ab3fc345de90df2c6ef9845764>:0)
   at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Timberborn.BlockObjectToolsUI.BlockObjectToolButtonFactory.CreateTool_Patch1(Timberborn.BlockObjectToolsUI.BlockObjectToolButtonFactory,Timberborn.BlockSystem.PlaceableBlockObjectSpec)
   at Timberborn.BlockObjectToolsUI.BlockObjectToolButtonFactory.Create (Timberborn.BlockSystem.PlaceableBlockObjectSpec template, UnityEngine.UIElements.VisualElement buttonParent) (at <287b1eee1d15473e8be0a98cae365ce3>:0)
   at ConfigurableToolGroups.UI.CustomBlockObjectProviders.CustomBlockObjectButtons.CreateToolGroup (ConfigurableToolGroups.Models.BlockObjectToolGroupInfo grp, ConfigurableToolGroups.UI.ModdableToolGroupButton parent) (at D:/Personal/Mods/Timberborn/TimberbornMods/ConfigurableToolGroups/UI/CustomBlockObjectProviders/CustomBlockObjectButtons.cs:55)
   at ConfigurableToolGroups.UI.CustomBlockObjectProviders.CustomBlockObjectButtons+<GetElements>d__10.MoveNext () (at D:/Personal/Mods/Timberborn/TimberbornMods/ConfigurableToolGroups/UI/CustomBlockObjectProviders/CustomBlockObjectButtons.cs:26)
   at ConfigurableToolGroups.Services.ModdableCustomToolButtonService.InitializeSection (Timberborn.BottomBarSystem.BottomBarPanel panel, ConfigurableToolGroups.Specs.RootElementLocation location) (at D:/Personal/Mods/Timberborn/TimberbornMods/ConfigurableToolGroups/Services/ModdableCustomToolButtonService.cs:84)
   at ConfigurableToolGroups.Patches.BottomBarPanelPatches.PatchSection (Timberborn.BottomBarSystem.BottomBarPanel instance, ConfigurableToolGroups.Specs.RootElementLocation location) (at D:/Personal/Mods/Timberborn/TimberbornMods/ConfigurableToolGroups/Patches/BottomBarPanelPatches.cs:23)
   at ConfigurableToolGroups.Patches.BottomBarPanelPatches.RearrangeMiddleSection (Timberborn.BottomBarSystem.BottomBarPanel __instance) (at D:/Personal/Mods/Timberborn/TimberbornMods/ConfigurableToolGroups/Patches/BottomBarPanelPatches.cs:11)
   at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Timberborn.BottomBarSystem.BottomBarPanel.InitializeMiddleSection_Patch1(Timberborn.BottomBarSystem.BottomBarPanel)
   at Timberborn.BottomBarSystem.BottomBarPanel.InitializeSections () (at <ccb57f3366f94364ac756ec4ee9edfc5>:0)
   at Timberborn.BottomBarSystem.BottomBarPanel.Load () (at <ccb57f3366f94364ac756ec4ee9edfc5>:0)
   at Timberborn.SingletonSystem.SingletonLifecycleService.LoadSingletons () (at <1aebdf0805f345549447828e2ab0b0ba>:0)
   at Timberborn.SingletonSystem.SingletonLifecycleService.LoadAll () (at <1aebdf0805f345549447828e2ab0b0ba>:0)
   at Timberborn.SingletonSystem.SingletonLifecycleUnityAdapter.Start () (at <1aebdf0805f345549447828e2ab0b0ba>:0)
260213T205649.063 [EXCEPTION] [Timberborn.WaterSystemRendering.WaterRenderer.Unload] NullReferenceException: Object reference not set to an instance of an object
   at Timberborn.WaterSystemRendering.WaterRenderer.Unload () (at <555ffc54f7934aae87b929b82749d889>:0)
   at Timberborn.SingletonSystem.SingletonLifecycleService.UnloadSingletons () (at <1aebdf0805f345549447828e2ab0b0ba>:0)
   at Timberborn.SingletonSystem.SingletonLifecycleService.UnloadAll () (at <1aebdf0805f345549447828e2ab0b0ba>:0)
   at Timberborn.SingletonSystem.SingletonLifecycleUnityAdapter.OnDestroy () (at <1aebdf0805f345549447828e2ab0b0ba>:0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions