"Out of stack space" JS exception on Kendo upgrade

5 posts, 1 answers
  1. Jason
    Jason avatar
    5 posts
    Member since:
    Sep 2016

    Posted 31 May 2017 Link to this post

    I'm getting an "Out of stack space" exception on a datasource call when upgrading Kendo from v2016.1.412 to v2017.2.504 (jQuery 1.12.3, AngularJS 1.6.2).  Everything works kosher on the previous version, but on upgrade, the following line causes the exception: $scope.tree.setDataSource(ds);.  It bombs out before the data call is ever made, which is successful.  

     

    Here is the datasource:

    e.success(orgs); on line 16 still hits, after the exception is thrown setting the datasource.  The treeview never ends up loading any of the data in the UI.

     

    Any help would be great, thanks.

    Jason

     

    01.Factory.getOrgDS = function () {
    02.    var ds = new kendo.data.HierarchicalDataSource({
    03.        transport: {
    04.            read: function (e) {
    05.                $http.post(env.baseUrl + '/TreeView/GetTreeData', {
    06.                    maxLevelEntity: groatSession.maxLevel, year: helper.getFiscalYear(), branch: groatSession.branch
    07.                }).then(function (response) {
    08.                    var orgs = response.data;
    09. 
    10.                    //remove air force clinics
    11.                    for (var i = 0; i < orgs.length; i++) {
    12.                        checkCurrentLevel(orgs[i]);
    13.                        orgs[i] = removeAFClinics(orgs[i]);
    14.                    }
    15. 
    16.                    e.success(orgs);
    17.                });
    18.            }
    19.        },
    20.        schema: {
    21.            model: {
    22.                id: "EntityID",
    23.                children: "Children",
    24.                hasChildren: function (item) {
    25.                    if (item.Levelname == "clinic" || (item.Levelname == "base" && helper.isAirForce(groatSession, env, item))) {
    26.                        return true;
    27.                    }
    28. 
    29.                    return item.Children && item.Children.length > 0;
    30.                }
    31.            }
    32.        },
    33.        filter: [
    34.                { field: "hide", operator: "eq", value: undefined },
    35.                { field: "hide", operator: "neq", value: true }
    36.        ],
    37.        sort: { field: 'EntityDescInt', dir: 'desc' }
    38.    });
    39. 
    40.    return ds;
    41.}

     

  2. Jason
    Jason avatar
    5 posts
    Member since:
    Sep 2016

    Posted 31 May 2017 in reply to Jason Link to this post

    Sorry for the double post, I got an error "bad verb" posting the first time, didn't know it went through.

    Jason

  3. Answer
    Plamen
    Admin
    Plamen avatar
    3047 posts

    Posted 01 Jun 2017 Link to this post

    Hi Jason,

    Would you please try to isolate the issue to a sample dojo with some dummy data in the dataSource so we could inspect it and be more helpful with a possible solution?

    You can also have a look at this issue that was recently found and fixed in case your is the same. That was caused by the empty array items in the data.

    Regards,
    Plamen
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  4. Jason
    Jason avatar
    5 posts
    Member since:
    Sep 2016

    Posted 01 Jun 2017 Link to this post

    Plamen, my employer blocks dojo, and all of this in on an internal system.  I'll see if I can find an alternate way of demonstrating.

     

    Thanks,

    Jason

  5. Jason
    Jason avatar
    5 posts
    Member since:
    Sep 2016

    Posted 01 Jun 2017 in reply to Plamen Link to this post

    That was it, thanks!  My co-worker and I can't figure out why that filter property is set, so we're just going to remove it.  Nothing in production yet, so the risk of affecting something else by changing it is minimal to none. 

    Appreciate the help!

    Jason

Back to Top