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

"Out of stack space" JS exception on Kendo upgrade

4 Answers 70 Views
TreeView
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:44 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:

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

 

4 Answers, 1 is accepted

Sort by
0
Jason
Top achievements
Rank 1
answered on 31 May 2017, 04:48 PM

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

Jason

0
Accepted
Plamen
Telerik team
answered on 01 Jun 2017, 01:15 PM
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.
0
Jason
Top achievements
Rank 1
answered on 01 Jun 2017, 01:32 PM

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

0
Jason
Top achievements
Rank 1
answered on 01 Jun 2017, 02:11 PM

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

Tags
TreeView
Asked by
Jason
Top achievements
Rank 1
Answers by
Jason
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or