Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Stack overflow at line: 0 in Internet Explorer #12

yhahn opened this Issue · 2 comments

2 participants


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:

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:

In getLoadComplete:

    // keep going in the same order
-   theManager.processQueue();
+   // use setTimeout() to avoid the IE recursion limit, see
+   //
+   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.

@RandomEtc RandomEtc closed this in c202b0a

That was fast : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.