{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/3962","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/3962/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/3962/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/3962/events","html_url":"https://github.com/dotnet/roslyn/issues/3962","id":95251325,"number":3962,"title":"NRE in completion when typing in Interactive window","user":{"login":"amcasey","id":10508071,"avatar_url":"https://avatars.githubusercontent.com/u/10508071?v=3","gravatar_id":"","url":"https://api.github.com/users/amcasey","html_url":"https://github.com/amcasey","followers_url":"https://api.github.com/users/amcasey/followers","following_url":"https://api.github.com/users/amcasey/following{/other_user}","gists_url":"https://api.github.com/users/amcasey/gists{/gist_id}","starred_url":"https://api.github.com/users/amcasey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amcasey/subscriptions","organizations_url":"https://api.github.com/users/amcasey/orgs","repos_url":"https://api.github.com/users/amcasey/repos","events_url":"https://api.github.com/users/amcasey/events{/privacy}","received_events_url":"https://api.github.com/users/amcasey/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-Interactive","name":"Area-Interactive","color":"5319e7"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Language-C%23","name":"Language-C#","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-15T17:48:35Z","updated_at":"2015-07-15T18:02:58Z","closed_at":null,"body":" 1. Open VS 2015\r\n 1. View > Other Windows > C# Interactive\r\n 1. Type ```#help``` in the C# Interactive window\r\n\r\nIt will generally (but not always?) throw a NRE because ```this.SubjectBuffer.CurrentSnapshot.GetOpenDocumentInCurrentContextWithChanges()``` returns null here:\r\n\r\n```\r\n>\tMicrosoft.CodeAnalysis.EditorFeatures.dll!Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Controller.Commit(Microsoft.CodeAnalysis.Completion.CompletionItem item, Microsoft.CodeAnalysis.Text.TextChange textChange, Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Model model, char? commitChar) Line 124\tC#\r\n \tMicrosoft.CodeAnalysis.EditorFeatures.dll!Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Controller.CommitOnEnter(out bool sendThrough, out bool committed) Line 97\tC#\r\n \tMicrosoft.CodeAnalysis.EditorFeatures.dll!Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Controller.Microsoft.CodeAnalysis.Editor.ICommandHandler<Microsoft.CodeAnalysis.Editor.Commands.ReturnKeyCommandArgs>.ExecuteCommand(Microsoft.CodeAnalysis.Editor.Commands.ReturnKeyCommandArgs args, System.Action nextHandler) Line 29\tC#\r\n \tMicrosoft.CodeAnalysis.EditorFeatures.dll!Microsoft.CodeAnalysis.Editor.CommandHandlers.AbstractCompletionCommandHandler.ExecuteCommandWorker<Microsoft.CodeAnalysis.Editor.Commands.ReturnKeyCommandArgs>(Microsoft.CodeAnalysis.Editor.Commands.ReturnKeyCommandArgs args, System.Action nextHandler) Line 81\tC#\r\n \tMicrosoft.CodeAnalysis.EditorFeatures.dll!Microsoft.CodeAnalysis.Editor.CommandHandlers.AbstractCompletionCommandHandler.Microsoft.CodeAnalysis.Editor.ICommandHandler<Microsoft.CodeAnalysis.Editor.Commands.ReturnKeyCommandArgs>.ExecuteCommand(Microsoft.CodeAnalysis.Editor.Commands.ReturnKeyCommandArgs args, System.Action nextHandler) Line 134\tC#\r\n \tMicrosoft.CodeAnalysis.EditorFeatures.dll!Microsoft.CodeAnalysis.Editor.Implementation.Commands.CommandHandlerService.ExecuteHandlers<Microsoft.CodeAnalysis.Editor.Commands.ReturnKeyCommandArgs>(System.Collections.Generic.IList<Microsoft.CodeAnalysis.Editor.ICommandHandler<Microsoft.CodeAnalysis.Editor.Commands.ReturnKeyCommandArgs>> commandHandlers, Microsoft.CodeAnalysis.Editor.Commands.ReturnKeyCommandArgs args, System.Action lastHandler) Line 97\tC#\r\n \tMicrosoft.CodeAnalysis.EditorFeatures.dll!Microsoft.CodeAnalysis.Editor.Implementation.Commands.CommandHandlerService.Execute<Microsoft.CodeAnalysis.Editor.Commands.ReturnKeyCommandArgs>(Microsoft.VisualStudio.Utilities.IContentType contentType, Microsoft.CodeAnalysis.Editor.Commands.ReturnKeyCommandArgs args, System.Action lastHandler) Line 71\tC#\r\n \tMicrosoft.VisualStudio.LanguageServices.dll!Microsoft.VisualStudio.LanguageServices.Implementation.AbstractOleCommandTarget.ExecuteReturn(Microsoft.VisualStudio.Text.ITextBuffer subjectBuffer, Microsoft.VisualStudio.Utilities.IContentType contentType, System.Action executeNextCommandTarget) Line 858\tC#\r\n \tMicrosoft.VisualStudio.LanguageServices.dll!Microsoft.VisualStudio.LanguageServices.Implementation.AbstractOleCommandTarget.ExecuteVisualStudio2000(ref System.Guid pguidCmdGroup, uint commandId, uint executeInformation, System.IntPtr pvaIn, System.IntPtr pvaOut, Microsoft.VisualStudio.Text.ITextBuffer subjectBuffer, Microsoft.VisualStudio.Utilities.IContentType contentType) Line 301\tC#\r\n \tMicrosoft.VisualStudio.LanguageServices.dll!Microsoft.VisualStudio.LanguageServices.Implementation.AbstractOleCommandTarget.Exec(ref System.Guid pguidCmdGroup, uint commandId, uint executeInformation, System.IntPtr pvaIn, System.IntPtr pvaOut) Line 45\tC#\r\n \tMicrosoft.VisualStudio.VsInteractiveWindow.dll!Microsoft.VisualStudio.InteractiveWindow.Shell.VsInteractiveWindowCommandFilter.PreLanguageCommandFilterExec(ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Line 380\tC#\r\n \tMicrosoft.VisualStudio.VsInteractiveWindow.dll!Microsoft.VisualStudio.InteractiveWindow.Shell.VsInteractiveWindowCommandFilter.CommandFilter.Exec(ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Line 142\tC#\r\n \tMicrosoft.VisualStudio.Editor.Implementation.dll!Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut)\tUnknown\r\n \tMicrosoft.VisualStudio.Editor.Implementation.dll!Microsoft.VisualStudio.Editor.Implementation.SimpleTextViewWindow.Exec(ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut)\tUnknown\r\n \tMicrosoft.VisualStudio.VsInteractiveWindow.dll!Microsoft.VisualStudio.InteractiveWindow.Shell.VsInteractiveWindow.Exec(ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut) Line 159\tC#\r\n \tMicrosoft.VisualStudio.Platform.WindowManagement.dll!Microsoft.VisualStudio.Platform.WindowManagement.DocumentObjectSite.Exec(ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut)\tUnknown\r\n \tMicrosoft.VisualStudio.Platform.WindowManagement.dll!Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.Exec(ref System.Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut)\tUnknown\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/121694769","html_url":"https://github.com/dotnet/roslyn/issues/3962#issuecomment-121694769","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/3962","id":121694769,"user":{"login":"amcasey","id":10508071,"avatar_url":"https://avatars.githubusercontent.com/u/10508071?v=3","gravatar_id":"","url":"https://api.github.com/users/amcasey","html_url":"https://github.com/amcasey","followers_url":"https://api.github.com/users/amcasey/followers","following_url":"https://api.github.com/users/amcasey/following{/other_user}","gists_url":"https://api.github.com/users/amcasey/gists{/gist_id}","starred_url":"https://api.github.com/users/amcasey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amcasey/subscriptions","organizations_url":"https://api.github.com/users/amcasey/orgs","repos_url":"https://api.github.com/users/amcasey/repos","events_url":"https://api.github.com/users/amcasey/events{/privacy}","received_events_url":"https://api.github.com/users/amcasey/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T18:02:58Z","updated_at":"2015-07-15T18:02:58Z","body":"Language-specific commands seem to work, so this may only apply to top-level commands like ```#help``` and ```#cls```."}}