This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Using a OrthogonalLayout in a simple graph with 18 nodes and 39 edges gives a StackOverflowError exception. The stacktrace show that DirectionalGraph.computeLongestPathLength is being called recursively too many times. java.lang.StackOverflowError at java.util.HashMap$KeyIterator.<init>(HashMap.java:826) at java.util.HashMap$KeyIterator.<init>(HashMap.java:826) at java.util.HashMap.newKeyIterator(HashMap.java:840) at java.util.HashMap$KeySet.iterator(HashMap.java:874) at java.util.HashSet.iterator(HashSet.java:153) at org.netbeans.modules.visual.graph.layout.orthogonalsupport.DirectionalGraph.computeLongestPathLength(DirectionalGraph.ja va:524) at org.netbeans.modules.visual.graph.layout.orthogonalsupport.DirectionalGraph.computeLongestPathLength(DirectionalGraph.ja va:528) at org.netbeans.modules.visual.graph.layout.orthogonalsupport.DirectionalGraph.computeLongestPathLength(DirectionalGraph.ja va:528) at org.netbeans.modules.visual.graph.layout.orthogonalsupport.DirectionalGraph.computeLongestPathLength(DirectionalGraph.ja va:528)
Created attachment 80820 [details] graph file that works ok
Created attachment 80821 [details] graph file that gives a NullPointerException
I can only get the StackOverflowError when using certain names for the LabelWidgets in the graph. If I change those names (but still the same graph structure) to the ones in a.dot (see http://www.netbeans.org/nonav/issues/showattachment.cgi/80821/a.dot) then I get a NullPointerException instead java.lang.NullPointerException at org.netbeans.modules.visual.graph.layout.orthogonalsupport.GTPlanarizer.insertEdge(GTPlanarizer.java:857) at org.netbeans.modules.visual.graph.layout.orthogonalsupport.GTPlanarizer.insertRemainingEdges(GTPlanarizer.java:818) at org.netbeans.modules.visual.graph.layout.orthogonalsupport.GTPlanarizer.createPlanarSubgraphs(GTPlanarizer.java:138) If I use c.dot (http://www.netbeans.org/nonav/issues/showattachment.cgi/80820/c.dot) that still have the same structure as a.dot then it works fine.
Created attachment 80823 [details] NullPointerException stacktrace