Timberborn-Modding-Central / TimberAPI

The one and only
https://timberapi.com
GNU Lesser General Public License v2.1
33 stars 17 forks source link

BuildingSpecification crash on v0.5.5.0 #94

Closed kamigari84 closed 8 months ago

kamigari84 commented 9 months ago

I have a few BuildingSpecificaton files changing the recipes on some buildings (from WaterBeaverFaction). From today's experimental update they cause the game to crash (on InGame it seems, not on the main menu anyways) I am attaching the BuilingSpecification & RecipeSpecification file in question (just in case) BuildingSpecification.ZauerKrautBarrel.replace.json BuildingSpecification.FermentationBarrel.json RecipeSpecification.KimchiSpecialLarge.original.json FactionSpecification.waterbeavers.original.json RecipeSpecification.KimchiStarter.original.json RecipeSpecification.KimchiSpecialLargeEX.original.json RecipeSpecification.KimchiSpecial.original.json GoodSpecification.KimchiStarter.original.json

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
Timberborn.Workshops.ManufactoryInventoryInitializer.ProcessRecipe (Timberborn.Goods.RecipeSpecification productionRecipe, System.Collections.Generic.Dictionary`2[TKey,TValue] goods) (at <66f81548ce2244afa47b9ccc05e0ed4c>:0)
Timberborn.Workshops.ManufactoryInventoryInitializer.Initialize (Timberborn.Workshops.Manufactory subject, Timberborn.InventorySystem.Inventory decorator) (at <66f81548ce2244afa47b9ccc05e0ed4c>:0)
Timberborn.TemplateSystem.TemplateModule+Builder+<>c__DisplayClass3_0`2[TSubject,TDecorator].<AddDedicatedDecorator>b__0 (System.Object subject, System.Object decorator) (at <44dc5fab55b543b0985414d3ec2d51d1>:0)
Timberborn.TemplateSystem.TemplateInstantiator.Instantiate (UnityEngine.GameObject template, UnityEngine.Transform parent) (at <44dc5fab55b543b0985414d3ec2d51d1>:0)
Timberborn.PreviewSystem.PreviewFactory.Create (Timberborn.BlockSystem.PlaceableBlockObject prefab) (at <7c865ef3c0574760858f11eb800dd1de>:0)
Timberborn.PreviewSystem.PreviewPlacerFactory.CreatePreviews (Timberborn.BlockSystem.PlaceableBlockObject prefab, System.Int32 amount) (at <7c865ef3c0574760858f11eb800dd1de>:0)
Timberborn.PreviewSystem.PreviewPlacerFactory.Create (Timberborn.BlockSystem.PlaceableBlockObject placeableBlockObject) (at <7c865ef3c0574760858f11eb800dd1de>:0)
Timberborn.BlockObjectTools.BlockObjectTool.Initialize (Timberborn.BlockSystem.PlaceableBlockObject prefab) (at <42ff6d869ae74826a2957c3e9b3d25e7>:0)
Timberborn.BlockObjectTools.BlockObjectTool.Initialize (Timberborn.BlockSystem.PlaceableBlockObject prefab, Timberborn.ToolSystem.ToolGroup toolGroup) (at <42ff6d869ae74826a2957c3e9b3d25e7>:0)
TimberApi.ToolSystem.Tools.PlaceableObject.PlaceableObjectToolFactory.CreateTool (TimberApi.ToolSystem.ToolSpecification toolSpecification, TimberApi.ToolSystem.Tools.PlaceableObject.PlaceableObjectToolToolInformation toolInformation, Timberborn.ToolSystem.ToolGroup toolGroup) (at <f7cc79b5c538413f94884f158b136fa0>:0)
TimberApi.ToolSystem.BaseToolFactory`1[T].Create (TimberApi.ToolSystem.ToolSpecification toolSpecification, Timberborn.ToolSystem.ToolGroup toolGroup) (at <f7cc79b5c538413f94884f158b136fa0>:0)
TimberApi.ToolSystem.ToolService.LateLoad () (at <f7cc79b5c538413f94884f158b136fa0>:0)
TimberApi.Core.SingletonSystem.SingletonSystemPatcher+<>c.<LoadSingletonsPostfix>b__5_0 (TimberApi.Common.SingletonSystem.ILateLoadableSingleton singleton) (at <2ab3f3caeff947c285d1fdc0fe76c790>:0)
TimberApi.Core.SingletonSystem.SingletonSystemPatcher.LoadSingleton[T] (System.Collections.Generic.IEnumerable`1[T] singletons, System.Action`1[T] action) (at <2ab3f3caeff947c285d1fdc0fe76c790>:0)
TimberApi.Core.SingletonSystem.SingletonSystemPatcher.LoadSingletonsPostfix (Timberborn.SingletonSystem.ISingletonRepository ____singletonRepository) (at <2ab3f3caeff947c285d1fdc0fe76c790>:0)
(wrapper dynamic-method) Timberborn.SingletonSystem.SingletonLifecycleService.DMD<Timberborn.SingletonSystem.SingletonLifecycleService::LoadSingletons>(Timberborn.SingletonSystem.SingletonLifecycleService)
(wrapper dynamic-method) Timberborn.SingletonSystem.SingletonLifecycleService.DMD<Timberborn.SingletonSystem.SingletonLifecycleService::LoadAll>(Timberborn.SingletonSystem.SingletonLifecycleService)
Timberborn.SingletonSystem.SingletonLifecycleAdapter.Start () (at <6e8a35ad066f451bb3cd3d1cd0ec7b12>:0)

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
Timberborn.CoreUI.PanelStack.Awake () (at <9b0deefab6b34f8c935fb50491cb595a>:0)

[Info   : TimberAPI] Loaded 1375 custom labels
[Info   : Unity Log] Creating an error report: C:\users\valerio\Documents\Timberborn\Error reports\error-report-2023-12-14-23h24m32s.zip
[Info   : Unity Log] Load time: 49206ms
[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object.
Stack trace:
UnityEngine.Component.get_gameObject () (at <fe5da7bf138e4fe086b7b29cbdb30e52>:0)
Timberborn.GameSound.GameMusicPlayer.PlaySound (System.String soundName, System.Action callback, System.Nullable`1[T] delay) (at <ba782915f6c243e7a3f6c2de154feacd>:0)
Timberborn.GameSound.GameMusicPlayer.StartStandardMusic () (at <ba782915f6c243e7a3f6c2de154feacd>:0)
Timberborn.GameSound.GameMusicPlayer.OnSceneLoaded (System.Object sender, System.EventArgs e) (at <ba782915f6c243e7a3f6c2de154feacd>:0)
Timberborn.SceneLoading.SceneLoader+<LoadSceneCoroutine>d__15.MoveNext () (at <9e03211a1e22472da1c0dee282848fc2>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <fe5da7bf138e4fe086b7b29cbdb30e52>:0)

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object.
Stack trace:
UnityEngine.Component.get_gameObject () (at <fe5da7bf138e4fe086b7b29cbdb30e52>:0)
Timberborn.GameSound.GameMusicPlayer.PlaySound (System.String soundName, System.Action callback, System.Nullable`1[T] delay) (at <ba782915f6c243e7a3f6c2de154feacd>:0)
Timberborn.GameSound.GameMusicPlayer.StartStandardMusic () (at <ba782915f6c243e7a3f6c2de154feacd>:0)
Timberborn.GameSound.GameMusicPlayer.OnSceneLoaded (System.Object sender, System.EventArgs e) (at <ba782915f6c243e7a3f6c2de154feacd>:0)
Timberborn.SceneLoading.SceneLoader+<LoadSceneCoroutine>d__15.MoveNext () (at <9e03211a1e22472da1c0dee282848fc2>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <fe5da7bf138e4fe086b7b29cbdb30e52>:0)

Thank you

kamigari84 commented 8 months ago

Whelp, looks like it wasn't anything to do with TAPI - since SketchGearHouse (https://mod.io/g/timberborn/m/sketch-gear-house), which also adds a recipe onto a building using TAPI, still works after all this time (with no updates over the last year or so)