ffmpegwasm/ffmpeg.wasm

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

domlija opened this issue · 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.

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

Reloading the worker between calls, it is slower but consistent

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