Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property 'next' of null #320

Open
lisp opened this issue Apr 19, 2021 · 0 comments
Open

Uncaught TypeError: Cannot read property 'next' of null #320

lisp opened this issue Apr 19, 2021 · 0 comments

Comments

@lisp
Copy link

lisp commented Apr 19, 2021

an attempt to layout an apparently innocuous graph leads to that error.
it appears to be a group with a zero length leaves array.
that is, if the first group memer is removed, the layout complete.
otherwise it loops, reiterating the error indefinitely.

the stack trace is

rectangle.js:261 Uncaught TypeError: Cannot read property 'next' of null
at f (rectangle.js:261)
at Object.findXNeighbours [as findNeighbours] (rectangle.js:272)
at generateConstraints (rectangle.js:235)
at generateGroupConstraints (rectangle.js:204)
at rectangle.js:189
at Array.reduce ()
at generateGroupConstraints (rectangle.js:189)
at generateXGroupConstraints (rectangle.js:295)
at Projection.project (rectangle.js:450)
at Projection.xProject (rectangle.js:419)

the graph is

{
"nodes": [
{
"index": 0,
"name": "withSubquery",
"width": 32,
"height": 10
},
{
"index": 1,
"name": "internal",
"width": 32,
"height": 10
},
{
"index": 2,
"name": "withServiceClause",
"width": 32,
"height": 10
},
{
"index": 3,
"name": "asImport",
"width": 32,
"height": 10
},
{
"index": 4,
"name": "1111",
"width": 32,
"height": 10
},
{
"index": 5,
"name": "11",
"width": 32,
"height": 10
},
{
"index": 6,
"name": "1",
"width": 32,
"height": 10
},
{
"index": 7,
"name": "0",
"width": 32,
"height": 10
},
{
"index": 8,
"name": "1111",
"width": 32,
"height": 10
},
{
"index": 9,
"name": "1111",
"width": 32,
"height": 10
},
{
"index": 10,
"name": "1111",
"width": 32,
"height": 10
}
],
"links": [ { "source": 0, "target": 1 } ],
"groups": [
{
"leaves": []
},
{
"leaves": [ 8 ]
},
{
"leaves": [ 9 ]
},
{
"leaves": [ 10 ]
},
{
"leaves": [ 0, 1, 2, 3 ]
}
]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant