Zaggy1024 / LC_OpenBodyCams

An open-source mod for Lethal Company to add a body/head camera that is displayed on the bottom right monitor in the ship, with the goal of appearing almost identical to the player's actual perspective while providing good performance.
https://thunderstore.io/c/lethal-company/p/Zaggy1024/OpenBodyCams/
MIT License
8 stars 0 forks source link

Game crash with v1.0.12 #5

Closed ManGuyNY closed 5 months ago

ManGuyNY commented 5 months ago

I had died and was spectating a friend who had just entered & started the ship when the game froze. Spammed these errors in console before it went down. Had been playing for maybe an hour on various maps. I was the host. Didn't have any issues yesterday on v1.0.11. Mods used: 018d44f7-f4a7-14f3-ce41-dfd07b0b142e

[Error  : Unity Log] NullReferenceException
Stack trace:
UnityEngine.Component.CompareTag (System.String tag) (at <e27997765c1848b09d8073e5d642717a>:IL_0001)
EnemyAI.EnableEnemyMesh (System.Boolean enable, System.Boolean overrideDoNotSet) (at <af9b1eec498a45aebd42601d6ab85015>:IL_004C)
StartOfRound.SetPlayerSafeInShip () (at <af9b1eec498a45aebd42601d6ab85015>:IL_008B)
(wrapper dynamic-method) AudioReverbTrigger.DMD<AudioReverbTrigger::ChangeAudioReverbForPlayer>(AudioReverbTrigger,GameNetcodeStuff.PlayerControllerB)
AudioReverbTrigger.OnTriggerStay (UnityEngine.Collider other) (at <af9b1eec498a45aebd42601d6ab85015>:IL_018B)

