-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Uncaught RangeError: Maximum call stack size exceeded #1625
Comments
Hi, It would be great if you can make a jsbin so we can reproduce this. Cheers
|
Hold on a second... |
My code is on github here. A live example is at http://luke.deentaylor.com/wikipedia/. If you visit the page in Chrome, you will occasionally encounter a |
Take your time. I'll be back from holidays next week. Is this also happening in older versions? Which version are you using? Cheers
|
I'm using a version which I downloaded early saturday. Has it changed in the last 2 days? |
Actually, a new version was released today. Can you try that?
|
Yes, I will. |
Turns out it's not just chrome, I see this behavior in Safari as well. My mistake. |
Good to know that it's probably happening in all browsers. How can we reproduce your issue? The stack trace of the Error in your screenshot gives a little clue but it seems to be some older versions of vis.js. |
I believe I am using the latest version of vis. I frequently get the error On Tue, Feb 2, 2016 at 3:54 AM Jos de Jong notifications@github.com wrote:
|
Can you create a jsbin to demonstrate the issue? If we can't reproduce it we can't fix it. |
Sure, I'll try and find some time tonight. On Tue, Feb 2, 2016 at 7:16 AM Jos de Jong notifications@github.com wrote:
|
It took me a while, but I finally figured out the minimum to recreate this error in this jsbin: http://jsbin.com/kaxejaf/edit?html,js,console,output We've been getting this due to using the angular-visjs library. That angular-visjs library makes a call to
This then causes several calculations, including the calculation of Some interesting things to note:
I suppose this could be a bug in the angular library, but I thought it was more likely that my jsbin (which does not use angular at all) should not error out. |
Also, there have to be at least 2 nodes in the graph to cause the error; no edges required. |
Also, had to turn off `avoidOverlap` for now. This option only has a real impact when physics are turned off and new nodes are brought into the graph visualization. They will now overlap. We can presumably turn this option back on when this bug is fixed: almende/vis#1625
@patrickmcelwee Thanks for the detailed analysis. I'll debuged the problem a little using your example: <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script type="text/javascript" src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="network" style="border:1px solid black;"></div>
<script type="text/javascript">
var data = {
nodes: new vis.DataSet([
{ id:1, label:"111111111" },
{ id:2, label:"222222222" }
])
};
var options = {
width: '100%',
height: '500px',
nodes: {
shape: 'ellipse'
},
physics: {
barnesHut: {
avoidOverlap: 1
}
}
};
var container = document.getElementById('network');
var network = new vis.Network(container, data, options);
network.setOptions(options);
</script>
</body>
</html> I'll think I found the problem. First the Shapes get initialized, then the options get applied. If the options overwrite the default shape (here with With #2005 I provides a fix for this. |
Nice. |
@controversial Still not in master. But it will be in v4.17 |
Ok. No rush. Glad to see vis has some active development now.
|
I sometimes get an
Uncaught RangeError: Maximum call stack size exceeded
in my network, which freezes the whole thing until the page is refreshed. It's possibly related to this, which describes a similar issue with binding click events. This is present on both safari and chrome.This issue often occurs when creating duplicate nodes, which does produce an intended error, but sometimes also produces this
RangeError
, which freezes execution completely.The text was updated successfully, but these errors were encountered: