Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum stack call size exceeded when using DomBodies.block during runtime #4

Open
louisch opened this issue Jun 28, 2019 · 0 comments

Comments

@louisch
Copy link

louisch commented Jun 28, 2019

It seems when adding a block while the simulation is running (Runner.run(runner, engine) has been called etc.), a deep copy triggered from inside the DomBodies.block function goes into an endless loop, resulting in a stack call size exceeded error.
The element I'm adding can be added fine if it is added before the simulation starts running, so I'm fairly certain that the problem is that the render has some kind of circular reference after starting the simulation.

    let matterBlock = DomBodies.block(x, y, {
      Dom: {
        render: this.render,
        element,
      },
      width,
      height
    });
    World.add(this.engine.world, matterBlock);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant