-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory grows each time the page refresh until error appear : Uncaught RangeError: WebAssembly.Memory(): could not allocate memory #8126
Comments
The browser should clear the memory, but may take time until it garbage collects it. So this could be a browser bug, or at least something the browser could do better. Which browser is it on? We should file a bug with a testcase. |
@luisfonsivevo @kripken thanks for your reply :) I'm on macOs 10.14.3, google chrome 72.0.3626.109. Where can we create an issue for google chrome ? |
@pierreglibert Here's a link to Chromium's official bug tracker |
@luisfonsivevo done :) |
@pierreglibert do you have a link to the bug you filed? I can try to cc some relevant people to speed things up. |
@kripken I was able to find it last night before it got too buried. https://bugs.chromium.org/p/chromium/issues/detail?id=935169&q=&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified |
Last test :
• Chrome 72.0.3626.119 works BUT show error after several refresh 👎
|
Thanks @luisfonsivevo! Looks like it's already being prepared for triage, good. |
Here a sample : |
|
Wow, another confirmed case here. |
Is there any way to solve it? |
Currently the only way to fix this (in Chromium) is to close dev tools and then refresh the page. Normal users won't have a problem because this bug is only related to dev tools. Still not fixed yet as of 73. As for for Firefox, I haven't been able to reproduce it. |
I also encounter this issue at the 36th load and it is consistent. However, I encounter it with or without Dev tools open. This is the loading portion of my program where I start each instance. (I last updated my copy of Emscripten on 2019-03-22.) // Remove the Module. // Wait 500 ms. // Edit Module: Set the game file. try{ -- Edit below: I used ASM.JS and loaded 100 times. The memory usage continued to climb (still a problem) but the app did not crash. |
Bug is still present (I use webgl2 in my files). Simple triangle drawing.
For me this is incorrect. However in Firefox it works fine. (I do get "Error: WebGL warning: : Exceeded 16 live WebGL contexts for this principal, losing the least recently used one." warning however it still loads fine unlike Opera and Chrome where it fails to load completely. After every refresh snapshot says memory is about same and is not increasing. Unlike on both chrome and opera where after about 30 refreshes memory reaches certain amount (seems to be 600MB?) and doesn't want to load anymore |
There are some known issues with the chrome devtools and with pthreads on chrome. If this isn't related to either of those, then a testcase would be good, as this may be an unknown bug. |
Actually this seems to be a problem with chrome devtools for me. If I close and reopen devtools memory is reset, and app is loading fine. (Too bad I didn't see luisfonsivevo comment before) I also wasn't able to reproduce this bug when not using chrome devtools. |
Same issue here: I've got an |
Aaaand one more here, also using Opencv.js (with Chrome 77.0.3865.90). |
Same issue here: I've got an WebAssembly.Memory(): could not allocate memory error after refreshing a page that imports and initializes a quite heavy webassembly; I'm using Chrome 78.0.3904.108 |
As mentioned a few comments back: there are known issues with devtools, and known issues with pthreads (although I think the pthreads ones were fixed in latest stable). If you see this without either of those, then please provide a testcase, as that may be an unknown issue. |
Chrome 83,still not fixed. |
Win 10 && Chrome 92, still has this error: WebAssembly.Memory(): could not allocate memory Does it relate to |
Hi community :)
I get an error after several refresh : Uncaught RangeError: WebAssembly.Memory(): could not allocate memory.
When I go to "inspect > memory > Select Javascript VM instance", memory grows each time I refresh the page.
When memory is bigger than 40mo, the error appear.
How can I clear memory on refresh page ?
The memory should not be deleted automatically ?
My code :
`extern "C" {
}`
My terminal cmd :
main.cpp -Os -std=c++17 -s USE_WEBGL2=1 -o main.html
Thanks in advance for your help ;)
The text was updated successfully, but these errors were encountered: