elk
elk copied to clipboard
Plain java hierarchical layout yields NPE in HierPortPosProcessor
It already seems to be fixed for 0.7.0 (at least it works for me with the snapshots), but for the record:
All hierarchical json models yield the NPE seen below. E.g.
../elk-models/realworld/ptolemy/hierarchical/algebraic_heateropentank_HeaterOpenTank.json
Layout is performed like so:
LayoutMetaDataService service = LayoutMetaDataService.getInstance();
service.registerLayoutMetaDataProviders(new LayeredMetaDataProvider());
final ElkNode elkGraph = ElkGraphJson.forGraph(graph).toElk();
final RecursiveGraphLayoutEngine engine = new RecursiveGraphLayoutEngine();
engine.layout(elkGraph, new NullElkProgressMonitor());
java.lang.NullPointerException
at org.eclipse.elk.alg.layered.intermediate.HierarchicalPortPositionProcessor.fixCoordinates(HierarchicalPortPositionProcessor.java:120)
at org.eclipse.elk.alg.layered.intermediate.HierarchicalPortPositionProcessor.process(HierarchicalPortPositionProcessor.java:72)
at org.eclipse.elk.alg.layered.intermediate.HierarchicalPortPositionProcessor.process(HierarchicalPortPositionProcessor.java:1)
at org.eclipse.elk.alg.layered.ElkLayered.layout(ElkLayered.java:593)
at org.eclipse.elk.alg.layered.ElkLayered.doLayout(ElkLayered.java:143)
at org.eclipse.elk.alg.layered.LayeredLayoutProvider.layout(LayeredLayoutProvider.java:56)
at org.eclipse.elk.core.RecursiveGraphLayoutEngine.executeAlgorithm(RecursiveGraphLayoutEngine.java:247)
at org.eclipse.elk.core.RecursiveGraphLayoutEngine.layoutRecursively(RecursiveGraphLayoutEngine.java:215)
at org.eclipse.elk.core.RecursiveGraphLayoutEngine.layoutRecursively(RecursiveGraphLayoutEngine.java:197)
at org.eclipse.elk.core.RecursiveGraphLayoutEngine.layoutRecursively(RecursiveGraphLayoutEngine.java:197)
at org.eclipse.elk.core.RecursiveGraphLayoutEngine.layout(RecursiveGraphLayoutEngine.java:93)
at org.eclipse.elk.core.RecursiveGraphLayoutEngine.layout(RecursiveGraphLayoutEngine.java:71)
at ElkSpeed.main(ElkSpeed.java:41)
@le-cds any idea which ticket could have solved this?
@le-cds any idea which ticket could have solved this?
Perhaps the orthogonal edge router refactoring, but I'm really not sure.
I feel it was only the case for the plain Java layout, which confuses me even more.
It still does no longer occur and I also don't know why it is fixed.