I've run into a strange issue using modestmaps js in IE 7/8 - when viewing examples/simple and other maps a Stack overflow at line: 0 error will appear. I've found a few references to this error:
Stack overflow at line: 0
What's interesting is that this error can be somewhat difficult to reproduce - I've been able to determine that it only occurs when the length of the request queue pushes the number of recursions between processQueue() and getLoadComplete above 13 or so. For example, on examples/simple I can reproduce the error when there are no browser-cached images, but once the cache is warmed the number of requests drops below 13 and the error no longer appears.
I'm not familiar enough with the modestmaps codebase at this point to see whether the solution described by the second post is viable -- I don't see the global var reference to processQueue() that would need to be switched to a local var. At the suggestion of @kkaefer, I've been able to address this issue with a different stopgap -- using setTimeout to break the recursion and avoid hitting the IE limit:
// keep going in the same order
+ // use setTimeout() to avoid the IE recursion limit, see
+ // http://cappuccino.org/discuss/2010/03/01/internet-explo
+ setTimeout(theManager.processQueue, 0);
Thanks for this - keeping Modest Maps robust on older browsers is important. I'm hoping to find time for a bunch of small changes and optimizations like this myself. I see no harm in deferring processQueue if it saves an overflow, I'll double check and push a fix as soon as I can.
prevent stack overflow in IE 7/8, closes #12, thanks @yhahn
That was fast : )