One of my page start behaving weirdly and was getting the following error:
Uncaught RangeError: Maximum call stack size exceeded
Finally found the culprit , which is a UI-Only formula field.
I do not see any reason this should happen, maybe someone can explain, as it’s a very simple formula field (addition of 3 percent fields)
UI-Only Formula field return a number, and here’s formula: {{Ownership_Of_Applicant_1__c}}+{{Ownership_2__c}}+{{Ownership_3__c}}. all 3 of those SF fields are of “percent” type of field
How odd, exceeding call stack size error are usually caused by infinite loops. We would like to look further into this. Would it be possible to grant Skuid login rights? When you have done so, please send your org ID, name of the Skuid page, and how to reproduce this error to support@skuid.com.
Unfortunately, we are not able to replicate the error message you are seeing by following your instructions in your org … Are you still having this problem?
When i found the field causing the issue,In the mean time that I receive an answer, I had removed it and found another way to do what i needed.
Yesterday I tried recreating it , so you can test on it and on my side issue was intermittent, sometimes working well and other times no, with no apparent logic i can understand
So I guess for now , let’s leave it aside? or would you like to me to try to recreate it again and testing further?
Is your scenario similar to what Dave described? If it’s different, can you describe your scenario in more detail? Also, please share any error messages you’re seeing in the browser console.
This error is almost always means you have a problem with recursion in JavaScript code, as there isn’t any other way in JavaScript to consume lots of stack. Sometimes calling a recursive function over and over again, causes the browser to send you Maximum call stack size exceeded error message as the memory that can be allocated for your use is not unlimited.
How to fix
Wrap your recursive function call into a -
setTimeout
setImmediate or
process.nextTick
Also, you can localize the issue by setting a breakpoint on RangeError type of exception , and then adjust the code appropriately. Moreover, you can managed to find the point that was causing the error by check the error details in the Chrome dev toolbar console , this will give you the functions in the call stack, and guide you towards the recursion that’s causing the error.