Results 1 to 2 of 2

Thread: 0x800a001c - Microsoft JScript runtime error: Out of stack space

  1. #1
    Join Date
    Jul 2014

    0x800a001c - Microsoft JScript runtime error: Out of stack space

    I need to display all the records in a kendo view tree view at one go. Means at load of tree, I want all the nodes of my hierarchical data to be displayed. When data is less, I am getting no issue. But when my data is high, I am getting stack overflow error at line number:3, say.

    When I debug the visual studio code, I get : "0x800a001c - Microsoft JScript runtime error: Out of stack space"

    Actually what is happening, when a child node is displayed, kendo checks for the parent node. So if we have multiple child nodes, recursive calls are happening to get the parent node. With huge data, recursive calls are huge. Hence getting stack overflow error. Can anyone here help me out what I should change in my code.

    I am using MVC for this. And 'treeData' contains json data. The data is coming from the service in hierarchical format.

    _intializeStudentTree: function () {
    var abc = this;
    var treeData = new kendo.data.HierarchicalDataSource({
    transport: {
    read: {
    url: "controller1/method1",
    dataType: "json",
    type: "POST",
    contentType: "application/json; charset=utf-8"
    parameterMap: function (options) {
    options['StudentID'] = abc.options.list.StudentId;
    options['StudentDetails'] = abc.options.list.StudentDetails;
    return JSON.stringify(options);
    schema: {
    model: {
    children: "ChildRecords"

    abc.ListTree = abc.element.find('.tree-view').kendoTreeView({
    template: kendo.template($("#temp-treeview").html()),
    animation: {
    dataSource: treeData,
    dataTextField: ["StudentLevel"],
    loadOnDemand: false,
    dataBound: function () {

  2. #2
    In order to hit that error, you'd have to be trying to load in excess of a GIGABYTE of JS variables, or your code is using a painfully bad recursive call or hitting up against some framework's code bloat ... and since you've got all those pesky dollar signs in there -- little from column A, little from column B?

    It sounds like you're just flat out sending too much data client-side at once.

    The "stack" is a section of memory used to store variables that are not retained long term; this includes function variables in non-object functions (though that's iffy depending on the actual JS engine, some are really sucktastic at garbage collection), return vectors and states for function calls, and a host of other temporary values.

    Given the gross inefficiencies of the JS object model, it's likely your parsed tree is just too big for the browser's stack to handle it... shame JS doesn't have real pointers and a proper 'heap' in addition to the stack... but that's an interpreted language for you.

    Is there any way you can shift more of the processing server-side so you're not trying to download a massive tree data-set to the browser where bandwidth alone would be a half hour page load (given how much you'd have to have in memory to get a stack error in IE)

    I hit up against a similar issue about eight years ago where I client wanted a massive data-set (1000 master records of 40 sub-records apiece) where it ended up being so many DOM elements you couldn't even scroll through it. The entire idea just wasn't viable as there's just some things the HTML and JS engines cannot handle.
    Last edited by deathshadow; 07-25-2014 at 05:00 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center