Does this error mean that the library is faulty?

Since I installed the postprocessing stack v2 and applied it to my game, my game suddenly and out of nowhere throws me a NullReferenceException regarding my stamina bar (which has nothing to do with the post processing, I didn’t change a single thing about this script), even though it worked perfectly fine before…?

This is the error it throws me:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.Rendering.PostProcessing.RuntimeUtilities.get_copyStdMaterial () (at Library/PackageCache/com.unity.postprocessing@2.2.2/PostProcessing/Runtime/Utils/RuntimeUtilities.cs:269)
UnityEngine.Rendering.PostProcessing.PostProcessLayer.BuildCommandBuffers () (at Library/PackageCache/com.unity.postprocessing@2.2.2/PostProcessing/Runtime/PostProcessLayer.cs:605)
UnityEngine.Rendering.PostProcessing.PostProcessLayer.OnPreCull () (at Library/PackageCache/com.unity.postprocessing@2.2.2/PostProcessing/Runtime/PostProcessLayer.cs:440)

It looks like individual lines of code in the Extension are broken…?
funnily enough, the game runs in the preview, but it still throws the errors…

Plz help im going insane :frowning:
Thank you!

edit: I tried removing the main camera and the post processing volume game object, which then led to the random stamina bar bug showing up.

NullReferenceException: Object reference not set to an instance of an object
PlayerMovement.FixedUpdate () (at Assets/Scripts/PlayerMovement.cs:64)

here’s the code:

staminaBar.fillAmount = (stamina / maxStamina);

stamina and maxStamina are both floats declared to 3f, and the staminaBar Image is declared and referenced to the script…

wth :frowning:

This error is coming from the PostProcessing package. If this is something you can recreate then please file a bug report so we can investigate. https://support.unity3d.com/hc/en-us/articles/206336985-How-do-I-submit-a-bug-report-

1 Like

Will do.

Do I have to cut out my post processing until it’s fixed, then? :frowning:

1 Like

Hard to say until we have been able to look into it. It could be a bug with postprocessing or your project.

1 Like

Can you post the bug? I am also experiencing the same issue.