GoogleChromeLabs / squoosh

Make images smaller using best-in-class codecs, right in the browser.
https://squoosh.app
Apache License 2.0
21.77k stars 1.53k forks source link

The mobile app is throwing error with AVIF codec. #996

Open arthurgubaidullin opened 3 years ago

arthurgubaidullin commented 3 years ago

Describe the bug Installed application throws error "Processing error: RuntimeError: memory access out of bounds" on my Nokia 7 plus after selecting an image and changing the codec to AVIF. Sometimes this does not affect image processing and result.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'start app screen'
  2. Click on 'add image'
  3. Select image
  4. Change codec to 'AVIF'
  5. See error

Expected behavior No error.

Version:

jakearchibald commented 3 years ago

Is this happening with all of the demo images, or only some?

surma commented 3 years ago

Yeah I can’t reproduce this on my phone with any of the example images or my own images. Can you provide a picture that causes this error for you?

jakearchibald commented 3 years ago

I think this is a follow-up from Twitter https://twitter.com/maybeArthurG/status/1387758504686018563.

In the screenshot the origin al 7mb which makes me think it's biiiig, so likely a genuine out of memory issue. Nokia 7 has either 4/6gb ram.

arthurgubaidullin commented 3 years ago

Is this happening with all of the demo images, or only some?

No, but with demo image it throws another error.

Screenshot_20210429-195557

Yeah I can’t reproduce this on my phone with any of the example images or my own images. Can you provide a picture that causes this error for you?

Any images cause an error.

I think this is a follow-up from Twitter https://twitter.com/maybeArthurG/status/1387758504686018563.

Yes.

In the screenshot the origin al 7mb which makes me think it's biiiig, so likely a genuine out of memory issue. Nokia 7 has either 4/6gb ram.

Another error appears on the small file. :)

Screenshot_20210429-195332

jakearchibald commented 3 years ago

Is this happening with all of the demo images, or only some?

No, but with demo image it throws another error.

Are you saying that every demo image fails to encode, although the error differs?

Do you also get an error with this image:

638283338

arthurgubaidullin commented 3 years ago

I tried to reproduce it on second phone, also a Nokia 7 Plus, I succeeded - I also get an error: "abort(undefined)".

Also on the demo image I got another error message. Screenshot (29 апр  2021 г  20_14_03)

arthurgubaidullin commented 3 years ago

Is this happening with all of the demo images, or only some?

No, but with demo image it throws another error.

Are you saying that every demo image fails to encode, although the error differs?

Do you also get an error with this image:

638283338

Yes, I am getting different error messages.

Once there was no error with this image, the second time there was an error: "Encoding error".

jyasskin commented 9 months ago

With the Mario image on a laptop with 8G ram, on Edge 120.0.2210.91 (Official build) (64-bit), the Mario image fails to convert to AVIF with:

avif_enc_mt.worker-35de7c80.js:1  worker.js onmessage() captured an uncaught exception: RuntimeError: memory access out of bounds
r @ avif_enc_mt.worker-35de7c80.js:1
self.onmessage @ avif_enc_mt.worker-35de7c80.js:1
avif_enc_mt.worker-35de7c80.js:1  RuntimeError: memory access out of bounds
    at avif_enc_mt-d4922d65.wasm:0x0
    at Object.threadInit (avif_enc_mt-c20327c8.js:1:7791)
    at self.onmessage (avif_enc_mt.worker-35de7c80.js:1:1844)

The red panda example does work on Edge, as does Mario on Chrome on the same laptop.