IE Error

Nov 22, 2010 at 2:38 AM
Edited Nov 22, 2010 at 2:41 AM

Hi,

I want to tell you the IE's error.After a while IE tells me the wrong:

Stack overflow at line : 0.


And the page in IE stops to update message,but send the message to server.There are not the similar warning in Firefox or Chrome.

My IE's version is 7,working in windows 2003.

 

Pu Chengcheng

Nov 23, 2010 at 2:51 AM
Edited Nov 23, 2010 at 2:53 AM

My boss told me to add the code { "&mm" + Math.random() } after { encodeSubscriptionParameters() } could solve the problem.

After that,the error never happen again in IE.

But I don't konw why it can be solved.

The edited codes as following:

 

ensurePolling = function () {
        if (!$.pubsub._Subscription._poll && $.pubsub._Subscription._subsCount > 0) {
            delete $.pubsub._Subscription._mimePartIndex;
            delete $.pubsub._Subscription._mimeBoundary;
            $.ajax({
                url: $.pubsub.baseAddress + "subscriptions/volatile?" + encodeSubscriptionParameters() + "&mm" + Math.random(),
                processData: false,
                beforeSend: function (x) {
                    $.pubsub._Subscription._poll = x;
                },
                success: function (d, s, x) {
                    if (x.explicitlyAborted) {
                        delete $.pubsub._Subscription._poll;
                        ensurePolling();
                    }
                    else {
                        var contenttype = x.getResponseHeader('Content-type');
                        if (contenttype && contenttype.match(/multipart\/mixed/)) {
                            processMime(x);
                        }
                        delete $.pubsub._Subscription._poll;
                        ensurePolling();
                    }
                },
                error: function (x, s, e) {
                    faultAllSubscriptions(x, "HTTP long poll has failed. All subscriptions are faulted.");
                }
            });
        }
    }

 

Coordinator
Nov 24, 2010 at 11:57 PM

Pu, thank you for reporting the issue. What is the application you are using - is it one of the included samples? What are the exact steps to reproduce this issue?

Nov 25, 2010 at 1:52 AM
Edited Nov 25, 2010 at 6:17 AM

The application I'm using is your Demo,the chat room.

The exact steps to reproduce this issue is that:

First,Run the VS Project by visual studio 2010 to start the service.

Second,Visit the site that I build http://192.168.57.54/laharsubtest/jquery.chat.html?id=2&backend=memory in IE and Firefox.

Third,Talk in IE and Firefox and never stop sending message over 10 seconds.Over 1 minute,all is right.

       Next,stop talking in IE but Firefox,after 1 minute All is normal,again.

      Then,stop using them to talk.About 45 seconds,the IE show the warnning:Stack overflow at line : 0.After that,I find  I can't get fresh news from server,but I can send the news to server,and the Firefox show it which is sent from IE normally.It's seem that When the server never have any message after all are cleaned for expiring,the IE may get error.

But I add the code { "&mm" + Math.random() } after { encodeSubscriptionParameters() } in ensurePolling where in jquery.pubsub.js could solve the problem.

 

Coordinator
Dec 5, 2010 at 2:33 AM

The issue was related to caching of the subscription's HTTP long poll response. It is now fixed in the dev branch in changeset http://laharsub.codeplex.com/SourceControl/changeset/changes/aefc91ad70cf. The fix is to prevent subscription response caching by adding Cache-Control: no-store HTTP header to the subscription HTTP long poll response in the Laharsub server itself. The fix will be included in the next binary release of Laharsub. 

Dec 5, 2010 at 2:56 AM

Thank you,tjanczuk.