Invalid pass number (0) for Graphics.Blit (Material "(Unknown material)" with 0 passes)

Unity 2021.3.30f1

When building and running a Linux Dedicated Server, I see an infinite loop of the following Error thrown in the Console: Invalid pass number (0) for Graphics.Blit (Material “(Unknown material)” with 0 passes). I wish I could ignore this error but it’s effecting performance; server is utilizing up to 80% of vCPU when running in a Docker container.

I hope someone can assist. I’m trying to launch a closed beta test of my upcoming game, but I’m totally blocked now due to this issue.


Does your code or the code of one of the assets you use call any blit function inside a callback like Update() or similar?

Dedicated server builds have no graphic. All graphic assets like material and shaders are striped from the build. If you code calls Graphics.Blit() (or equivalent) then it would explain the ‘Unknown Material’ error you get.

1 Like

You are spot on! A buddy of mine was able to find the source, it was related to a Unity Asset i’m using and was calling something in the Update() on the server side. Oddly enough I was not seeing the source of where this error was coming from, but on my buddies end he recieved different console logs so we were able to find the culprit! Thanks soo much!

Hey! If I’m correct, this message Invalid pass number (0) for Graphics.Blit (Material “(Unknown material)” with 0 passes) should be fixed in 2021.3.32f1.

1 Like

Thanks so much for the update. I’ll be sure to upgrade to latest version. Thank you.

I have just upgraded my project from 2019 to 2021.3.34f1 and now I get exactly the same error message:

Graphics.Blit material "Hidden/MotionBlur" uses dest texture "" as input in pass (0), it's an undefined behaviour. Consider using double buffering.
UnityEngine.Graphics:Blit (UnityEngine.Texture,UnityEngine.RenderTexture,UnityEngine.Material)
UnityStandardAssets.ImageEffects.MotionBlur:OnRenderImage (UnityEngine.RenderTexture,UnityEngine.RenderTexture) (at Assets/Standard Assets/Effects/ImageEffects/Scripts/MotionBlur.cs:72)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

So this should not appear since I am on a newer Version then 2021.3.32f1. What can I do?

Hey @rfuhrer , this looks like a slightly different issue (notice that in this case it’s a motion blur material instead of the “unknown” one). So would it be possible for you to submit a bug report and share the case number? Or let me know if there are some reproduction steps that could help us investigating it.

Thanks!

1 Like