This is a migrated thread and some comments may be shown as answers.

"Out of stack space" JS Exception on Kendo UI Upgrade

2 Answers 54 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 31 May 2017, 04:46 PM

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:

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.}

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

2 Answers, 1 is accepted

Sort by
0
Jason
Top achievements
Rank 1
answered on 31 May 2017, 04:49 PM
Sorry for the double post, I got an error "bad verb" posting the first time, didn't know it went through.
Jason
0
Plamen
Telerik team
answered on 02 Jun 2017, 06:08 AM
Hello,

The post conversation can be seen here.

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.
Tags
General Discussions
Asked by
Jason
Top achievements
Rank 1
Answers by
Jason
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or