-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
webassembly-memory-error on Chrome (with test case) #301
Comments
This is exactly bug, that happens in our app. We have a single page application, and jsmpeg crashes after several clicks with this error. |
I get the exact same error in my SPA. Unfortunately it looks like reloading the page doesn't immediately free memory. Is there a way to explicitly clear the WebAssembly memory buffer? |
There doesn't seem to be a way to explicitly free WASM memory. So the "fix" above just caches the instantiated module indefinitely, instead of re-creating it each time. |
@phoboslab it might be even bug in garbage collection of typed arrays |
try the attached test-case ( jsmpeg-error-repo.zip )
unzip it
serve the directory with a webserver, for example with
python3 -m http.server --bind localhost 4444
open
http://localhost:4444
in Google Chromeclick the [restart] button
the script will now start the playback of a video file, and after 1 second it destroys the jsmpeg-instance, and starts again.
on my computer, after around 100 iterations you get an error-message
it seems to work ok on Firefox.
the included jsmpeg.min.js is named based on the git-commit i took it from.
The text was updated successfully, but these errors were encountered: