-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Maximum call stack size exceeded #21003
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
Comments
@thehardship is the file here auto-generated? |
Yes it is, it's an in-house program that generate the files and code for those assets, now we have 8 projects running with this without problem but this one has the longest sound file. |
are these on the top level of the file, or inside a function? does moving them inside a function change the behavior? |
All those lines are inside a init static function the gets called when my app starts by an asset manager class. |
do you have a sample we can look at? |
AssetSoundPack.ts.zip |
@thehardship I'm pretty sure this bug was fixed by #18246 which was in the 2.6 release. I can't reproduce the problem with any of the 2.6.x compilers nor with the nightly build. However, the error does reproduce with 2.5. Can you verify you're on 2.6 or later? |
I got caught again in VSC false version display, sorry about that, VSC was displaying 2.6.2 but compiling in 2.5.3. I ran an update and can confirm my file does compile now. I wish the VSC team would consider it makes more sense to display the tsc version VSC actually uses to compile files .... |
tsc 2.6.2
in a static class meant to reference assets, the following line is repeated for each game asset, each class references only one type of asset, in this case with this the sound class:
AssetSoundPack.uniqueClassReference['assetx'] = new SoundContextResource('contextresources/sound/resource_12312.mp3', 'sound', 1, false, false, false);
This project makes heavy use of sound assets and this is where the tsc compiler gives up, commenting out half those assets (4000 lines) makes the compiler happy and the file compiles but with 8000 it gives up (that file alone makes 500K).
Additionally is there anyway to increase the call stack limit temporary?
Cannot compile a .ts file with 8000 lines
/usr/local/lib/node_modules/typescript/lib/tsc.js:56173
throw e;
^
RangeError: Maximum call stack size exceeded
at isMatchingReference (/usr/local/lib/node_modules/typescript/lib/tsc.js:26978:37)
at isMatchingReference (/usr/local/lib/node_modules/typescript/lib/tsc.js:26991:25)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27583:21)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
at getTypeAtFlowArrayMutation (/usr/local/lib/node_modules/typescript/lib/tsc.js:27584:36)
at getTypeAtFlowNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:27529:32)
Expected Behavior: Although unusual in size, there shouldn't be an issue in compiling files that are 8000 lines and more.
Actual behavior: Exit with a Maximum call stack size exceeded, file did not compile.
The text was updated successfully, but these errors were encountered: