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

Fix NullReferenceException during debugging #1790

Merged
merged 2 commits into from
Apr 4, 2015

Conversation

wschae
Copy link
Contributor

@wschae wschae commented Apr 3, 2015

It is a port of #1779 from main.

When opening a file during a debugging session, VS sets its buffer read-only when it is not editable. To do so, VS asks its document to the workspace but in some cases, the workspace returns nothing, causing NRE and VS Crash. In this PR, we defensively add a null check and log it to make a further investigation easier.

Noth that Issue #1204 is tracking to fix this issue directly (by enforcing the workspace to load projects before EnC).

When opening a file during a debugging session, VS sets its buffer read-only when it is not editable. To do so, VS asks its document to the workspace but in some cases, the workspace returns nothing, causing NRE and VS Crash. Issue dotnet#1202 is tracking to fix this issue directly (by enforcing the workspace to load projects before EnC). In this PR, we defensively add a null check and log it to make a further investigation easier.

(cherry picked from commit fc44da4)
Add a TODO with an issue number dotnet#1204

(cherry picked from commit a3bf5b0)
wschae added a commit that referenced this pull request Apr 4, 2015
Fix NullReferenceException during debugging

It is a port of #1779 from main.
@wschae wschae merged commit b4d12fa into dotnet:preview Apr 4, 2015
@wschae wschae deleted the previewwatson branch April 4, 2015 00:58
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