Maximum call stack size exceeded
See original GitHub issueIf you load hundreds elements, especially with virtual resources (like ones created by spritesheetParser
). The next
callback is chainined, and could be called in the same frame (sync)
A workaround I found:
loader.pre((resource, next) => {
setTimeout(next, 0);// break the call stack and delegate it to the next frame
});
// here others .pre(), .use(), .add(), etc.
loader.load(complete)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
javascript - Maximum call stack size exceeded error
It means that somewhere in your code, you are calling a function which in turn calls another function and so forth, until you...
Read more >JavaScript Error: Maximum Call Stack Size Exceeded
If you see the “Maximum Call Stack Size Exceeded” error, there's likely a problem with a recursive function within your JavaScript code.
Read more >Uncaught RangeError: Maximum call ... - Net-Informations.Com
Maximum call stack size exceeded error ... This error is almost always means you have a problem with recursion in JavaScript code, as...
Read more >RangeError: Maximum call stack size exceeded - Educative.io
The most common source for this error is infinite recursion. You must have a recursive function in your code whose base case is...
Read more >Debug Range Error Maximum call stack size exceeded
Debug Range Error Maximum call stack size exceeded #vscode #javascript #shorts #debug #100daysofcode.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
v2.0.8
has been released which should include the fix for this issue.I think I see how this can happen now, just need to insert a setTimeout to break the stack in strategic locations in the Loader. I will see if I can get something in for this soon.