Bug Report T371907
Visible to All Users

System.ArgumentOutOfRangeExtension appears when editing an aspx file

created 9 years ago

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.&#x000D;&#x000A;Parameter name: span&#x000D;&#x000A; at Microsoft.CodeAnalysis.SyntaxNode.FindNode(TextSpan span, Boolean findInsideTrivia, Boolean getInnermostNodeForTie)&#x000D;&#x000A; at DevExpress.CodeAnalysis.SyntaxNodeExt.FindNode(SyntaxNode root, Type syntaxNodeType, TextSpan textSpan, Boolean checkParent, Boolean findInsideTrivia, Boolean getInnermostNodeForTie, Boolean checkContainsSpanBounds)&#x000D;&#x000A; at DevExpress.CodeAnalysis.SyntaxNodeExt.FindNode[TNodeType](SyntaxNode root, TextSpan textSpan, Boolean checkParent, Boolean findInsideTrivia, Boolean getInnermostNodeForTie, Boolean checkContainsSpanBounds)&#x000D;&#x000A; at DevExpress.IntelliRush.VS.ItelliRushCommandFactoryBase.CanCommitOnWhiteSpace()&#x000D;&#x000A; at DevExpress.IntelliRush.VS.ItelliRushCommandFactoryBase.ExecuteIntelliRushCommand(Guid pguidCmdGroup, UInt32 nCmdID, Char typedChar)&#x000D;&#x000A; at DevExpress.IntelliRush.VS.IntelliRushCommandHandler.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at DevExpress.CodeRush.VisualStudio.CommandTargets.CommandTargetChain.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Formatting.Implementation.CommandFilter.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.PeekF1.CommandFilter.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.JavaScript.Web.Extensions.Commands.CommandFilter.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.CommandFilterWrapper.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.CommandFilterWrapper.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.InnerExec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.SimpleTextViewWindow.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.VsKeyboardFilter.SendCommand(Guid cmdGroup, UInt32 cmdID, Object inParam)&#x000D;&#x000A; at Microsoft.VisualStudio.Editor.Implementation.VsKeyboardFilter.TextInput(TextCompositionEventArgs args)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Editor.Implementation.KeyProcessorDispatcher.&lt;&gt;c.&lt;DispatchTextInputEvents&gt;b__6_0(KeyProcessor p, TextCompositionEventArgs args)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Editor.Implementation.KeyProcessorDispatcher.&lt;&gt;c__DisplayClass10_1`1.&lt;Dispatch&gt;b__0()&#x000D;&#x000A; 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

Comments (1)
DevExpress Support Team 9 years ago

    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.

    Answers approved by DevExpress Support

    created 9 years ago (modified 9 years ago)

    We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

    Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.