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 call stack size exceeded #350

Open
vorg opened this issue Oct 18, 2023 · 3 comments
Open

Maximum call stack size exceeded #350

vorg opened this issue Oct 18, 2023 · 3 comments

Comments

@vorg
Copy link
Member

vorg commented Oct 18, 2023

Happens when pipeline crash. Looks like RAF stacks to infinity on error

Screenshot 2023-10-18 at 12 06 37

Can this be caused by requestAnimationFrame(frame.bind(this)); in pex-renderer?

@vorg
Copy link
Member Author

vorg commented Oct 18, 2023

It was added in pex-context@3 alpha to avoid self = this variable.

@vorg
Copy link
Member Author

vorg commented Oct 18, 2023

Easiest way ATM to recreate issue it to create lineMaterial

const cubeEntity = createEntity({
  transform: components.transform(),
  geometry: components.geometry(cube()),
  material: components.material({ type: "line" }),
});
world.add(cubeEntity);

That will crash lineRendererSystem at buffer: entity._geometry.attributes.aVertexColor.buffer, as vertex colors are missing

@dmnsgn
Copy link
Member

dmnsgn commented Oct 18, 2023

We should try/catch renderEngine.update/render in ctx.frame and return false on error to stop the loop. Restarting the raf will need better devx than a reload in Nodes.

dmnsgn added a commit that referenced this issue Oct 19, 2023
- avoid this.drawMeshes.bind(this) which causes Maximum call stack size exceeded everywhere but Chrome

Closes #350
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

2 participants