peterhaneve / ONIMods

Peter Han's mods for Oxygen Not Included
Other
316 stars 64 forks source link

mod updater 2.4.0.0 crashes ONI on loading #178

Closed Cralis closed 2 years ago

Cralis commented 2 years ago

When I loaded ONI the game crashed on load. I disabled all of the mods and re-enabled the mod updater. It still crashed on load. I saw a suggestion on the workshop entry for the mod updater (by Romen) about loading it locally, so I found your github and downloaded the mod locally and enabled it. It still crashes on load.

I have testing build U41-496423-5 with Spaced Out! enabled.

Expected Behavior

I expect the game to load.

Current Behavior

Prior to loading the title screen the game crashes with the "blackhole ate my game" message.

Mod Versions

This is reproducible with both the workshop version 2.4.0.0 and the local version from github, also 2.4.0.0

Steps to Reproduce

  1. Either subscribe to Mod Updater through the steam workshop or load it locally from github using the instructions from here.
  2. Load ONI. Enable the Mod Updater mod.
  3. Reload ONI

Output Log

Player.log

Player log attached, which includes a null exception error message.

Cralis commented 2 years ago

I should also note that ONI shows the mod updater in red text in the mod interface, indicating that it is out of date. This is for both the steam version and for the locally installed version downloaded from this github.

peterhaneve commented 2 years ago

There is currently no support for mods on the Public Testing branch. This branch changes weekly, so crashes may occur until it goes live and stabilizes.

Cralis commented 2 years ago

Oh... I didn't realize that I was still on the public testing branch. This is the first time I've ever actually opened a log or looked for a game version for ONI. Give me a moment to change the version back and I will verify if it still gives me any problems (and I expect that it should not).

That was faster than I thought... only a 40MB download to change the version. Mod updater still shows as red "outdated" in the mod interface, but it appears to be working now that I'm on the correct game version.

Thank you sir.

Cralis commented 2 years ago

Sir, ONI just updated and this error is now on the main build. I'm running BUILD U41-496912-5 I now get a game crash on load with the following error message:

Exception while loading mod PeterHan.ModUpdateDate at C:/Users/Cralis/Documents/Klei/OxygenNotIncluded/mods/Steam/2018291283. HarmonyLib.HarmonyException: Patching exception in method System.Void KMod.Manager::Subscribe(KMod.Mod mod, System.Object caller) ---> System.TypeLoadException: Could not load type of field 'PeterHan.ModUpdateDate.ModUpdateDetails:DETAILS' (0) due to: Could not resolve type with token 0100005a (from typeref, class/assembly Steamworks.SteamUGCDetails_t, Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null) assembly:Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null type:Steamworks.SteamUGCDetails_t member:(null) signature: at (wrapper managed-to-native) System.RuntimeType.GetMethodsByName_native(System.RuntimeType,intptr,System.Reflection.BindingFlags,bool) at System.RuntimeType.GetMethodsByName (System.String name, System.Reflection.BindingFlags bindingAttr, System.Boolean ignoreCase, System.RuntimeType reflectedType) [0x0001b] in <695d1cc93cca45069c528c15c9fdd749>:0 at System.RuntimeType.GetMethodCandidates (System.String name, System.Reflection.BindingFlags bindingAttr, System.Reflection.CallingConventions callConv, System.Type[] types, System.Boolean allowPrefixLookup) [0x00010] in <695d1cc93cca45069c528c15c9fdd749>:0 at System.RuntimeType.GetMethodImpl (System.String name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConv, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0 at System.Type.GetMethod (System.String name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) [0x00043] in <695d1cc93cca45069c528c15c9fdd749>:0 at PeterHan.PLib.Core.PPatchTools.GetMethodSafe (System.Type type, System.String methodName, System.Boolean isStatic, System.Type[] arguments) [0x00035] in <033cf09f7dee479d9039e9348a756931>:0 at PeterHan.ModUpdateDate.ModUpdateDatePatches+Manager_Subscribe_Patch+d0.MoveNext () [0x00060] in <033cf09f7dee479d9039e9348a756931>:0 at System.Collections.Generic.List1[T]..ctor (System.Collections.Generic.IEnumerable1[T] collection) [0x00077] in <695d1cc93cca45069c528c15c9fdd749>:0 at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable1[T] source) [0x00018] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at HarmonyLib.CodeTranspiler.GetResult (System.Reflection.Emit.ILGenerator generator, System.Reflection.MethodBase method) [0x00051] in <2f5aaaa000594d07b9998f4cff1e9662>:0 at HarmonyLib.MethodBodyReader.FinalizeILCodes (HarmonyLib.Emitter emitter, System.Collections.Generic.List1[T] transpilers, System.Collections.Generic.List1[T] endLabels, System.Boolean& hasReturnCode) [0x0014a] in <2f5aaaa000594d07b9998f4cff1e9662>:0 at HarmonyLib.MethodCopier.Finalize (HarmonyLib.Emitter emitter, System.Collections.Generic.List1[T] endLabels, System.Boolean& hasReturnCode) [0x00000] in <2f5aaaa000594d07b9998f4cff1e9662>:0 at HarmonyLib.MethodPatcher.CreateReplacement (System.Collections.Generic.Dictionary2[System.Int32,HarmonyLib.CodeInstruction]& finalInstructions) [0x0021f] in <2f5aaaa000594d07b9998f4cff1e9662>:0 at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x00057] in <2f5aaaa000594d07b9998f4cff1e9662>:0 at HarmonyLib.PatchClassProcessor.ProcessPatchJob (HarmonyLib.PatchJobs1+Job[T] job) [0x000bb] in <2f5aaaa000594d07b9998f4cff1e9662>:0 --- End of inner exception stack trace --- at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x0010f] in <2f5aaaa000594d07b9998f4cff1e9662>:0 at HarmonyLib.PatchClassProcessor.Patch () [0x00082] in <2f5aaaa000594d07b9998f4cff1e9662>:0 at HarmonyLib.Harmony.b10_0 (System.Type type) [0x00007] in <2f5aaaa000594d07b9998f4cff1e9662>:0 at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable1[T] sequence, System.Action1[T] action) [0x00014] in <2f5aaaa000594d07b9998f4cff1e9662>:0 at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00006] in <2f5aaaa000594d07b9998f4cff1e9662>:0 at KMod.UserMod2.OnLoad (HarmonyLib.Harmony harmony) [0x00007] in <4cd05b941535495d9b1b2ae2f5d9649e>:0 at PeterHan.ModUpdateDate.ModUpdateDatePatches.OnLoad (HarmonyLib.Harmony harmony) [0x00044] in <033cf09f7dee479d9039e9348a756931>:0 at KMod.DLLLoader.LoadDLLs (KMod.Mod ownerMod, System.String harmonyId, System.String path, System.Boolean isDev) [0x00222] in <4cd05b941535495d9b1b2ae2f5d9649e>:0

