Skip to content

tfjs-tflite: error after page refresh #8166

Open
@Jove125

Description

@Jove125

Hi,
The error consistently occurs when performing a certain sequence of actions and only on some devices.

  1. Open the page and initialize/execute 2 models.
  2. Refresh the page (without closing it) and repeat the same steps from point 1.

The error occurs during the second execution of one of the initialized models (the first execution occurs without errors, but before the initialization of the second model).

Uncaught (in promise) RuntimeError: memory access out of bounds
    at tflite_web_api_cc_simd_threaded.wasm:0x84782
    at tflite_web_api_cc_simd_threaded.wasm:0x2f41d
    at tflite_web_api_cc_simd_threaded.wasm:0x6720
    at tflite_web_api_cc_simd_threaded.wasm:0x5d1d4
    at tflite_web_api_cc_simd_threaded.wasm:0x32f1ed
    at tflite_web_api_cc_simd_threaded.wasm:0x68e48
    at tflite_web_api_cc_simd_threaded.wasm:0x337a6e
    at tflite_web_api_cc_simd_threaded.wasm:0x421bb
    at Function.TFLiteWebModelRunner$CreateFromBufferAndOptions [as CreateFromBufferAndOptions] (eval at new_ (tflite_web_api_cc_simd_threaded.js:9:42857), <anonymous>:10:10)
exception thrown: RuntimeError: memory access out of bounds,RuntimeError: memory access out of bounds
    at tensorflow/@tensorflow/tfjs-tflite/dist/tflite_web_api_cc_simd_threaded.wasm:wasm-function[2485]:0x17db61
    at tensorflow/@tensorflow/tfjs-tflite/dist/tflite_web_api_cc_simd_threaded.wasm:wasm-function[4702]:0x32f82d
    at tensorflow/@tensorflow/tfjs-tflite/dist/tflite_web_api_cc_simd_threaded.wasm:wasm-function[2504]:0x1806d4
    at TFLiteWebModelRunner.TFLiteWebModelRunner$GetInputs [as GetInputs] (eval at new_ (tensorflow/@tensorflow/tfjs-tflite/dist/tflite_web_api_cc_simd_threaded.js:9:42857), <anonymous>:8:10)
    at module$exports$google3$third_party$tensorflow_lite_support$web$tflite_web_api_client.TFLiteWebModelRunner.getInputs (tensorflow/@tensorflow/tfjs-tflite/dist/tf-tflite.min.js:17:1201308)

The error occurs on Honor 10 Lite, Readme Note 7 and does not occur on Google Pixel 4a 5G (possibly because there is 6 GB of RAM, but not 3 GB).
If you do not refresh the page after the first launch in the browser, but close it and open a new one, then the error does not occur.

Question: is there any way to completely clear the data/cache before initializing tfjs-tflite models?

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions