microsoft / automatic-graph-layout

A set of tools for graph layout and viewing
Other
1.34k stars 301 forks source link

NullReferenceException in ConstrainedDelaunayTriangulation.CdtSweeper #324

Open heliosdevkm opened 1 year ago

heliosdevkm commented 1 year ago

referencing nuget AutomaticGraphLayout.GraphViewerGDI 1.1.12

Graph graph = new Graph("Test")
{
    LayoutAlgorithmSettings = new MdsLayoutSettings()
};
graph.AddEdge("B", "C");
graph.AddEdge("A", "D");
graph.AddEdge("A", "B");

var viewer = new Microsoft.Msagl.GraphViewerGdi.GViewer();
viewer.Graph = graph;
Microsoft.Msagl.Routing.ConstrainedDelaunayTriangulation.CdtSweeper.CreatePerimeterElementFromEdge(Microsoft.Msagl.Routing.CdtEdge)
Microsoft.Msagl.Routing.ConstrainedDelaunayTriangulation.CdtSweeper.CreateDoubleLinkedListOfPerimeter()
Microsoft.Msagl.Routing.ConstrainedDelaunayTriangulation.CdtSweeper.FinalizeTriangulation()
Microsoft.Msagl.Core.AlgorithmBase.Run()
Microsoft.Msagl.Core.AlgorithmBase.Run()
Microsoft.Msagl.Core.Layout.ProximityOverlapRemoval.MinimumSpanningTree.GTreeOverlapRemoval.OneIteration(Microsoft.Msagl.Core.Geometry.Point[], Microsoft.Msagl.Core.DataStructures.Size[], bool)
Microsoft.Msagl.Core.Layout.ProximityOverlapRemoval.MinimumSpanningTree.GTreeOverlapRemoval.RemoveOverlaps()
Microsoft.Msagl.Layout.MDS.MdsGraphLayout.LayoutConnectedGraphWithMds(Microsoft.Msagl.Core.Layout.GeometryGraph)
System.Threading.Tasks.Parallel.ForWorker.AnonymousMethod__1()
System.Threading.Tasks.Task.InnerInvokeWithArg(System.Threading.Tasks.Task)
levnach commented 1 year ago

Thanks for reporting! It is fixed by https://github.com/microsoft/automatic-graph-layout/commit/429fe5a18efe8cb6911b343935f5e108e0e0602a. I have never updated the nuget, please somebody step up.

heliosdevkm commented 1 year ago

Thanks! @paulovila any chances to get the latest nugets?