Skip to content

Maximum call stack size exceeded within getNewRowId() #192

@bywo

Description

@bywo

Describe the bug

I have a join table with thousands of rows. When I try to add a new row, I hit a Maximum call stack size exceeded, seemingly when tinybase is trying to generate a new Id.

Looking at the code, the problem seems to be the tail recursion in getNewRowId(), which tests ids from 0..n. I suspect converting this to a while loop would solve the problem.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

No response

Expected behavior

No response

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Arc

Additional context

No response

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