Truinto / ONI-Modloader-SimpleMods

OxygenNotIncluded Mods
MIT License
16 stars 6 forks source link

CustomizeGeyser v1.0.23.1 crashes on game start #45

Closed scitor closed 9 months ago

scitor commented 9 months ago

Hi, since the update on v1.0.23.1 the game doesn't want to load the mod on start with the following log entry:

[12:24:30.789] [1] [INFO] Loading MOD dll: CustomizeGeyser.dll
[12:24:30.794] [1] [INFO] [CustomizeGeyser] Language file does not exist: C:\Users\scitor\Documents\Klei\OxygenNotIncluded\mods\Steam\1861107947\strings_en.pot
[12:24:30.796] [1] [INFO] Loading: C:\Users\scitor\Documents\Klei\OxygenNotIncluded\mods\CustomizeGeyser.json
[12:24:30.806] [1] [INFO] [PLib/CustomizeGeyser] Registered mod options class CustomizeGeyser.CustomizeGeyserState for CustomizeGeyser
...
[12:24:37.614] [1] [INFO] [CustomizeGeyser] Processing steam ...
[12:24:37.615] [1] [INFO] [CustomizeGeyser] Changed geyser with id: steam
[12:24:37.615] [1] [INFO] [CustomizeGeyser] Processing slimy_po2 ...
[12:24:37.615] [1] [INFO] [CustomizeGeyser] Changed geyser with id: slimy_po2
[12:24:37.615] [1] [INFO] [CustomizeGeyser] Processing molten_aluminum ...
[12:24:37.616] [1] [ERROR] GameAssets(Clone) Error in GameAssets(Clone).Assets.OnPrefabInit 
System.NullReferenceException: Object reference not set to an instance of an object
  at CustomizeGeyser.GeyserGenericConfig_GenerateConfigs.Postfix (System.Collections.Generic.List`1[GeyserGenericConfig+GeyserPrefabParams]& __result) [0x007f1] in <43d48ad7cfa8456ba5f8c421295c8861>:0 
  at (wrapper dynamic-method) GeyserGenericConfig.GeyserGenericConfig.GenerateConfigs_Patch1(GeyserGenericConfig)
  at (wrapper dynamic-method) GeyserGenericConfig.GeyserGenericConfig.CreatePrefabs_Patch1(GeyserGenericConfig)
  at EntityConfigManager.RegisterEntities (IMultiEntityConfig config) [0x00000] in <ad882e55d8ac49379773540ee16f428f>:0 
  at (wrapper dynamic-method) EntityConfigManager.EntityConfigManager.LoadGeneratedEntities_Patch1(EntityConfigManager,System.Collections.Generic.List`1<System.Type>)
  at LegacyModMain.LoadEntities (System.Collections.Generic.List`1[T] types) [0x00000] in <ad882e55d8ac49379773540ee16f428f>:0 
  at LegacyModMain.Load () [0x0004d] in <ad882e55d8ac49379773540ee16f428f>:0 
  at Assets.CreatePrefabs () [0x00055] in <ad882e55d8ac49379773540ee16f428f>:0 
  at (wrapper dynamic-method) Assets.Assets.OnPrefabInit_Patch1(Assets)
  at KMonoBehaviour.InitializeComponent () [0x00068] in <d2ff0ec32ae74bb091b2c7c87705ee3b>:0 
Error in GameAssets(Clone).Assets.OnPrefabInit 
System.NullReferenceException: Object reference not set to an instance of an object
  at CustomizeGeyser.GeyserGenericConfig_GenerateConfigs.Postfix (System.Collections.Generic.List`1[GeyserGenericConfig+GeyserPrefabParams]& __result) [0x007f1] in <43d48ad7cfa8456ba5f8c421295c8861>:0 
  at (wrapper dynamic-method) GeyserGenericConfig.GeyserGenericConfig.GenerateConfigs_Patch1(GeyserGenericConfig)
  at (wrapper dynamic-method) GeyserGenericConfig.GeyserGenericConfig.CreatePrefabs_Patch1(GeyserGenericConfig)
  at EntityConfigManager.RegisterEntities (IMultiEntityConfig config) [0x00000] in <ad882e55d8ac49379773540ee16f428f>:0 
  at (wrapper dynamic-method) EntityConfigManager.EntityConfigManager.LoadGeneratedEntities_Patch1(EntityConfigManager,System.Collections.Generic.List`1<System.Type>)
  at LegacyModMain.LoadEntities (System.Collections.Generic.List`1[T] types) [0x00000] in <ad882e55d8ac49379773540ee16f428f>:0 
  at LegacyModMain.Load () [0x0004d] in <ad882e55d8ac49379773540ee16f428f>:0 
  at Assets.CreatePrefabs () [0x00055] in <ad882e55d8ac49379773540ee16f428f>:0 
  at (wrapper dynamic-method) Assets.Assets.OnPrefabInit_Patch1(Assets)
  at KMonoBehaviour.InitializeComponent () [0x00068] in <d2ff0ec32ae74bb091b2c7c87705ee3b>:0 

attached is the CustomizeGeyser.json

replacing the mod with previous version (1.0.23.0) fixes the problem. btw, steam thinks thenewest is 1.0.24.0 but I couldn't find it there so I assume it's just desynced

Truinto commented 9 months ago

I forgot to increment the version number. v1.0.23.1 is the newest version. But I am not sure the update is at fault. All it does is make all vanilla geysers spawnable by setting a flag. My guess is that the config returns null for geyser, which should never happen. I think it does that for DLC reasons. Do you have Spaced Out?

Truinto commented 9 months ago

If you remove or rename the DLC geyser ids, it will work.

scitor commented 9 months ago

oh, yes I do have the DLC (disabled), I will try renaming the geysers

Truinto commented 9 months ago

I think I fixed this issue for good. I already fixed this once, but I just noticed that my log information would try access the empty geyser data (which crashes). Sorry I didn't notice. I am way to lazy to try everything twice (with and without dlc).

scitor commented 9 months ago

thanks a lot! haha no problem, all good! glad I could help find this one ;)