App freezes after a while with OOM on low-power Android smartphone

Open
#69 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, javascript

Research direction

The report describes an out-of-memory freeze on a Nokia 2 running Android 8.1 with Chrome 80, but does not identify a file, failing test, or specific source of the memory growth. Start by reproducing the scan on that device and tracing memory use in the QR scanning path, including the software fallback and ShapeDetection API. Done means the app no longer freezes from memory pressure while retaining a working fallback; the issue gives no test or benchmark to confirm this.

Written by the indexing model from the issue text.

Description

Using the Nokia 2 on Android 8.1 with Chrome 80, the app freezes after a while with
'This page uses soo much memory, so Chrome removed some content'.

This combination of hardware, platform and browser version has been verified to support ShapeDetection API.

Note that Google distributed this phone model to developers at some point with the indication it would be a prototypical example of low-power smartphone often found in developing countries.

So for QR snapper to be useful to the next billion users, the app and/or Google Chrome needs some serious performance work.

Note that merely switching exclusively to the browser's ShapeDetection API will not work in general, since on too many devices this may not work (needs cooperation with Google Play Services, has been observed to fail in the field even with up-to-date Services). Hence an unaccelerated software fallback like what is used in QR snapper is still needed, greatly reducing the benefit of ShapeDetection API .

Please fix this.

Dominant language
JavaScript
Stars
375
Forks
479
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PaulKinlan/qrcode

All issues in PaulKinlan/qrcode

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.