Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DYN-7531 Catch WebView2 initialization exception #15685

Merged
merged 2 commits into from
Nov 27, 2024
Merged

Conversation

QilongTang
Copy link
Contributor

Purpose

Per CER report https://cer.autodesk.com/search/v2/buckets/52352002, add some code to prevent WebView2 initialization (Dynamo Home) crashing Dynamo.

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB

Release Notes

Add some code to prevent WebView2 initialization (Dynamo Home) crashing Dynamo

Reviewers

@DynamoDS/dynamo

FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

@QilongTang QilongTang added this to the 3.5 milestone Nov 22, 2024
Copy link

@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-7531

catch (Exception ex)
{
Log(ex.Message);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

any idea what exactly is crashing?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree with @pinzart90 we should know why/what is crashing.
I have seen several times that when opening the latest Dynamo (3.4 or 3.3) the HomePage is NOT being shown and instead the old one is shown but I didn't know exactly why (although is not always happening).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@RobertGlobant20 @pinzart90 I have removed the feature flag checking code for DynamoHome in 3.4 release, in that case, Dynamo home would always be the default. In the case it was not initialized correctly, then we display the legacy home. Adding such exception logging would help us understand why it was not working

@@ -1427,21 +1427,28 @@ private void LoadHomePage()
{
if (homePage == null && (startPage != null))
{
homePage = new UI.Views.HomePage();
Copy link
Contributor

Choose a reason for hiding this comment

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

if we handle the crash, will Dynamo be able to continue running ok?

Copy link
Contributor

Choose a reason for hiding this comment

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

If the home page is not shown, can Dynamo still be used ?

Copy link

github-actions bot commented Nov 22, 2024

UI Smoke Tests

Test: success. 11 passed, 0 failed.
TestComplete Test Result
Workflow Run: UI Smoke Tests
Check: UI Smoke Tests

@QilongTang
Copy link
Contributor Author

Another thing to note here is that all of these CER reports are from 3.2.2 release, so I am not sure if the crash is still reproducible in latest Dynamo.

@QilongTang
Copy link
Contributor Author

QilongTang commented Nov 22, 2024

@QilongTang QilongTang merged commit f840072 into master Nov 27, 2024
23 of 24 checks passed
@QilongTang QilongTang deleted the CatchException branch November 27, 2024 19:03
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.

4 participants