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

NPE in SelfLoopComponentDependencyGraphCalculator #417

Closed
spoenemann opened this issue Apr 15, 2019 · 1 comment · Fixed by #418
Closed

NPE in SelfLoopComponentDependencyGraphCalculator #417

spoenemann opened this issue Apr 15, 2019 · 1 comment · Fixed by #418
Labels
bug Erroneous behaviour.
Milestone

Comments

@spoenemann
Copy link
Member

node N1 {
	port P1
	port P2
	port P3
	port P4
	port P5
	port P6
}
node N2 {
	port P7
}
edge E1: N1.P4 -> N1.P1
edge E2: N1.P5 -> N1.P2
edge E3: N1.P6 -> N1.P3
edge E4: N1.P6 -> N2.P7

leads to

java.lang.NullPointerException
	at org.eclipse.elk.alg.layered.p5edges.loops.calculators.SelfLoopComponentDependencyGraphCalculator.calculateEdgeOrder(SelfLoopComponentDependencyGraphCalculator.java:242)
	at org.eclipse.elk.alg.layered.p5edges.loops.calculators.SelfLoopComponentDependencyGraphCalculator.calculateEdgeOrder(SelfLoopComponentDependencyGraphCalculator.java:302)
	at org.eclipse.elk.alg.layered.p5edges.loops.calculators.SelfLoopComponentDependencyGraphCalculator.calculateEdgeDependecies(SelfLoopComponentDependencyGraphCalculator.java:200)
	at org.eclipse.elk.alg.layered.intermediate.SelfLoopPlacer.process(SelfLoopPlacer.java:85)
	at org.eclipse.elk.alg.layered.intermediate.SelfLoopPlacer.process(SelfLoopPlacer.java:1)
	at org.eclipse.elk.alg.layered.ElkLayered.layout(ElkLayered.java:592)
	at org.eclipse.elk.alg.layered.ElkLayered.doLayout(ElkLayered.java:144)
	at org.eclipse.elk.alg.layered.LayeredLayoutProvider.layout(LayeredLayoutProvider.java:57)
	at org.eclipse.elk.core.RecursiveGraphLayoutEngine.executeAlgorithm(RecursiveGraphLayoutEngine.java:248)
	at org.eclipse.elk.core.RecursiveGraphLayoutEngine.layoutRecursively(RecursiveGraphLayoutEngine.java:216)
	at org.eclipse.elk.core.RecursiveGraphLayoutEngine.layout(RecursiveGraphLayoutEngine.java:94)
	at org.eclipse.elk.core.RecursiveGraphLayoutEngine.layout(RecursiveGraphLayoutEngine.java:72)
	at org.eclipse.elk.core.service.DiagramLayoutEngine.layout(DiagramLayoutEngine.java:718)
	at org.eclipse.elk.core.service.DiagramLayoutEngine.layout(DiagramLayoutEngine.java:650)
	at org.eclipse.elk.core.service.DiagramLayoutEngine$1.execute(DiagramLayoutEngine.java:400)
	at org.eclipse.elk.core.service.util.MonitoredOperation$1.run(MonitoredOperation.java:234)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
@lredor
Copy link
Contributor

lredor commented May 21, 2019

This fix seems to also fixes #382. At least, it fixes the use case that I added.

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

Successfully merging a pull request may close this issue.

2 participants