Skip to content

LoadStoreError on attempt to modify return value from Storage.readArrayBuffer() #1883

Open
@GaryOtt

Description

@GaryOtt

This will cause a reboot:

var s = require("Storage");
s.write("ch0", E.toUint8Array([0]));
s.readArrayBuffer("ch0")[0] = 1;

Found to occur on ESP32 and ESP8266. I will test more boards when I can. Present in the last release as well as a build compiled this afternoon.

In my application, I actually need a Uint8Array and I find this work around returns a writeable object:
new Uint8Array(new Uint8Array(s.readArrayBuffer("ch0")))

Metadata

Metadata

Assignees

No one assigned

    Labels

    ESP32This is only a problem on ESP32-based devicesESP8266This is only a problem on ESP8266 devices

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions