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

compiler crashes at ~650+ nested elements \w "Maximum call stack size exceeded" #6711

Closed
benbender opened this issue Sep 5, 2021 · 1 comment

Comments

@benbender
Copy link
Contributor

benbender commented Sep 5, 2021

Describe the bug

If I add around ~650 nested html-tags into a page and add an empty style-tag, the compiler crashes with "Internal server error: Maximum call stack size exceeded".

The bug does not seem to appear if:

  • below a sum of ~650 nested tags
  • the tags aren't nested

Reproduction

https://svelte.dev/repl/0a52a75c95d34423bf6d328ca4e1db88?version=3.42.4

Logs

12:34:05 [vite] Internal server error: Maximum call stack size exceeded
  Plugin: vite-plugin-svelte
  File: /sveltekit-repro-callstack/src/routes/index.svelte
      at handle_var_declaration (/sveltekit-repro-callstack/node_modules/.pnpm/svelte@3.42.4/node_modules/svelte/compiler.mjs:6470:10)
      at VariableDeclaration (/sveltekit-repro-callstack/node_modules/.pnpm/svelte@3.42.4/node_modules/svelte/compiler.mjs:6755:10)
      at handle (/sveltekit-repro-callstack/node_modules/.pnpm/svelte@3.42.4/node_modules/svelte/compiler.mjs:6175:17)
      at /sveltekit-repro-callstack/node_modules/.pnpm/svelte@3.42.4/node_modules/svelte/compiler.mjs:6408:18
      at Array.map (<anonymous>)
      at handle_body (/sveltekit-repro-callstack/node_modules/.pnpm/svelte@3.42.4/node_modules/svelte/compiler.mjs:6407:21)
      at /sveltekit-repro-callstack/node_modules/.pnpm/svelte@3.42.4/node_modules/svelte/compiler.mjs:6489:7
      at scoped_fn (/sveltekit-repro-callstack/node_modules/.pnpm/svelte@3.42.4/node_modules/svelte/compiler.mjs:6376:10)
      at handle (/sveltekit-repro-callstack/node_modules/.pnpm/svelte@3.42.4/node_modules/svelte/compiler.mjs:6175:17)
      at /sveltekit-repro-callstack/node_modules/.pnpm/svelte@3.42.4/node_modules/svelte/compiler.mjs:6748:7

Severity

blocking all usage of svelte

@benbender benbender changed the title compiler crashes at ~700+ nested elements \w "Maximum call stack size exceeded" compiler crashes at ~650+ nested elements \w "Maximum call stack size exceeded" Sep 5, 2021
@Conduitry
Copy link
Member

To the extent that this isn't a duplicate of #4694, I think this is a won't fix.

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