Hello,
I've discovered a Problem in CodeRush for Roslyn v1.0.11 (and v1.0.10 before) of which i first thaught is a VS Problem specified to my solution. But when the problem occured in 2 other solutions as well I search for the reason: If IntelliRush is enabled the aspx-site throws an error when pressing spacebar from a certain line (or amount of characters) onwards.
The exact error in the ActivityLog.XML from Visual Studio:
XML<entry>
<record>967</record>
<time>2016/04/26 09:08:03.256</time>
<type>Error</type>
<source>Editor or Editor Extension</source>
<description>System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: span
 at Microsoft.CodeAnalysis.SyntaxNode.FindNode(TextSpan span, Boolean findInsideTrivia, Boolean getInnermostNodeForTie)
 at DevExpress.CodeAnalysis.SyntaxNodeExt.FindNode(SyntaxNode root, Type syntaxNodeType, TextSpan textSpan, Boolean checkParent, Boolean findInsideTrivia, Boolean getInnermostNodeForTie, Boolean checkContainsSpanBounds)
 at DevExpress.CodeAnalysis.SyntaxNodeExt.FindNode[TNodeType](SyntaxNode root, TextSpan textSpan, Boolean checkParent, Boolean findInsideTrivia, Boolean getInnermostNodeForTie, Boolean checkContainsSpanBounds)
 at DevExpress.IntelliRush.VS.ItelliRushCommandFactoryBase.CanCommitOnWhiteSpace()
 at DevExpress.IntelliRush.VS.ItelliRushCommandFactoryBase.ExecuteIntelliRushCommand(Guid pguidCmdGroup, UInt32 nCmdID, Char typedChar)
 at DevExpress.IntelliRush.VS.IntelliRushCommandHandler.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 DevExpress.CodeRush.VisualStudio.CommandTargets.CommandTargetChain.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.Text.Formatting.Implementation.CommandFilter.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.PeekF1.CommandFilter.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.JavaScript.Web.Extensions.Commands.CommandFilter.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.CommandFilterWrapper.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.CommandFilterWrapper.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.SimpleTextViewWindow.Exec(Guid& pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
 at Microsoft.VisualStudio.Editor.Implementation.VsKeyboardFilter.SendCommand(Guid cmdGroup, UInt32 cmdID, Object inParam)
 at Microsoft.VisualStudio.Editor.Implementation.VsKeyboardFilter.TextInput(TextCompositionEventArgs args)
 at Microsoft.VisualStudio.Text.Editor.Implementation.KeyProcessorDispatcher.<>c.<DispatchTextInputEvents>b__6_0(KeyProcessor p, TextCompositionEventArgs args)
 at Microsoft.VisualStudio.Text.Editor.Implementation.KeyProcessorDispatcher.<>c__DisplayClass10_1`1.<Dispatch>b__0()
 at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object errorSource, Action call)</description>
</entry>
My IntelliRush-Settings in %APPDATA%\CodeRush\Settings\Private\Editor\IntelliRush.xml are:
XML<?xml version="1.0" encoding="utf-8"?>
<Root>
<Options Language="Neutral">
<Enabled>True</Enabled>
<HandleHomeEnd>True</HandleHomeEnd>
<DisabledLanguages />
</Options>
</Root>
I've attached a sample Solution where the error occures from line 34 onwards. I've reproduced the error in v15.1.5 and v15.2.4. After disabling IntelliRush the error of not beeing able to insert a space with pressing spacebar went away. With IntelliRush enabled it is however possible to insert a space with copy/paste.
With best regards,
Marcel
Hi Marcel,
Thank you for the detailed description of this issue.
We already have a similar request with typescript files: An error popup appears when editing a TypeScript file after the first keystroke if IntelliRush is enabled
I have marked this ticket as it's duplicate, so you will be automatically notified when we fix this issue.