Skip to content

Persistence Adapter Call Stack Error #2427

@SemAiSoft

Description

@SemAiSoft

The line: " this.memory().splice(0, this.memoryArray().length, ...items);" in the "loadPersistentData" function is giving off error when the items size is use, say 150K.

The error: "Uncaught (in promise) RangeError: Maximum call stack size exceeded"

POSSIBLE FIX:

// Replace this:
// this.memory().splice(0, this.memoryArray().length, ...items);

// With this:
const mem = this.memory();
mem.length = 0; // Clear the array while keeping the reference
for (const item of items) {
  mem.push(item);
}


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions