Xpazeman / tld-house-lights

Mod for The Long Dark that magically brings electricity back. You can turn lights on and off by using the light switches.
MIT License
7 stars 3 forks source link

System.NullReferenceException in 2.5 #8

Closed Arkhorse closed 1 year ago

Arkhorse commented 1 year ago

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* )
Xpazeman commented 1 year ago

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