psyko-gh / psyko-oni-mods

2 stars 7 forks source link

"Momentary Switch" crashes with new October 2023 Update #12

Closed Sgt-Nukem closed 1 year ago

Sgt-Nukem commented 1 year ago

Momentary Switch crashes with new October 2023 Update:

Exception in RegisterBuilding for type Psyko.MomentarySwitch.MomentarySwitchConfig from MomentarySwitch 
System.NullReferenceException: Object reference not set to an instance of an object
  at Psyko.MomentarySwitch.MomentarySwitchConfig.ConfigureBuildingTemplate (UnityEngine.GameObject go, Tag prefab_tag) [0x00018] in <fc8969fd9653461b86561536e22bcef4>:0 
  at BuildingConfigManager.RegisterBuilding (IBuildingConfig config) [0x0009d] in <8962180363a94bf7bd897569e6298675>:0 
  at (wrapper dynamic-method) GeneratedBuildings.GeneratedBuildings.LoadGeneratedBuildings_Patch17(System.Collections.Generic.List`1<System.Type>)

  at UnityEngine.Debug.LogError (System.Object message, UnityEngine.Object context) [0x00000] in <72b60a3dd8cd4f12a155b761a1af9144>:0 
  at Debug.LogError (System.Object obj, UnityEngine.Object context) [0x00000] in <d9d260db23eb4b5ea9674097f27ddfad>:0 
  at DebugUtil.LogErrorArgs (UnityEngine.Object context, System.Object[] objs) [0x00000] in <d9d260db23eb4b5ea9674097f27ddfad>:0 
  at DebugUtil.LogException (UnityEngine.Object context, System.String errorMessage, System.Exception e) [0x00000] in <d9d260db23eb4b5ea9674097f27ddfad>:0 
  at GeneratedBuildings.GeneratedBuildings.LoadGeneratedBuildings_Patch17 (System.Collections.Generic.List`1[T] ) [0x00000] in <8962180363a94bf7bd897569e6298675>:0 
  at LegacyModMain.LoadBuildings (System.Collections.Generic.List`1[T] types) [0x00000] in <8962180363a94bf7bd897569e6298675>:0 
  at LegacyModMain.Load () [0x00000] in <8962180363a94bf7bd897569e6298675>:0 
  at Assets.CreatePrefabs () [0x00000] in <8962180363a94bf7bd897569e6298675>:0 
  at Assets.Assets.OnPrefabInit_Patch1 (Assets ) [0x00000] in <8962180363a94bf7bd897569e6298675>:0 
  at KMonoBehaviour.InitializeComponent () [0x00000] in <d9d260db23eb4b5ea9674097f27ddfad>:0 
  at KMonoBehaviour.Awake () [0x00000] in <d9d260db23eb4b5ea9674097f27ddfad>:0 
  at UnityEngine.Object.Internal_InstantiateSingleWithParent_Injected (UnityEngine.Object data, UnityEngine.Transform parent, UnityEngine.Vector3& pos, UnityEngine.Quaternion& rot) [0x00000] in <72b60a3dd8cd4f12a155b761a1af9144>:0 
  at UnityEngine.Object.Internal_InstantiateSingleWithParent (UnityEngine.Object data, UnityEngine.Transform parent, UnityEngine.Vector3 pos, UnityEngine.Quaternion rot) [0x00000] in <72b60a3dd8cd4f12a155b761a1af9144>:0 
  at UnityEngine.Object.Instantiate (UnityEngine.Object original, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation, UnityEngine.Transform parent) [0x00000] in <72b60a3dd8cd4f12a155b761a1af9144>:0 
  at UnityEngine.Object.Instantiate[T] (T original, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation, UnityEngine.Transform parent) [0x00000] in <72b60a3dd8cd4f12a155b761a1af9144>:0 
  at Util.KInstantiate (UnityEngine.GameObject original, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation, UnityEngine.GameObject parent, System.String name, System.Boolean initialize_id, System.Int32 gameLayer) [0x00000] in <d9d260db23eb4b5ea9674097f27ddfad>:0 
  at Util.KInstantiate (UnityEngine.GameObject original, UnityEngine.GameObject parent, System.String name) [0x00000] in <d9d260db23eb4b5ea9674097f27ddfad>:0 
  at LaunchInitializer.Update () [0x00000] in <8962180363a94bf7bd897569e6298675>:0 
Build: U49-575720-V
psyko-gh commented 1 year ago

I will take a look at that whenever possible

psyko-gh commented 1 year ago

Fixed in 1.0.4