microsoft / automatic-graph-layout

A set of tools for graph layout and viewing
Other
1.36k stars 306 forks source link

NullReferenceException in ConstrainedDelaunayTriangulation.CdtSweeper #324

Open heliosdevkm opened 2 years ago

heliosdevkm commented 2 years 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 2 years 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 2 years ago

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

ChantalEckhardtOrtec commented 3 months ago

@heliosdevkm did you in the end get the latest nuget? I am encountering the same issue.