Skip to content

DYN-10493: Fix crash in Getting Started guided tour#17111

Merged
jasonstratton merged 1 commit into
DynamoDS:masterfrom
jasonstratton:DYN-10493-guided-tour-crash
May 19, 2026
Merged

DYN-10493: Fix crash in Getting Started guided tour#17111
jasonstratton merged 1 commit into
DynamoDS:masterfrom
jasonstratton:DYN-10493-guided-tour-crash

Conversation

@jasonstratton
Copy link
Copy Markdown
Contributor

Purpose

Fixes DYN-10493: Dynamo crashes when clicking "Start Tour" on the Getting Started guided tour (Learning tab). The crash occurs on the transition from the Welcome popup to step 2 ("nodes").

Root cause: GuidesValidationMethods.HighlightPort calls ItemContainerGenerator.ContainerFromItem to locate the WPF container for a port, then passes the result to CreateRectangle. ContainerFromItem can return null when the ItemsControl hasn't generated containers yet. This is a timing race exposed by PR #16883 (DYN-7760, Feb 17 2026), which added synchronous WebView2 extension-closing before tour startup — shifting the dispatcher queue state enough to delay container generation past the point where HighlightPort reads it. The resulting null reached NameScope.SetNameScope inside CreateRectangle, which throws ArgumentNullException("dependencyObject").

Key changes:

  • Added a null guard on mainGrid in HighlightPort (GuidesValidationMethods.cs) — skips the port highlight rather than crashing if the container isn't ready. The tour continues without the visual effect.

Regression introduced in: PR #16883 (DYN-7760, Feb 17 2026)
Not reproducible in: 4.0.2 and older
Fix targets: master, cherry-pick to 4.1.1

Full investigation: DYN-10493 DynaNote (Autodesk internal)

Declarations

Release Notes

Fixed a crash that occurred when clicking "Start Tour" on the Getting Started guided tour (Learning tab).

Reviewers

(FILL ME IN)

FYIs

(FILL ME IN, Optional)

… step 2

`HighlightPort` passes the result of `ContainerFromItem` through
`ChildOfType<Grid>` to `CreateRectangle`. `ContainerFromItem` can return
null when the ItemsControl hasn't generated containers yet — a timing
race exposed by PR DynamoDS#16883 (DYN-7760) which added synchronous WebView2
extension-closing before tour startup. The null reached
`NameScope.SetNameScope` and threw `ArgumentNullException("dependencyObject")`.

Guard: if `mainGrid` is null, return early and skip the port highlight
rather than crash. The tour continues without the visual effect.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 19, 2026 18:04
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-10493

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a guided tour startup crash in Dynamo’s Learning tab by preventing HighlightPort from passing a null visual container into the highlight-rectangle creation path when WPF hasn’t generated the port’s item container yet.

Changes:

  • Add a null guard in GuidesValidationMethods.HighlightPort to skip port highlighting when the port container/grid isn’t available yet, avoiding an ArgumentNullException during tour initialization.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Member

@johnpierson johnpierson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@jasonstratton jasonstratton merged commit d7bd3aa into DynamoDS:master May 19, 2026
32 of 34 checks passed
@jasonstratton jasonstratton added this to the 4.1.1 milestone May 20, 2026
@jasonstratton
Copy link
Copy Markdown
Contributor Author

/cherrypick

@github-actions
Copy link
Copy Markdown

Successfully created backport PR for RC4.1.1_master:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants