Skip to content

Maximum call stack exceeded when initializing Automerge.Text with large (500kb) string #499

Open
@cgauld

Description

Hi!

We're using Preview 6 and have found that initializing Automerge.Text, like this:

doc.text = new Automerge.Text(largeString);

Causes the following error stack when called with a ~500kb string.

Uncaught (in promise) RangeError: Maximum call stack size exceeded
    at updateTextObject (...)
    at interpretPatch (...)
    at getValue (...)
    at applyProperties (...)
    at updateMapObject (...)
    at Context.interpretPatch [as applyPatch] (...)
    at Context.applyAtPath (...)
    at Context.setMapKey (...)
    at Object.set (...)

I haven't spotted an issue for this so I thought I'd add one. Would be grateful to hear of any thoughts/workarounds.

Thanks all!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions