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.

Infinite loop when running WebGL builds on 2021.2.0b16

Discussion in '2021.2 Beta' started by Bersaelor, Oct 21, 2021.

  1. Bersaelor


    Oct 8, 2016
    After updating to the latest beta build, none of our WebGL projects run anymore.
    Tested in Chrome & Safari with our minimal web gl example project.

    The projects all run in the simulator, there just seems to be a bug in the WebGL build system now. (last unity version I tested where WebGL was working was 2021.2.0b12)


    Code (CSharp):
    1. RangeError: Maximum call stack size exceeded.
    2. <?>.wasm-function[3984]@[wasm code]
    3. <?>.wasm-function[1697]@[wasm code]
    4. <?>.wasm-function[22073]@[wasm code]
    5. <?>.wasm-function[7771]@[wasm code]
    6. <?>.wasm-function[25475]@[wasm code]
    7. <?>.wasm-function[41429]@[wasm code]
    8. wasm-stub@[native code]
    9. invoke_ii@http://localhost:58465/Build/
    10. <?>.wasm-function[41429]@[wasm code]
    11. <?>.wasm-function[4004]@[wasm code]
    12. <?>.wasm-function[3998]@[wasm code]
    13. <?>.wasm-function[1398]@[wasm code]
    14. <?>.wasm-function[642]@[wasm code]
    15. <?>.wasm-function[25475]@[wasm code]
    16. <?>.wasm-function[41429]@[wasm code]
    17. wasm-stub@[native code]
    18. invoke_ii@http://localhost:58465/Build/
    19. <?>.wasm-function[41429]@[wasm code]
    20. <?>.wasm-function[4004]@[wasm code]
    21. <?>.wasm-function[3998]@[wasm code]
    22. <?>.wasm-function[1398]@[wasm code]
    23. <?>.wasm-function[642]@[wasm code]
    24. <?>.wasm-function[25475]@[wasm code]
    25. <?>.wasm-function[41429]@[wasm code]
    26. wasm-stub@[native code]
    27. invoke_ii@http://localhost:58465/Build/
    28. <?>.wasm-function[41429]@[wasm code]
    29. <?>.wasm-function[4004]@[wasm code]
    30. <?>.wasm-function[3998]@[wasm code]
    31. <?>.wasm-function[1398]@[wasm code]
    32. <?>.wasm-function[642]@[wasm code]
    33. <?>.wasm-function[25475]@[wasm code]
    34. <?>.wasm-function[41429]@[wasm code]
    35. wasm-stub@[native code]
    36. invoke_ii@http://localhost:58465/Build/
    37. <?>.wasm-function[41429]@[wasm code]
    38. <?>.wasm-function[4004]@[wasm code]
    39. <?>.wasm-function[3998]@[wasm code]
    40. <?>.wasm-function[1398]@[wasm code]
    41. <?>.wasm-function[642]@[wasm code]
    42. <?>.wasm-function[25475]@[wasm code]
    43. <?>.wasm-function[41429]@[wasm code]
    44. wasm-stub@[native code]
    45. invoke_ii@http://localhost:58465/Build/
    46. <?>.wasm-function[41429]@[wasm code]
    47. <?>.wasm-function[4004]@[wasm code]
    48. <?>.wasm-function[3998]@[wasm code]
    49. <?>.wasm-function[1398]@[wasm code]
    50. <?>.wasm-function[642]@[wasm code]
    51. <?>.wasm-function[25475]@[wasm code]
    52. <?>.wasm-function[4142
  2. adamgolden


    Jun 17, 2019
    Try deleting Library/BuildCache and Library/Bee then build again, there's been an issue requiring that lately for same or similar error in WebGL builds but I'm not sure which versions it applies to - latest 2022 alpha for me anyway that works. There's an alphas thread about it, I'm on my phone so it's hard to grab the link to paste but hope that helps :)

    Last edited: Oct 21, 2021
    Bersaelor likes this.
  3. Bersaelor


    Oct 8, 2016
    Thank you for that tip, deleting the `Library` folder made my minimal test example work.
    For the production app, we do have a project setup with a local core-code package, thats imported into the main project (also into other projects).
    The project works fine in the Editor, but when I build&run it in the browser, I get a some weird:
    Code (CSharp):
    1. FormatException: Input string was not in a correct format.
    2.   at System.Text.StringBuilder.FormatError () [0x00000] in <00000000000000000000000000000000>:0
    errors I have never seen before (while executing code in the local dependency package).
    Is there a cached build folder for the dependent projects that I also have to refresh?
    Last edited: Oct 22, 2021
  4. Bersaelor


    Oct 8, 2016
  5. adamgolden


    Jun 17, 2019
    I'm not sure, I'm not familiar with that workflow - actually being able to share source between projects (the same copy.. which I assume you're talking about) is something I didn't think was possible :rolleyes: but now that I know it's being done I guess I'll have to look into it again! Anyway glad things are moving forward, hope the other thread elicits a useful response - good luck.
    Bersaelor likes this.