script28 out of stack space

2594
7
11-20-2013 07:00 AM
AdrianMarsden
Occasional Contributor III
Hi - anyone else ever seen this error

script28 out of stack space

I'm running API 3.7 on IE10, but forcing IE9 compatibility - when it happened the entire browser froze and had to be killed.

Cheers
ACM
0 Kudos
7 Replies
KenDoman
Occasional Contributor II
I've seen it too. It seems to only occur with 3.7 compact. The "out of stack space" error is thrown by IE when your code has hit the browser's recursion limit. It seems to be something specific to the code in the compact edition. I haven't seen it in my applications that are running v. 3.7 regular.

** edit ** nevermind, I saw it in 3.7 regular as well. Look for code that could be causing heavy recursion. If you're able to step through code (including ESRI's), the error seems to be happening on line 111.
0 Kudos
AdrianMarsden
Occasional Contributor III
bump - this is now a breaking issue.  IE10 (running in IE9 mode to get around the zoom box issue) is breaking and simply locking up with this message within minutes.

Linked to line 8840 in my case.  Seems to be tied in with a request for an identify task.

On my expanded version of the init.js file this seems to be the dad part

                                var q = b(a.document, "mousedown, touchstart", function (a) {                                    f._justMouseDowned = !0;
                                    setTimeout(function () {
                                        f._justMouseDowned = !1
                                    }, 0);


I wonder if it is the touchstart event that is the issue?  I can't see a similar chunk in 3.5

.Edit - so I removed the touchstart event from that bit of code and so far no errors - hard to say for sure as it didn't always happen.  But the ammount of testing I have done would have triggered it .
0 Kudos
MatthewLofgren
Occasional Contributor
I have been banging my head against the wall for a while with a similar issue.

Turns out it was <a> tag that I was using as a 'zoom to' link.

<div id='featureListDiv'><a href='javascript:;' class='zoomFeatureAnchor'>zoom to</a> ......


on(dom.byId("featureListDiv"), ".zoomFeatureAnchor:click", zoomFeature);


From link below:
"check your application for instances of <a> tags which don't
go anywhere (e.g. have href="javascript:") but also aren't having their
events canceled, and make sure to cancel their events"

or

"So, this was a really weird issue that ended up being fixed by a wild guess. The thing that was setting IE9+ off was clicking the a tags in the navigation controls. Changing them to spans (which is something we had a mind to do anyway) resolved the issue."

See http://dojo-toolkit.33424.n3.nabble.com/Weird-TabContainer-Tabs-Title-behavior-IE9-Dojo-1-8-1-td3992...
and
https://github.com/SitePen/dgrid/issues/379#issuecomment-14877163

So I changed to this and it finally seems ok.
<div id='featureListDiv'><span class='zoomFeatureAnchor'>zoom to</span> ....
0 Kudos
AdrianMarsden
Occasional Contributor III
Bump (again)

This issue seems to have re-appeared with 3.9 - I googled it and found this thread and was amazed that I had a) started it and b) answered it!

Made the same change again and so far so good.
0 Kudos
KenBuja
MVP Esteemed Contributor
You should mark the question as answered, even if it's your own post that's the answer. This will help others as they search on this topic in the future.
0 Kudos
JeffPace
MVP Alum
take solace in the fact that you are not the only one to google and find you answered your own question.
I have done it as well

Sometimes I think I post on the forum simply as a way of writing something down on a post-it that I am less likely to lose.
0 Kudos
AdrianMarsden
Occasional Contributor III
You should mark the question as answered, even if it's your own post that's the answer. This will help others as they search on this topic in the future.


Mmm not sure about that - as I am part of a IT section we have firm rules over closing stuff.  My solution we'd regard as a "work around" a fix that gets the user past the problem but without curing the actual problem.

The problem is that either the API has a issue with IE10 and the touch part of the function I edit.  Or my code causes issues when calling the API.

It'll be nice if one of the Esri devs commented on this thread to give a indication if this is a known issue.

Cheers

ACM
0 Kudos