Skip to content

Fix crash caused when formatting document #354

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

Merged
merged 5 commits into from
Jan 25, 2017

Conversation

kapilmb
Copy link

@kapilmb kapilmb commented Jan 25, 2017

The crash was very likely due to deferred execution when enumerating through the diagnostic records returned by PowerShell invocation.

@kapilmb
Copy link
Author

kapilmb commented Jan 25, 2017

I haven't observed any crash after making this fix yet.

@kapilmb kapilmb requested a review from daviwil January 25, 2017 23:40
Copy link
Contributor

@daviwil daviwil left a comment

Choose a reason for hiding this comment

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

Hmmm... Yeah, that seems reasonable. Let's go with this and see whether anyone hits the issue again.

var sessionState = InitialSessionState.CreateDefault2();
sessionState.ImportPSModulesFromPath(scriptAnalyzerModuleInfo.ModuleBase);
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for changing that back! I felt dirty adding the other fix :)

@daviwil daviwil merged commit c080d18 into develop Jan 25, 2017
@daviwil daviwil deleted the kapilmb/fix-formatter-crash branch January 25, 2017 23:50
@daviwil daviwil added this to the 0.9.1 milestone Jan 25, 2017
@daviwil daviwil modified the milestones: 0.9.1, 0.10.0 Mar 14, 2017
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.

3 participants