Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

NullReferenceException in ConstrainedDelaunayTriangulation.CdtSweeper

Open
#324 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp

Research direction

Reproduce the report using the Graph, MdsLayoutSettings, and GViewer example, then start at ConstrainedDelaunayTriangulation.CdtSweeper.CreatePerimeterElementFromEdge and follow CreateDoubleLinkedListOfPerimeter and FinalizeTriangulation. Use the stack trace to inspect the failing triangulation path; done means the sample graph completes layout without a NullReferenceException.

Written by the indexing model from the issue text.

Description

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)
Dominant language
C#
Stars
1.5k
Forks
317
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/automatic-graph-layout

All issues in microsoft/automatic-graph-layout

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.