[Error  : Unity Log] NullReferenceException
Stack trace:
OpenBodyCams.BodyCamComponent.BeginCameraRendering (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera renderedCamera) (at <a58f910467f94917b6f0fafb7dc9e7a1>:IL_002F)
UnityEngine.Rendering.RenderPipelineManager.BeginCameraRendering (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera camera) (at <e27997765c1848b09d8073e5d642717a>:IL_000A)
UnityEngine.Rendering.RenderPipeline.BeginCameraRendering (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera camera) (at <e27997765c1848b09d8073e5d642717a>:IL_0001)
UnityEngine.Rendering.HighDefinition.HDRenderPipeline.TryCull (UnityEngine.Camera camera, UnityEngine.Rendering.HighDefinition.HDCamera hdCamera, UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Rendering.HighDefinition.SkyManager skyManager, UnityEngine.Rendering.ScriptableCullingParameters cullingParams, UnityEngine.Rendering.HighDefinition.HDRenderPipelineAsset hdrp, UnityEngine.Rendering.HighDefinition.HDRenderPipeline+HDCullingResults& cullingResults) (at <b8abf62aeac646cea5c5cde032ff9314>:IL_005D)
UnityEngine.Rendering.HighDefinition.HDRenderPipeline.PrepareAndCullCamera (UnityEngine.Camera camera, UnityEngine.Experimental.Rendering.XRPass xrPass, System.Boolean cameraRequestedDynamicRes, System.Collections.Generic.List`1[T] renderRequests, UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Rendering.HighDefinition.HDRenderPipeline+RenderRequest& renderRequest, UnityEngine.CubemapFace cubemapFace) (at <b8abf62aeac646cea5c5cde032ff9314>:IL_0104)
UnityEngine.Rendering.HighDefinition.HDRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List`1[T] cameras) (at <b8abf62aeac646cea5c5cde032ff9314>:IL_02B9)
UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List`1[T] cameras) (at <e27997765c1848b09d8073e5d642717a>:IL_001C)
UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, UnityEngine.Object renderRequest) (at <e27997765c1848b09d8073e5d642717a>:IL_0046)

[Warning: Unity Log] Render Pipeline error : the XR layout still contains active passes. Executing XRSystem.EndLayout() right now.
Zaggy1024 commented 5 months ago

What was your cause of death before you started spectating? i.e. did you have a corpse, or was a mimic of you walking around? Also, was the body cam watching you or your friend?

ManGuyNY commented 5 months ago

I had been killed by a mimic and my friend had just finished killing my masked corpse. Not sure which one of us the monitor was set to before it crashed.

Zaggy1024 commented 5 months ago

I wasn't able to reproduce this, but I have a theory that perhaps this is caused by some mod deleting part of the masked enemy's model. Someone reported the same issue on Discord, saying that they had MaskTheDead and MaskedEnemyOverhaul, do you have either of those?

I did try reproducing with those installed as well, but it seems like this issue might be a rare one unfortunately.

Zaggy1024 commented 5 months ago

Leaving these logs from Discord here for when I get the chance to take a good look at this.

[Error  : Unity Log] NullReferenceException
Stack trace:
UnityEngine.Component.CompareTag (System.String tag) (at <e27997765c1848b09d8073e5d642717a>:IL_0001)
EnemyAI.EnableEnemyMesh (System.Boolean enable, System.Boolean overrideDoNotSet) (at <af9b1eec498a45aebd42601d6ab85015>:IL_004C)
MaskedPlayerEnemy.SetVisibilityOfMaskedEnemy () (at <af9b1eec498a45aebd42601d6ab85015>:IL_00C5)
(wrapper dynamic-method) MaskedPlayerEnemy.DMD<MaskedPlayerEnemy::Update>(MaskedPlayerEnemy)
[Warning: Unity Log] Render Pipeline error : the XR layout still contains active passes. Executing XRSystem.EndLayout() right now.
[Error  : Unity Log] NullReferenceException
Stack trace:
OpenBodyCams.BodyCamComponent.BeginCameraRendering (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera renderedCamera) (at <8c0e3d1d0cbc40d4afe043dc7fb68933>:IL_002F)
UnityEngine.Rendering.RenderPipelineManager.BeginCameraRendering (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera camera) (at <e27997765c1848b09d8073e5d642717a>:IL_000A)
UnityEngine.Rendering.RenderPipeline.BeginCameraRendering (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera camera) (at <e27997765c1848b09d8073e5d642717a>:IL_0001)
UnityEngine.Rendering.HighDefinition.HDRenderPipeline.TryCull (UnityEngine.Camera camera, UnityEngine.Rendering.HighDefinition.HDCamera hdCamera, UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Rendering.HighDefinition.SkyManager skyManager, UnityEngine.Rendering.ScriptableCullingParameters cullingParams, UnityEngine.Rendering.HighDefinition.HDRenderPipelineAsset hdrp, UnityEngine.Rendering.HighDefinition.HDRenderPipeline+HDCullingResults& cullingResults) (at <b8abf62aeac646cea5c5cde032ff9314>:IL_005D)
UnityEngine.Rendering.HighDefinition.HDRenderPipeline.PrepareAndCullCamera (UnityEngine.Camera camera, UnityEngine.Experimental.Rendering.XRPass xrPass, System.Boolean cameraRequestedDynamicRes, System.Collections.Generic.List1[T] renderRequests, UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Rendering.HighDefinition.HDRenderPipeline+RenderRequest& renderRequest, UnityEngine.CubemapFace cubemapFace) (at <b8abf62aeac646cea5c5cde032ff9314>:IL_0104)
UnityEngine.Rendering.HighDefinition.HDRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List1[T] cameras) (at <b8abf62aeac646cea5c5cde032ff9314>:IL_02B9)
UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List`1[T] cameras) (at <e27997765c1848b09d8073e5d642717a>:IL_001C)
UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, UnityEngine.Object renderRequest) (at <e27997765c1848b09d8073e5d642717a>:IL_0046)
Zaggy1024 commented 5 months ago

I pushed a tentative fix in 54ac6a3, which will be in version 1.1.1. I'm going to close this in favor of #13 since this should hopefully be fixed, and that may be the same issue again.