microsoft / microsoft/automatic-graph-layout
NullReferenceException in >GraphViewer.CreateRectToFillCanvas() when re-assigning the graph
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 319
- Avg merge
- 38m
- Merged PRs (30d)
- 1
Description
hi, when using the AutomaticGraphLayoutControl, assigning a graph, then assigning null and then assigning the same graph (I didn't test with a different graph...), a NRE is thrown because the Parent of the GraphCanvas was null.
this is fixed by changing the way AutomaticGraphLayoutControl.SetGraph() handles the re-assignment case... just some if statements need to be changed.
i have a fix in my fork. should i PR it?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with AutomaticGraphLayoutControl.SetGraph() and follow the re-assignment path into GraphViewer.CreateRectToFillCanvas(). Reproduce assigning a graph, assigning null, and assigning the same graph again; done means the sequence no longer throws a NullReferenceException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100