Module.instantiateWasm callback failed with error: out of memory
See original GitHub issueDescribe the bug Getting out of memory issue with small files (893 Kb).
To Reproduce
data
below is a video-only Blob
from a webcam.
async convert(data) {
const { createFFmpeg, fetchFile } = FFmpeg;
const ffmpeg = createFFmpeg({
corePath: this.convertWorkerURL,
log: this.debug
});
const name = "foo";
// load and convert blob
await ffmpeg.load();
ffmpeg.FS('writeFile', name, await fetchFile(data));
await ffmpeg.run('-i', name, 'output.mp4');
const output = ffmpeg.FS('readFile', 'output.mp4');
// create new blob
let result = new Blob([output.buffer], { type: 'video/mp4' })
}
Screenshots
Process and error in screenshot below:
Desktop (please complete the following information):
- OS: Ubuntu 20
- Browser: Firefox
- Version 82
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
How to properly handle "out of memory" error with Wasm/JS
I'm working on a computer-vision web-app. To do so, I use the OpenCV library in a Wasm Module as provided in the docs....
Read more >[#QTBUG-101055] wasm: declarative apps crash with threads
... Ithe app fails to run with: Module.instantiateWasm callback failed with error: out of memory worker.js onmessage() captured an uncaught ...
Read more >Photoshop, LibreOffice wasm compilation OOMs with devtools ...
Open up devtools; Navigate to photoshop; Observe 'Module.instantiateWasm callback failed with error: out of memory' in console; Errors cascade.
Read more >ffmpegjs - Bountysource
Module.instantiateWasm callback failed with error: out of memory $ 0. Created 2 years ago in ffmpegwasm/ffmpeg.wasm with 4 comments.
Read more >C and WASM via emcc - ontouchstart
The Module object: Our interface to the outside world. ... instantiateWasm callback failed with error: ' + e); return false; } } instantiateAsync();...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Marcosdg3 I am able to reproduce this in Firefox. With the devtools opens, calls to emscripten instantiateWasm fail. With devtools closed, the ffmpeg command is successful.
Browser: Firefox 84.0 (64-bit) OS: Catalina 10.15.7
Also: would be nice to have some sort of error handling…