ffmpeg.wasm icon indicating copy to clipboard operation
ffmpeg.wasm copied to clipboard

RuntimeError: memory access out of bounds when using exec multiple times in a row

Open domlija opened this issue 1 year ago • 3 comments

Describe the bug When repeatedly executing an ffmpeg operation (using ffmpeg.exec) either in a loop or manually by clicking a button, after few tens of operations (minimum was 15, maximum was 65 depending on the complexity) the worker dies with RuntimeError: memory access out of bounds error.

To Reproduce Repeatedly call exec method of the same worker. Reproduced with all exec arguments I tried.

Expected behavior Worker not dying and completing operations as needed.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser chrome, safari

Extra

The problem does not happen with reloading the worker between execs.

domlija avatar Jan 14 '25 14:01 domlija

I also encounter the same problem, have you solved it?

mengbieting avatar Mar 10 '25 06:03 mengbieting

Reloading the worker between calls, it is slower but consistent

domlija avatar Mar 10 '25 08:03 domlija

Thanks, yes, it takes some time to reload, I use webcodecs for encoding and decoding, it just meets my needs and does not have this problem of ffmpeg

mengbieting avatar Mar 10 '25 10:03 mengbieting