/    Sign up×
Community /Pin to ProfileBookmark

IE bug: stack overflow

Hi, all.

For all, I’m sorry for my english. Long time no practicy.

So… I have a followed problem.

There is some recursive method that convert JS variables to string format. By this convertion appears an error: stack overflow at line 0.

Looks like ethernal function’s call, but…

  • 1.

    Error exist by IE only. Any other browsers work perfectly.

  • 2.

    By IE that error also not required. That appears or not by absolutly equival entry parametrs.

  • 3.

    Actually, Script complete finished themself 100% correctly. Single difference is – message about stack overflow.

  • 4.

    Calls match is very small (less than 15), Data size – too.

  • After all different trys to fix that bug with traditional developer’s tricks, I’m sure – that is not a problem of my script, but specific problem of IE. I’m web-developer, and this kind of problems is not in my competence.

    I will very grateful for any help.

    to post a comment
    JavaScript

    2 Comments(s)

    Copy linkTweet thisAlerts:
    @FlammbergauthorJul 26.2009 — That's the code...
    [CODE]
    this.PHPon=function(_Data, _CallSelf)
    {
    if ( Util().IsScalar(_Data) ) return this.PHPonScalar(_Data);
    ////
    if ( Util().IsArray(_Data) ) return this.PHPonArray(_Data);
    ////
    if ( Util().IsFunction(_Data.PHPon) && _CallSelf ) return _Data.PHPon();
    ////
    if ( _Data._Class_ ) return this.PHPonObject(_Data);
    ////
    return this.PHPonHash(_Data);
    }
    ////
    this.PHPonScalar=function(_Data)
    {
    if ( Util().IsBool(_Data) ) return _Data?"true":"false";
    ////
    return "'"+(_Data+"").replace(/'/g, "`")+"'";
    }
    ////
    this.PHPonArray=function(_Data)
    {
    var Str="";
    ////
    for (var i=0; i<=_Data.length-1; i++)
    {
    if ( i==0 )
    {
    Str=this.PHPon(_Data[i], true);
    }
    else
    {
    Str+=", "+this.PHPon(_Data[i], true);
    }
    }
    ////
    return "array("+Str+")";
    }
    ////
    this.PHPonObject=function(_Data)
    {
    var Str="'_Class_'=>'"+_Data._Class_+"'";
    var Content=Util().VectorArea(_Data, "PHPon");
    ////
    for (var Key in Content.Props)
    {
    if ( Util().IsFunction(_Data[Key]) ) continue;
    if ( Content.Ex[Key] ) continue;
    if ( Key.match(/^_w+_$/) ) continue;
    ////
    Str+=", '"+Key+"'=>"+this.PHPon(_Data[Key], true);
    }
    ////
    return "Exchange::ToObject(array("+Str+"))";
    }
    ////
    this.PHPonHash=function(_Data)
    {
    var Str="";
    ////
    for (var Key in _Data)
    {
    if ( Str=="" )
    {
    Str="'"+Key+"'=>"+this.PHPon(_Data[Key], true);
    }
    else
    {
    Str+=", '"+Key+"'=>"+this.PHPon(_Data[Key], true);
    }
    }
    ////
    return "array("+Str+")";
    }

    [/CODE]


    And that is an example for entry data with that script gets sometimes an error message...

    [CODE]
    [
    {
    CustomerActionID: 1,
    CustomerActionStart: '01.08.2009',
    CustomerActionFinish: '15.08.2009',
    ActionID: 1,
    ActionName: 'SomeAction'
    ...
    }
    ]

    [/CODE]
    Copy linkTweet thisAlerts:
    @FlammbergauthorJul 27.2009 — Problem's canceled. I've found a worked variant.
    ×

    Success!

    Help @Flammberg spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 4.29,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,

    tipper: @Samric24,
    tipped: article
    amount: 1000 SATS,
    )...