KosmosisDire / TeammateRevive

A simple Risk of Rain 2 mod that allows teammates to revive their fallen colleagues.
4 stars 9 forks source link

Mod is broken by patch 1.2.3 #40

Closed nathanpovo closed 2 years ago

nathanpovo commented 2 years ago

The most recent update (patch 1.2.3) has broken the mod.

To Reproduce

Steps to reproduce the behavior:

  1. Update to patch 1.2.3
  2. Open the game
  3. Check the available artifacts
  4. Start a new run

Current behavior

The mod's artifact is missing in the available artifacts image

The user is shown a black screen instead when starting a run

20220419191736_1

The game would sometimes work normally up until the user would try to exit the escape pod, at which point the game would freeze, and the user can only pause the game and go back to the main menu.

As soon as the user starts the run and exits the pod, the following exception keeps on getting written to the log file so many times that the game/computer starts lagging.

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
TeammateRevive.RunTracker.get_IsDeathCurseEnabled () (at <aeb998a1ba114dbfa5c12346a5ba4503>:0)
TeammateRevive.Skull.SkullLongRangeActivationManager.hook_Interactor_FindBestInteractableObject (On.RoR2.Interactor+orig_FindBestInteractableObject orig, RoR2.Interactor self, UnityEngine.Ray raycastRay, System.Single maxRaycastDistance, UnityEngine.Vector3 overlapposition, System.Single overlapradius) (at <aeb998a1ba114dbfa5c12346a5ba4503>:0)
DMD<>?-893309696.Hook<RoR2.Interactor::FindBestInteractableObject>?-720354816 (RoR2.Interactor , UnityEngine.Ray , System.Single , UnityEngine.Vector3 , System.Single ) (at <2199ddb2b3354fd497c55f03fe2da0a3>:0)
RoR2.InteractionDriver.FindBestInteractableObject () (at <7a5120bd69d843a8b8e90b8cce404663>:0)
RoR2.InteractionDriver.OnPreRenderOutlineHighlight (RoR2.OutlineHighlight outlineHighlight) (at <7a5120bd69d843a8b8e90b8cce404663>:0)
RoR2.OutlineHighlight.RenderHighlights (UnityEngine.RenderTexture rt) (at <7a5120bd69d843a8b8e90b8cce404663>:0)
RoR2.OutlineHighlight.OnRenderImage (UnityEngine.RenderTexture source, UnityEngine.RenderTexture destination) (at <7a5120bd69d843a8b8e90b8cce404663>:0)

Expected behavior

The mod's artifact should be visible in the available artifacts.

The game should run normally.

Additional context

Mods used: BepInEx version 5.4.1903 HookGenPatcher version 1.2.3 R2API version 4.3.5 TeammateRevival version 4.1.0

LogOutput.log

KosmosisDire commented 2 years ago

Thank you for the detailed report. I am currently still very busy with school. It's possible that I'll be able to find time to fix it this weekend. I won't be done with school until April 29th, so I can't give a guarantee of any changes until sometime around then. I'd be happy to take pull requests, but I can't say when the mod might actually be released onto Thunderstore.

I guess the screen is black because the error is happening inside the OnRenderImage() method, and since it's a NRE that should be hopefully easy to fix.

Not sure about the artifact though.

astreimb commented 2 years ago

Using the vrmod, I load in and everything seems normal, but as soon as the door opens a tiny bit it freezes on that frame and the game overall freaks out. Things seem to be happening still from what I could tell from mobs sounds.

MiniaczQ commented 2 years ago
[Error: Unity Log] MissingFieldException: Field 'RoR2.ItemDef.tier' not found.
Stack trace:
TeammateRevive.Content.DeathCurse.CreateDeathCurseHiddenItem () (at <5febaafb9c11497299aa3f70a0ec6b9c>:IL_000C)
TeammateRevive.Content.DeathCurse.Init () (at <5febaafb9c11497299aa3f70a0ec6b9c>:IL_000C)
TeammateRevive.ContentManager.LoadAddedContent () (at <5febaafb9c11497299aa3f70a0ec6b9c>:IL_009F)
TeammateRevive.ContentManager.Init () (at <5febaafb9c11497299aa3f70a0ec6b9c>:IL_001D)
TeammateRevive.MainTeammateRevival.Awake () (at <5febaafb9c11497299aa3f70a0ec6b9c>:IL_01B5)
UnityEngine.GameObject:AddComponent(Type)
BepInEx.Bootstrap.Chainloader:Start()
FlashWindow:.cctor()

This is the actual source of the problem. It stops execution and stuff never gets initialized, which leads to the NRE.

MiniaczQ commented 2 years ago

I'll PR a fix in a bit