You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[severity:It bothers me. A fix would be nice]
I'm running into this repeatedly when editing a regex within a multiline raw string. Seems to repro consistently when I place the caret at the start of a line within the string (e.g. before the `(?[^:]+)? # Header name. Optional in case it's missing (e.g. if deleted and line starts with :Value)
(?:)? # Colon separator. No whitespace is allowed between name and colon.
([\s]*) # Whitespace is allowed after the colon before the value
(?.+)?
""", RegexOptions.Compiled | RegexOptions.IgnorePatternWhitespace);
Log message:
StreamJsonRpc.RemoteInvocationException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at StreamJsonRpc.JsonRpc.d__1451.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection1.d__181.MoveNext() RPC server exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at Microsoft.CodeAnalysis.Collections.Internal.ThrowHelper.ThrowArgumentOutOfRange_IndexException() at Microsoft.CodeAnalysis.Collections.SegmentedList1.get_Item(Int32 index)
at Microsoft.CodeAnalysis.EmbeddedLanguages.VirtualChars.VirtualCharSequence.ImmutableSegmentedListChunk.Find(Int32 position)
at Microsoft.CodeAnalysis.Features.EmbeddedLanguages.RegularExpressions.LanguageServices.RegexDocumentHighlighter.GetReferences(RegexTree tree, Int32 position)
at Microsoft.CodeAnalysis.Features.EmbeddedLanguages.RegularExpressions.LanguageServices.RegexDocumentHighlighter.GetHighlights(RegexTree tree, Int32 positionInDocument)
at Microsoft.CodeAnalysis.Features.EmbeddedLanguages.RegularExpressions.LanguageServices.RegexDocumentHighlighter.GetDocumentHighlights(Document document, SemanticModel semanticModel, SyntaxToken token, Int32 position, HighlightingOptions options, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.DocumentHighlighting.AbstractDocumentHighlightsService.TryGetEmbeddedLanguageHighlights(Document document, SemanticModel semanticModel, Int32 position, HighlightingOptions options, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.DocumentHighlighting.AbstractDocumentHighlightsService.d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.DocumentHighlighting.AbstractDocumentHighlightsService.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.Remote.RemoteDocumentHighlightsService.<>c__DisplayClass2_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.<>c__DisplayClass7_01.<g__ProcessSolutionAsync|1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.d__71.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.d__71.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.CodeAnalysis.Remote.BrokeredServiceBase.d__111.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.Remote.BrokeredServiceBase.d__14`1.MoveNext()
---
### Original Comments
#### Feedback Bot on 12/6/2022, 07:01 PM:
(private comment, text removed)
#### Feedback Bot on 12/7/2022, 07:33 AM:
(private comment, text removed)
#### Feedback Bot on 12/7/2022, 07:33 AM:
(private comment, text removed)
---
### Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered:
private static readonly Regex s_regexHeader = new("""
^(?<name>[^:]+)? # Header name. Optional in case it's missing (e.g. if deleted and line starts with :Value)
(?<operator>:)? # Colon separator. No whitespace is allowed between name and colon.
([\s]*) # Whitespace is allowed after the colon before the value
(?<value>.+)?
""", RegexOptions.Compiled | RegexOptions.IgnorePatternWhitespace);
This issue has been moved from a ticket on Developer Community.
[severity:It bothers me. A fix would be nice]
I'm running into this repeatedly when editing a regex within a multiline raw string. Seems to repro consistently when I place the caret at the start of a line within the string (e.g. before the `(?[^:]+)? # Header name. Optional in case it's missing (e.g. if deleted and line starts with :Value)
(?:)? # Colon separator. No whitespace is allowed between name and colon.
([\s]*) # Whitespace is allowed after the colon before the value
(?.+)?
""", RegexOptions.Compiled | RegexOptions.IgnorePatternWhitespace);
StreamJsonRpc.RemoteInvocationException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at StreamJsonRpc.JsonRpc.d__145
1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection
1.d__181.MoveNext() RPC server exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at Microsoft.CodeAnalysis.Collections.Internal.ThrowHelper.ThrowArgumentOutOfRange_IndexException() at Microsoft.CodeAnalysis.Collections.SegmentedList
1.get_Item(Int32 index)at Microsoft.CodeAnalysis.EmbeddedLanguages.VirtualChars.VirtualCharSequence.ImmutableSegmentedListChunk.Find(Int32 position)
at Microsoft.CodeAnalysis.Features.EmbeddedLanguages.RegularExpressions.LanguageServices.RegexDocumentHighlighter.GetReferences(RegexTree tree, Int32 position)
at Microsoft.CodeAnalysis.Features.EmbeddedLanguages.RegularExpressions.LanguageServices.RegexDocumentHighlighter.GetHighlights(RegexTree tree, Int32 positionInDocument)
at Microsoft.CodeAnalysis.Features.EmbeddedLanguages.RegularExpressions.LanguageServices.RegexDocumentHighlighter.GetDocumentHighlights(Document document, SemanticModel semanticModel, SyntaxToken token, Int32 position, HighlightingOptions options, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.DocumentHighlighting.AbstractDocumentHighlightsService.TryGetEmbeddedLanguageHighlights(Document document, SemanticModel semanticModel, Int32 position, HighlightingOptions options, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.DocumentHighlighting.AbstractDocumentHighlightsService.d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.DocumentHighlighting.AbstractDocumentHighlightsService.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.Remote.RemoteDocumentHighlightsService.<>c__DisplayClass2_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.<>c__DisplayClass7_0
1.<g__ProcessSolutionAsync|1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.d__7
1.MoveNext()--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.d__7
1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.CodeAnalysis.Remote.BrokeredServiceBase.d__11
1.MoveNext()--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.Remote.BrokeredServiceBase.d__14`1.MoveNext()
The text was updated successfully, but these errors were encountered: