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

Try fixing the PTVS crash #8066

Merged
merged 2 commits into from
Nov 13, 2024
Merged

Try fixing the PTVS crash #8066

merged 2 commits into from
Nov 13, 2024

Conversation

StellaHuang95
Copy link
Contributor

fixes #8060

I tried multiple ways including what users described in all similar issues but still wasn't able to repro the crash. From reading the call stacks looks like it's trying to call GetProjectProperty on a disposed PythonProjectNode object. So adding the check to return early if it's disposed. I did manually testing on all different scenarios and it doesn't crash or affect any behaviors. I will ask users to try again once the fix is shipped.

@StellaHuang95 StellaHuang95 requested a review from a team as a code owner November 13, 2024 21:40
@@ -1082,7 +1085,7 @@ protected override void Dispose(bool disposing) {

_recreatingAnalyzer.Dispose();
}

_isDisposed = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it would be better to put this at the top before all the other things are removed? (In case one of them throws an exception.

Then you can also check if it's already disposed or not and throw an exception if it is.

Copy link

sonarcloud bot commented Nov 13, 2024

@StellaHuang95 StellaHuang95 merged commit 8155e6e into main Nov 13, 2024
5 checks passed
@StellaHuang95 StellaHuang95 deleted the crash branch November 13, 2024 22:29
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.

Error Displayed when Git Hub IDE is loading
2 participants