at UnityEngine.Debug.LogError (System.Object message, UnityEngine.Object context) [0x00000] in <9fe2cbebfa394c8da6af069ec8cc9ef4>:0 at Debug.LogError (System.Object obj, UnityEngine.Object context) [0x00000] in <53ba8544b0394db88dcaac034e1fe553>:0 at DebugUtil.LogErrorArgs (UnityEngine.Object context, System.Object[] objs) [0x00000] in <53ba8544b0394db88dcaac034e1fe553>:0 at DebugUtil.LogException (UnityEngine.Object context, System.String errorMessage, System.Exception e) [0x00000] in <53ba8544b0394db88dcaac034e1fe553>:0 at KMod.DLLLoader.LoadDLLs (KMod.Mod ownerMod, System.String harmonyId, System.String path, System.Boolean isDev) [0x00000] in <4cd05b941535495d9b1b2ae2f5d9649e>:0 at KMod.Mod.Load (KMod.Content content) [0x00000] in <4cd05b941535495d9b1b2ae2f5d9649e>:0 at KMod.Manager.Load (KMod.Content content) [0x00000] in <4cd05b941535495d9b1b2ae2f5d9649e>:0 at Global.Awake () [0x00000] in <4cd05b941535495d9b1b2ae2f5d9649e>:0 at UnityEngine.Object.Internal_InstantiateSingleWithParent_Injected (UnityEngine.Object data, UnityEngine.Transform parent, UnityEngine.Vector3& pos, UnityEngine.Quaternion& rot) [0x00000] in <9fe2cbebfa394c8da6af069ec8cc9ef4>:0 at UnityEngine.Object.Internal_InstantiateSingleWithParent (UnityEngine.Object data, UnityEngine.Transform parent, UnityEngine.Vector3 pos, UnityEngine.Quaternion rot) [0x00000] in <9fe2cbebfa394c8da6af069ec8cc9ef4>:0 at UnityEngine.Object.Instantiate (UnityEngine.Object original, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation, UnityEngine.Transform parent) [0x00000] in <9fe2cbebfa394c8da6af069ec8cc9ef4>:0 at UnityEngine.Object.Instantiate[T] (T original, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation, UnityEngine.Transform parent) [0x00000] in <9fe2cbebfa394c8da6af069ec8cc9ef4>: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 <53ba8544b0394db88dcaac034e1fe553>:0 at Util.KInstantiate (UnityEngine.GameObject original, UnityEngine.GameObject parent, System.String name) [0x00000] in <53ba8544b0394db88dcaac034e1fe553>:0 at LaunchInitializer.Update () [0x00000] in <4cd05b941535495d9b1b2ae2f5d9649e>:0 Build: U41-496912-S

peterhaneve commented 2 years ago

Steam has unfortunately failed to update Mod Updater itself (the latest version is 2.5 which fixes this issue and several others). The only fix to this chicken and egg problem is to install a local copy and use it to force update the Steam copy, then disable the local copy and switch back.