Playground error: Maximum call stack size exceeded

Hi! Another one :frowning:
I’ve generated code from the NME in a PG. It produces the following error:

https://playground.babylonjs.com/#2W15F7#4

https://nme.babylonjs.com/#2BSL82#4

Thank you!
R.

The unobfuscated call stack is:

errors.js:12 Uncaught Error: Maximum call stack size exceeded

RangeError: Maximum call stack size exceeded
    at String.match (<anonymous>)
    at MonarchTokenizer.../../node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchLexer.js.MonarchTokenizer._myTokenize (monarchLexer.js:475)
    at MonarchTokenizer.../../node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchLexer.js.MonarchTokenizer._tokenize (monarchLexer.js:365)
    at MonarchTokenizer.../../node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchLexer.js.MonarchTokenizer.tokenize2 (monarchLexer.js:357)
    at safeTokenize (textModelTokens.js:382)
    at TextModelTokenization.../../node_modules/monaco-editor/esm/vs/editor/common/model/textModelTokens.js.TextModelTokenization._updateTokensUntilLine (textModelTokens.js:304)
    at TextModelTokenization.../../node_modules/monaco-editor/esm/vs/editor/common/model/textModelTokens.js.TextModelTokenization._tokenizeOneInvalidLine (textModelTokens.js:290)
    at TextModelTokenization.../../node_modules/monaco-editor/esm/vs/editor/common/model/textModelTokens.js.TextModelTokenization._revalidateTokensNow (textModelTokens.js:241)
    at textModelTokens.js:227
    at run (setImmediate.js:40)
    at errors.js:12

So, it’s a problem with the monaco editor. Adding @RaananW who may know what’s going on.

Thanks!

On it…I created an issue for it: Playground error: Move to latest monaco version · Issue #10890 · BabylonJS/Babylon.js (github.com)

2 Likes

Even with the latest monaco version it crashes

For now I can suggest to cmment or remove the createMaterial function :wink:

Hey!
Yep, I don’t really need it, just was testing something and the error has popped out.
Thanks!