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.
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
crash handlers for Dynamo #14826
crash handlers for Dynamo #14826
Changes from all commits
e9c118a
4c00439
f4f9ef1
827f69f
50deee5
8baed4f
8fd59b6
b25cdf7
f3602c9
fb1de9b
ca7dec4
9b82beb
ef66fb3
bebb02e
a3990d6
5e075cf
0673866
bdff3b1
f15f891
36dd65c
ea9e968
890672a
8d864f2
6799a8c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a null check here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually can be null. ShowCrashWindow could be called like ShowCrashWindow(null, new CrashPromptArgs());
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this was initially added to
DynamoModel
. Can you explain why it has been added here instead ofDynamoModel
and the same forTaskScheduler.UnobservedException
? SinceDynamoModel
is instantiated before the view model, there could be code that's uncaught by any of these handlers.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would require more refactor. CrashTool is in the DynamoCoreWPF project. It (along with other CrashPromptArgs) uses DynamoViewModel ..which I cannot access from DynamoCore and also may not exist yet depending on when the crash happens. Also if DynamoViewModel is created...then we would want all exception handlers to start using the DynamoViewModel. and stop the DynamoModel handler ?
I would leave that for another PR...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Maybe we should decouple the CER crash prompt from DynamoViewModel. Currently, it needs the view model to show the dialog. Would be good to remove the dependency on the view model for this dialog if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am trying that now, but there are too many changes for this PR
I will create a followup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added Try Catch in the
WebView_NavigationCompleted
body.Looks like all exceptions thrown in WebView_NavigationCompleted are silenced by webview2.
SplashScreen.WebView_NavigationCompleted
is particularly sensitive because Dynamo views are initialzied inside this method and if an exceptions is thrown, SplashScreen will seem like it hangs.