I am using a Direct Web Remoting (DWR) JavaScript library file and am getting an error only in Safari (desktop and iPad)
It says
Maximum call stack size exceeded.
What exactly does this error mean and does it stop processing completely?
Also any fix for Safari
browser (Actually on the iPad Safari
, it says
JS:execution exceeded timeout
which I am assuming is the same call stack issue)
I am using Devexpress Scheduler in Angular and the problem is the improper using of the variable assigned to datasource tag of the scheduler.
If you need a infinite process/recursion running for some reason, you can use a webworker in a seperate thread. http://www.html5rocks.com/en/tutorials/workers/basics/
if you want to manipulate dom elements and redraw, use animation http://creativejs.com/resources/requestanimationframe/
In my case, two jQuery modals were showing stacked on top of each other. Preventing that solved my problem.
you can find your recursive function in crome browser,press ctrl+shift+j and then source tab, which gives you code compilation flow and you can find using break point in code.
There is a recursive loop somewhere in your code (i.e. a function that eventually calls itself again and again until the stack is full).
Other browsers either have bigger stacks (so you get a timeout instead) or they swallow the error for some reason (maybe a badly placed try-catch).
Use the debugger to check the call stack when the error happens.
Both invocations of the identical code below if decreased by 1 work in Chrome 32 on my computer e.g. 17905 vs 17904. If run as is they will produce the error "RangeError: Maximum call stack size exceeded". It appears to be this limit is not hardcoded but dependant on the hardware of your machine. It does appear that if invoked as a function this self-imposed limit is higher than if invoked as a method i.e. this particular code uses less memory when invoked as a function.
Invoked as a method:
Invoked as a function: