stockfish.js icon indicating copy to clipboard operation
stockfish.js copied to clipboard

"RangeError: out of memory" when loading "stockfish-16.1-lite.js" in webworker on iOS safari/chrome

Open jo-sip opened this issue 1 year ago • 1 comments

It seems to work when loading fine on chrome on MacOS, but when I load this on my mobile the worker throws with this error.

It does seem to work when I use stockfish-16.1-lite-single.js for mobile though.

Chrome 128.0.6613.98

jo-sip avatar Sep 04 '24 15:09 jo-sip

The multi-threaded engines might use more memory. Mobile browsers are pretty limited. So, you may want to stick with the single-threaded engine.

The multi-threaded engines use SharedArrayBuffer, which needs COORS headers. That is often the source of issues with the multi-threaded engines.

nmrugg avatar Sep 06 '24 20:09 nmrugg