Closed DustinCampbell closed 9 years ago
Call stack is:
System.InvalidOperationException: Unexpected Null
at Roslyn.Utilities.Contract.Fail(String message) in D:\Roslyn\Open\src\Workspaces\Core\Portable\Utilities\Contract.cs:line 106
at Roslyn.Utilities.Contract.ThrowIfNull[T](T value, String message) in D:\Roslyn\Open\src\Workspaces\Core\Portable\Utilities\Contract.cs:line 73
at Microsoft.CodeAnalysis.Editor.CSharp.Formatting.Indentation.CSharpIndentationService.Indenter.GetIndentationForQueryExpression(SyntaxToken token) in D:\Roslyn\Open\src\EditorFeatures\CSharp\Formatting\Indentation\CSharpIndentationService.Indenter.cs:line 366
at Microsoft.CodeAnalysis.Editor.CSharp.Formatting.Indentation.CSharpIndentationService.Indenter.GetDefaultIndentationFromToken(SyntaxToken token) in D:\Roslyn\Open\src\EditorFeatures\CSharp\Formatting\Indentation\CSharpIndentationService.Indenter.cs:line 356
at Microsoft.CodeAnalysis.Editor.CSharp.Formatting.Indentation.CSharpIndentationService.Indenter.GetIndentationBasedOnToken(SyntaxToken token) in D:\Roslyn\Open\src\EditorFeatures\CSharp\Formatting\Indentation\CSharpIndentationService.Indenter.cs:line 278
at Microsoft.CodeAnalysis.Editor.CSharp.Formatting.Indentation.CSharpIndentationService.Indenter.GetDesiredIndentation() in D:\Roslyn\Open\src\EditorFeatures\CSharp\Formatting\Indentation\CSharpIndentationService.Indenter.cs:line 70
at Microsoft.CodeAnalysis.Editor.Implementation.SmartIndent.AbstractIndentationService.GetDesiredIndentationAsync(Document document, Int32 lineNumber, CancellationToken cancellationToken) in D:\Roslyn\Open\src\EditorFeatures\Core\Implementation\SmartIndent\AbstractIndentationService.cs:line 55
at Microsoft.CodeAnalysis.Editor.Implementation.SmartIndent.SmartIndent.GetDesiredIndentation(ITextSnapshotLine lineToBeIndented, CancellationToken cancellationToken) in D:\Roslyn\Open\src\EditorFeatures\Core\Implementation\SmartIndent\SmartIndent.cs:line 61
at Microsoft.CodeAnalysis.Editor.Implementation.SmartIndent.SmartIndent.GetDesiredIndentation(ITextSnapshotLine line) in D:\Roslyn\Open\src\EditorFeatures\Core\Implementation\SmartIndent\SmartIndent.cs:line 33
at Microsoft.VisualStudio.Text.Editor.Implementation.SmartIndentationService.GetDesiredIndentation(ITextView textView, ITextSnapshotLine line)
at Microsoft.VisualStudio.Text.Operations.Implementation.EditorOperations.PositionCaretWithSmartIndent(Boolean useOnlyVirtualSpace, Boolean extendSelection)
at Microsoft.VisualStudio.Text.Operations.Implementation.EditorOperations.<InsertNewLine>b__62_0()
at Microsoft.VisualStudio.Text.Operations.Implementation.EditorOperations.ExecuteAction(String undoText, Func`1 action, SelectionUpdate preserveCaretAndSelection, Boolean ensureVisible)
at Microsoft.VisualStudio.Text.Operations.Implementation.EditorOperations.InsertNewLine()
at Roslyn.Editor.TestApp.UI.Editor.EditorCommandTarget.Execute(CommandArgs args, Action nextHandler) in D:\Roslyn\Closed\Hosting\EditorTestApp\UI\Commands\CommandTargets\EditorCommandTarget.cs:line 77
at Roslyn.Editor.TestApp.UI.Editor.GuidCommandTarget.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(Guid& pguidCmdGroup, UInt32 commandId, UInt32 cmdExecOpt, IntPtr pvaIn, IntPtr pvaOut) in D:\Roslyn\Closed\Hosting\EditorTestApp\UI\Commands\CommandTargets\GuidCommandTarget.cs:line 275
at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
at Microsoft.VisualStudio.Editor.Implementation.BraceCompletionCommandFilter.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
at Microsoft.VisualStudio.Editor.Implementation.IntellisenseCommandFilter.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
Essentially the problem here is that there is a continuation but no group or select. This triggers a contract failure but it should probably just fall back to default indentation.
Move caret after "into man" and press Enter.