最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to debug a maximum call stack size error in Unity 3D WebGL? - Stack Overflow

programmeradmin5浏览0评论

I'm having this weird issue when exporting my Unity 3D application to webGL. On my puter it runs fine (on Unity, that is) but when I put it online it gives me the Maximum Call Stack Size error on Chrome (firefox runs fine) I did some research and most articles say it's because of a possible infinite loop on the code, I checked my code and there are no infinite loops (it would hang on firefox). So now I'm not sure how can I debug this. Can someone help out?

Update: I tried disabling objects from the scene, and even with an almost empty scene with no C# code running, it will still return this bug.

I'm having this weird issue when exporting my Unity 3D application to webGL. On my puter it runs fine (on Unity, that is) but when I put it online it gives me the Maximum Call Stack Size error on Chrome (firefox runs fine) I did some research and most articles say it's because of a possible infinite loop on the code, I checked my code and there are no infinite loops (it would hang on firefox). So now I'm not sure how can I debug this. Can someone help out?

Update: I tried disabling objects from the scene, and even with an almost empty scene with no C# code running, it will still return this bug.

Share Improve this question edited Sep 29, 2017 at 0:51 user128511 asked Sep 28, 2017 at 18:56 sigmaxfsigmaxf 8,51215 gold badges70 silver badges133 bronze badges 5
  • have you tried using the chrome dev tools to inspect the call stack? – lockstock Commented Sep 28, 2017 at 23:01
  • I could do that but unity code is piled for webgl, so I can't really trace it back to my app – sigmaxf Commented Sep 28, 2017 at 23:20
  • it could still have some useful information – lockstock Commented Sep 28, 2017 at 23:37
  • are you using the latest version of Unity? – lockstock Commented Sep 28, 2017 at 23:37
  • I am using it, yes – sigmaxf Commented Sep 29, 2017 at 1:01
Add a ment  | 

4 Answers 4

Reset to default 2

Thanks @slaw. It did not work for me by refreshing, but when I opened it in an Incognito mode, the error was gone.

I had this error. I was able to fix it by just refreshing the browser cache. Ctrl-Shift-R wasn't enough on Firefox. I had to go into network console enable "Disable Cache" there.

Old question, but I recently encountered this with 2021.3.30f1, in both Firefox and Chrome (though the errors are reported using different terminology).

One solution was to turn off pression in the Project Settings -> WebGL, Publishing Settings:

  • Compression Format: Disabled
  • Names as hashes off
  • Data Caching: off
  • Depression Fallback: off

Using latest Unity 2018.1.0f2 Personal this was happening. File --> Build Settings --> WebGL --> Player Settings - select WebGL Build. Then on the inspector tab changed the Api Compatibility Level from 4.x to .Net Standard 2.0. All working now.

Error in Chrome

Uncaught RangeError : Maximum Call Stack Size Exceeded

Error in Firefox

Too much Recursion.

发布评论

评论列表(0)

  1. 暂无评论