bbradson / Performance-Fish

Performance Mod for RimWorld
Mozilla Public License 2.0
423 stars 34 forks source link

Mod completely broken? Blackscreen on startup. #55

Closed Rakaesa closed 4 days ago

Rakaesa commented 4 days ago

Is this mod just completely busted atm? I get a black screen with no other mods enabled other than this & the required mods (Prepatcher, Harmony, Fishery.) Log is just filled with exceptions.

Root level exception in OnGUI(): System.NullReferenceException: Object reference not set to an instance of an object at Verse.DebugWindowsOpener.DevToolStarterOnGUI () [0x0006e] in :0 at Verse.UIRoot.UIRootOnGUI () [0x0003b] in :0 at Verse.UIRoot_Entry.UIRootOnGUI () [0x00000] in :0 at Verse.Root.OnGUI () [0x0003d] in :0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Root level exception in OnGUI(): System.NullReferenceException: Object reference not set to an instance of an object at Verse.DebugWindowsOpener.DevToolStarterOnGUI () [0x0006e] in :0 at Verse.UIRoot.UIRootOnGUI () [0x0003b] in :0 at Verse.UIRoot_Entry.UIRootOnGUI () [0x00000] in :0 at Verse.Root.OnGUI () [0x0003d] in :0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Reached max messages limit. Stopping logging to avoid spam. (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Root level exception in Update(): System.NullReferenceException: Object reference not set to an instance of an object at Verse.ScreenshotTaker.Update () [0x00008] in :0 at Verse.UIRoot.UIRootUpdate () [0x00000] in :0 at Verse.UIRoot_Entry.UIRootUpdate () [0x00000] in :0 at Verse.Root.Update () [0x0004e] in :0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Rakaesa commented 4 days ago

Extra info: I'm on Windows 10, game runs fine when I disable this mod.

bbradson commented 4 days ago

That's not a full log and doesn't mention anything related to the mod. It works on my end and obviously for most users. You probably installed or downloaded something incorrectly. Use the green code button to download, don't delete any files, either restart the game after enabling mods or use a mod manager like rimpy/rimsort. The pre-game mod manager included in prepatcher doesn't correctly activate without another game restart

Rakaesa commented 4 days ago

That's not a full log and doesn't mention anything related to the mod. It works on my end and obviously for most users. You probably installed or downloaded something incorrectly. Use the green code button to download, don't delete any files, either restart the game after enabling mods or use a mod manager like rimpy/rimsort. The pre-game mod manager included in prepatcher doesn't correctly activate without another game restart

I'm quite familiar with installing mods from Git, I'm a software engineer. I've also modded my rimworld extensively after 2k+ hours and have ran over 1,000 mods at a time before. I'm also using Rimpy right now.

image

These are the mods currently installed. I deleted no files, placed the folders for this mod & Fishery in the Mods folder correctly. Please don't assume that someone is incompetent when they report your mod isn't working for them. Just checked the logs again and found Performance Fish's stacktrace.

System.NullReferenceException: Object reference not set to an instance of an object at System.MonoCustomAttrs.GetCustomAttributes (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inherit) <0x6f7d2830 + 0x00000> in :0 at System.Reflection.MonoMethod.GetCustomAttributes (System.Type attributeType, System.Boolean inherit) [0x00000] in :0 at Verse.GenAttribute.TryGetAttribute[T] (System.Reflection.MemberInfo memberInfo, T& customAttribute) [0x00000] in :0 at Verse.GenAttribute.HasAttribute[T] (System.Reflection.MemberInfo memberInfo) [0x00000] in :0 at PerformanceFish.Patching.FishPatch+<>c.b75_0 (System.Reflection.MethodInfo m) [0x00000] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Utility.ReflectionExtensions.TryGetMethod (System.Type type, System.String nameCaseInsensitive, System.Predicate1[T] predicate) [0x0003f] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Patching.FishPatch.TryGetMethod (System.String nameCaseInsensitive, System.Predicate1[T] predicate) [0x00006] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Patching.FishPatch.get_PrefixMethodInfo () [0x00000] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Patching.FishPatch.TryPatch () [0x0008a] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Patching.FishPatchHolder.PatchAll () [0x0001e] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.OnAssembliesLoaded+<>c.b4_0 (PerformanceFish.Patching.IHasFishPatch patchClass) [0x0000e] in <66cfa82fbdc943bd9afc22f2027e1965>:0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

EDIT: I also reinstalled Rimworld & validated it for good measure.

Rakaesa commented 4 days ago

Performance Fish encountered an exception while trying to initialize MiscOptimizations: System.NullReferenceException: Object reference not set to an instance of an object at System.MonoCustomAttrs.GetCustomAttributes (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inherit) <0x6f7d2830 + 0x00000> in :0 at System.Reflection.MonoMethod.GetCustomAttributes (System.Type attributeType, System.Boolean inherit) [0x00000] in :0 at Verse.GenAttribute.TryGetAttribute[T] (System.Reflection.MemberInfo memberInfo, T& customAttribute) [0x00000] in :0 at Verse.GenAttribute.HasAttribute[T] (System.Reflection.MemberInfo memberInfo) [0x00000] in :0 at PerformanceFish.Patching.FishPatch+<>c.b75_0 (System.Reflection.MethodInfo m) [0x00000] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Utility.ReflectionExtensions.TryGetMethod (System.Type type, System.String nameCaseInsensitive, System.Predicate1[T] predicate) [0x0003f] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Patching.FishPatch.TryGetMethod (System.String nameCaseInsensitive, System.Predicate1[T] predicate) [0x00006] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Patching.FishPatch.get_PrefixMethodInfo () [0x00000] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Patching.FishPatch.TryPatch () [0x0008a] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Patching.FishPatchHolder.PatchAll () [0x0001e] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.OnAssembliesLoaded+<>c.b4_0 (PerformanceFish.Patching.IHasFishPatch patchClass) [0x0000e] in <66cfa82fbdc943bd9afc22f2027e1965>:0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Performance Fish encountered an exception while trying to initialize RoomOptimizations: System.NullReferenceException: Object reference not set to an instance of an object at System.MonoCustomAttrs.GetCustomAttributes (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inherit) <0x6f7d2830 + 0x00000> in :0 at System.Reflection.MonoMethod.GetCustomAttributes (System.Type attributeType, System.Boolean inherit) [0x00000] in :0 at Verse.GenAttribute.TryGetAttribute[T] (System.Reflection.MemberInfo memberInfo, T& customAttribute) [0x00000] in :0 at Verse.GenAttribute.HasAttribute[T] (System.Reflection.MemberInfo memberInfo) [0x00000] in :0 at PerformanceFish.Patching.FishPatch+<>c.b75_0 (System.Reflection.MethodInfo m) [0x00000] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Utility.ReflectionExtensions.TryGetMethod (System.Type type, System.String nameCaseInsensitive, System.Predicate1[T] predicate) [0x0003f] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Patching.FishPatch.TryGetMethod (System.String nameCaseInsensitive, System.Predicate1[T] predicate) [0x00006] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Patching.FishPatch.get_PrefixMethodInfo () [0x00000] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Patching.FishPatch.TryPatch () [0x0008a] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Patching.FishPatchHolder.PatchAll () [0x0001e] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.OnAssembliesLoaded+<>c.b4_0 (PerformanceFish.Patching.IHasFishPatch patchClass) [0x0000e] in <66cfa82fbdc943bd9afc22f2027e1965>:0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Error while instantiating a mod of type Prepatcher.PrepatcherMod: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object at System.MonoCustomAttrs.GetCustomAttributes (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inherit) <0x6f7d2830 + 0x00000> in :0 at System.MonoCustomAttrs.GetCustomAttributes (System.Reflection.ICustomAttributeProvider obj, System.Boolean inherit) [0x00024] in :0 at System.Reflection.MonoMethod.GetCustomAttributes (System.Boolean inherit) [0x00000] in :0 at HarmonyLib.HarmonyMethodExtensions.GetFromMethod (System.Reflection.MethodBase method) [0x00000] in :0 at HarmonyLib.HarmonyMethod.ImportMethod (System.Reflection.MethodInfo theMethod) [0x0000f] in :0 at HarmonyLib.HarmonyMethod..ctor (System.Type methodType, System.String methodName, System.Type[] argumentTypes) [0x00078] in :0 at Prepatcher.HarmonyPatches.PatchModLoading () [0x00023] in :0 at Prepatcher.PrepatcherMod..ctor (Verse.ModContentPack content) [0x0000c] in :0 at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&) at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in :0 --- End of inner exception stack trace --- at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00014] in :0 at System.Reflection.MonoCMethod.DoInvoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0007a] in :0 at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0 at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) [0x00213] in :0 at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00095] in :0 at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in :0 at Verse.LoadedModManager.CreateModClasses () [0x0007e] in :0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

