Xpazeman/tld-house-lights

System.NullReferenceException in 2.5

Closed this issue · 1 comments

While looking for why I am getting stuttering I added something from the modding server, to enable debug logs (I think). Anyways, this seems to be what is actually causing it. Happens every couple a ms.
Latest.log
Relevant log bit:

[14:17:44.749] During invoking native->managed trampoline
[14:17:44.749] Il2CppInterop.Runtime.Il2CppException: System.NullReferenceException: Object reference not set to an instance of an object.
--- BEGIN IL2CPP STACK TRACE ---
System.NullReferenceException: Object reference not set to an instance of an object.
  at PlayerManager.GetInteractiveObjectUnderCrosshairs (System.Single maxRange) [0x00000] in <00000000000000000000000000000000>:0 
--- END IL2CPP STACK TRACE ---

   at Il2CppInterop.Runtime.Il2CppException.RaiseExceptionIfNecessary(IntPtr returnedException) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Il2CppException.cs:line 36
   at Il2Cpp.PlayerManager.GetInteractiveObjectUnderCrosshairs(Single maxRange)
   at HouseLights.Patches.PlayerManage_UpdateHUDText.Postfix(PlayerManager __instance, Panel_HUD hud)
   at DMD<Il2Cpp.PlayerManager::UpdateHUDText>(PlayerManager this, Panel_HUD hud)
   at (il2cpp -> managed) UpdateHUDText(IntPtr , IntPtr , Il2CppMethodInfo* )

Error wasn't critical as it didn't prevent anything from working, but it's fixed in 2.5.2