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 #1779

Merged
merged 2 commits into from
Apr 3, 2015
Merged

Conversation

wschae
Copy link
Contributor

@wschae wschae commented Apr 3, 2015

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.
@wschae
Copy link
Contributor Author

wschae commented Apr 3, 2015

@tmat Can you have a look at this one?

@wschae
Copy link
Contributor Author

wschae commented Apr 3, 2015

Added TODO :) Thanks!

wschae added a commit that referenced this pull request Apr 3, 2015
Fix NullReferenceException during debugging

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).
@wschae wschae merged commit eeb8a12 into dotnet:master Apr 3, 2015
wschae added a commit that referenced this pull request Apr 4, 2015
Fix NullReferenceException during debugging

It is a port of #1779 from main.
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