Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug (Case 1363007) WebGL build fails with a crash, "abnormal situation has occurred" with DrawTexture

Discussion in '2021.2 Beta' started by Xilinnilix, Sep 11, 2021.

  1. Xilinnilix

    Xilinnilix

    Joined:
    Nov 19, 2018
    Posts:
    9
    I'm exporting to WebGL2 with URP. One of my scripts is using GUI.DrawTexture inside OnGUI and it crashes my build with the following stacktrace.
    Additionally in Chrome it says: "An abnormal situation has occurred: the PlayerLoop internal function has been called recursively. Please contact Customer Support with a sample project so that we can reproduce the problem and troubleshoot it."

    RuntimeError: index out of bounds
    UnityEngine.GUI:get_blendMaterial()
    UnityEngine.GUI:DrawTexture(Rect, Texture, ScaleMode, Boolean, Single, Color, Color, Color, Color, Vector4, Vector4, Boolean)
    UnityEngine.GUI:DrawTexture(Rect, Texture, ScaleMode, Boolean, Single, Color, Vector4, Vector4, Boolean)
    UnityEngine.GUI:DrawTexture(Rect, Texture, ScaleMode, Boolean, Single, Color, Vector4, Vector4)
    UnityEngine.GUI:DrawTexture(Rect, Texture, ScaleMode, Boolean, Single, Color, Vector4, Single)
    UnityEngine.GUI:DrawTexture(Rect, Texture, ScaleMode, Boolean, Single, Color, Single, Single)
    UnityEngine.GUI:DrawTexture(Rect, Texture, ScaleMode, Boolean, Single)
    UnityEngine.GUI:DrawTexture(Rect, Texture, ScaleMode, Boolean)
    UnityEngine.GUI:DrawTexture(Rect, Texture, ScaleMode)
    UnityEngine.GUI:DrawTexture(Rect, Texture)



    I've submitted this with the bug reporter and I was wondering whether other people have encountered the same issue and have found a workaround for this.
    Thanks in advance
     
    LeonhardP likes this.