Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

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

Discussion in 'Linux' started by jonkuze, Sep 30, 2023.

  1. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,685
    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.
     

    Attached Files:

  2. ChiwTheNeko

    ChiwTheNeko

    Joined:
    Mar 24, 2022
    Posts:
    107
    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.
     
    jonkuze likes this.
  3. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,685
    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!
     
  4. cristianm_unity

    cristianm_unity

    Unity Technologies

    Joined:
    Oct 16, 2018
    Posts:
    234
    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.
     
    jonkuze likes this.
  5. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,685
    Thanks so much for the update. I'll be sure to upgrade to latest version. Thank you.