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

Avoid crashing during shutdown of the package #31

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

davkean
Copy link
Contributor

@davkean davkean commented Jul 21, 2023

SwitchToMainThreadAsync throws OperationCancelledException if the specified cancellation token is signalled. This crashes Visual Studio if timer fires during Visual studio shutdown.

This has had 210 crashes in past 21 days.

SwitchToMainThreadAsync throws OperationCancelledException if the specified cancellation token is signalled. This crashes Visual Studio if timer fires during Visual studio shutdown.
@davkean
Copy link
Contributor Author

davkean commented Jul 21, 2023

Diff is much easier to read if you hide whitespace changes:
image

@davkean
Copy link
Contributor Author

davkean commented Aug 21, 2023

Sorry to bother you @Piedone could I get a review on this and get this merged in?

@Piedone
Copy link
Member

Piedone commented Aug 21, 2023

Thank you for your valuable contribution!

Sorry for not replying earlier; the Create Jira issues for community activities workflow should've run and thus notified us about you opening this PR, I don't know why this didn't happen. The build didn't run for your code either, and while that should require an approval, there's no option to approve here... It seems something got messed up by GitHub Actions for this PR. This is the reason the code analyzers didn't tell you what I just did with my small remark.

Once you apply the code suggestion, please re-request review. Hopefully, the commit will now trigger the build workflow.

@Piedone
Copy link
Member

Piedone commented Aug 21, 2023

And yes, now it worked! Running the build now.

BTW do you use our extension for some tests in the VS team, or did you find this bug during your private work?

@davkean
Copy link
Contributor Author

davkean commented Aug 21, 2023

Our telemetry data captured this crash, and I just investigated it. Thanks for getting on this.

@Piedone Piedone merged commit d4a028d into Lombiq:dev Aug 21, 2023
2 checks passed
@Piedone
Copy link
Member

Piedone commented Aug 21, 2023

I see, awesome! I don't think we'd have noticed this issue otherwise.

I'll do a release now too.

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.

2 participants