DYN-10493: Fix crash in Getting Started guided tour#17111
Merged
jasonstratton merged 1 commit intoMay 19, 2026
Conversation
… 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>
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-10493
Contributor
There was a problem hiding this comment.
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.HighlightPortto skip port highlighting when the port container/grid isn’t available yet, avoiding anArgumentNullExceptionduring tour initialization.
|
Contributor
Author
|
/cherrypick |
3 tasks
|
Successfully created backport PR for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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.HighlightPortcallsItemContainerGenerator.ContainerFromItemto locate the WPF container for a port, then passes the result toCreateRectangle.ContainerFromItemcan returnnullwhen theItemsControlhasn'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 whereHighlightPortreads it. The resultingnullreachedNameScope.SetNameScopeinsideCreateRectangle, which throwsArgumentNullException("dependencyObject").Key changes:
mainGridinHighlightPort(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 to4.1.1Full 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)