-1

I have a rather large web app mostly written and tested on chromium. While testing it on IE11 it works for a while but then throws Out of stack space, and Stack Overflow at line 0. It is offering literally no way of debugging the issue. Does Internet Explorer handle circular structures differently by any chance? or does it run a limited memory per webpage. My computers task manager shows that IE is using around 1% of my memory where I have 12GB installed.

I have many Objects in this app such as the following...Not an actual snippet just an example.

var Classemployee=function(e){
  this.id=e[0];
  this.orders=[];
  this.prefrences={
    somePref:true,
    1:blah,
    ........    
    }
}

var classOrder= function(e){
  this.id=e[0];
  this.server=employees[e[1]];
  this.status=0;
  this.seats={
    1: new classSeat(this, 1),
    ..........
  
  };
  
}

var classSeat = function(parent, id){
  this.id=id;
  this.parent=parent;
  this.children=[
    new classOrderLine(this.id, this.parent, arrayOfLineItemInformation)
    
    ]
  
}

var classOrderLine(parent, order, e){
   this.id=e[0];
  this.parent=parent;
  this.order=order;
  
  
  
 }



var orders={}
currentOrder=new classOrder(e);
orders[e[0]]=currentOrder;

The only thing i can think of is IE isn't handling these circular references properly but can't find any information on this subject.

PC3TJ
  • 852
  • 5
  • 16
  • You might want to check for a memory leak specific to IE. – weirdpanda Nov 10 '15 at 06:19
  • It might as well be caused by the difference of speed between the JS interpreter of chromium and IE. If there are `setInterval(...)` patterns, it may as well get overloaded of unfinished actions. I'd first try commenting some parts of the code to see if it helps. – Frederik.L Nov 10 '15 at 06:41
  • @Frederik.L There is only 1 interval and its not using set interval but instead a recursive setTimeout on a security audit function that checks hashes of key components of the script. There are no pending AJAX operations waiting on call backs either. – PC3TJ Nov 10 '15 at 06:44
  • @PC3TJ Can the issue be reproduced on Edge? – Frederik.L Nov 10 '15 at 06:48
  • I don't have a windows 10 computer at the house. I'll have to wait till i get to the office to check. – PC3TJ Nov 10 '15 at 06:50
  • In the meantime, I'd still try commenting some parts of the code and see which part is counting toward the issue. You may check how long it takes before IE goes nuts and see if any code skipping is helping. Once you are able to locate a problematic pattern, it will be easier for us to help. I worked on a huge legacy system about a year ago, and sometimes your best friend is luck and strategy. Good luck. – Frederik.L Nov 10 '15 at 07:02

1 Answers1

0

After reviewing code further I found the problem was with a piece of code that was monitoring changes throughout the softwares memory By creating a hash of all of serialized objects. The way this code was written didn't realize there was a circular reference and continued looping through and for example storing data of:

orderline.parent.orderline.parent.etc....

PC3TJ
  • 852
  • 5
  • 16