bbradson commented 4 days ago

Error while instantiating a mod of type Prepatcher.PrepatcherMod is an error thrown while initializing Prepatcher, Performance Fish's dependency. The attribute null references imply the API assemblies containing those relevant attributes missing. I'd imagine that would've been caused by steam having failed to download prepatcher files for one reason or another.

bbradson commented 4 days ago

In any case, that is still not a log and does not reveal anything unique about your setup. If it were a bug in Fish it'd have to be caused by some kind of edge case you managed to run into. Whether you're a software engineer or not is of no relevance when starting a bug report with Mod completely broken? and then only providing fully generic root level exceptions for rimworld's core GUI method

Rakaesa commented 4 days ago

In any case, that is still not a log and does not reveal anything unique about your setup. If it were a bug in Fish it'd have to be caused by some kind of edge case you managed to run into. Whether you're a software engineer or not is of no relevance when starting a bug report with Mod completely broken? and then only providing fully generic root level exceptions for rimworld's core GUI method

Went and downloaded Prepatcher from the git instead (https://github.com/Zetrith/Prepatcher). Issue persists. As far as I can tell from the exceptions, the issues isn't with Prepatcher, Prepatcher is just interpreting the issue that Performance Fish is having. The first exception thrown is a NullReferenceException thrown by: PerformanceFish.Patching.FishPatch+<>c.b75_0 (System.Reflection.MethodInfo m) [0x00000] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Utility.ReflectionExtensions.TryGetMethod (System.Type type, System.String nameCaseInsensitive, System.Predicate1[T] predicate) [0x0003f] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Patching.FishPatch.TryGetMethod (System.String nameCaseInsensitive, System.Predicate1[T] predicate) [0x00006] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Patching.FishPatch.get_PrefixMethodInfo () [0x00000] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Patching.FishPatch.TryPatch () [0x0008a] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.Patching.FishPatchHolder.PatchAll () [0x0001e] in <66cfa82fbdc943bd9afc22f2027e1965>:0 at PerformanceFish.OnAssembliesLoaded+<>c.b4_0 (PerformanceFish.Patching.IHasFishPatch patchClass) [0x0000e] in <66cfa82fbdc943bd9afc22f2027e1965>:0

Full fresh log attached.

Player.log

bbradson commented 3 days ago

Unfortunately, Performance Fish appears to be incompatible with your highly unique hardware and software configuration then. The exception thrown references constant values and implies those values being null instead of what they should be by C# language spec. This is never the case on my hardware, it is never the case on most user's hardware to my knowledge, it should be entirely impossible to get into that situation in a correctly functioning runtime with all dependencies loaded. It may caused by incompatible on screen display, remote desktop, recording, calibration or other kind of driver software.