Skip to content

Hints throw exception #14885

@0101

Description

@0101
devenv.exe Error: 0 : Visual F# Tools: exception swallowed and not passed to Roslyn: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
   at System.String.Substring(Int32 startIndex, Int32 length)
   at Microsoft.VisualStudio.FSharp.Editor.Hints.InlineParameterNameHints.getSourceTextAtRange(SourceText sourceText, Range range) in C:\code\fsharp\vsintegration\src\FSharp.Editor\Hints\InlineParameterNameHints.fs:line 70
   at Microsoft.VisualStudio.FSharp.Editor.Hints.InlineParameterNameHints.argumentNames@112.Invoke(Range range)
   at Microsoft.FSharp.Collections.Internal.IEnumerator.map@99.DoMoveNext(b& curr) in C:\code\fsharp\src\FSharp.Core\seq.fs:line 102
   at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System.Collections.IEnumerator.MoveNext() in C:\code\fsharp\src\FSharp.Core\seq.fs:line 84
   at Microsoft.FSharp.Collections.Internal.IEnumerator.map2@134.DoMoveNext(c& curr) in C:\code\fsharp\src\FSharp.Core\seq.fs:line 136
   at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System.Collections.IEnumerator.MoveNext() in C:\code\fsharp\src\FSharp.Core\seq.fs:line 84
   at Microsoft.FSharp.Collections.Internal.IEnumerator.choose@211.System.Collections.IEnumerator.MoveNext() in C:\code\fsharp\src\FSharp.Core\seq.fs:line 222
   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source) in C:\code\fsharp\src\FSharp.Core\seq.fs:line 974
   at Microsoft.VisualStudio.FSharp.Editor.Hints.InlineParameterNameHints.getHintsForMemberOrFunctionOrValue(SourceText sourceText, FSharpParseFileResults parseResults, FSharpMemberOrFunctionOrValue symbol, FSharpSymbolUse symbolUse) in C:\code\fsharp\vsintegration\src\FSharp.Editor\Hints\InlineParameterNameHints.fs:line 120
   at Microsoft.VisualStudio.FSharp.Editor.Hints.HintService.Pipe #4 input at line [email protected](FSharpSymbolUse symbolUse)
   at Microsoft.FSharp.Collections.Internal.IEnumerator.map@99.DoMoveNext(b& curr) in C:\code\fsharp\src\FSharp.Core\seq.fs:line 102
   at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System.Collections.IEnumerator.MoveNext() in C:\code\fsharp\src\FSharp.Core\seq.fs:line 84
   at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeOuter@320.Invoke(Unit unitVar0) in C:\code\fsharp\src\FSharp.Core\seqcore.fs:line 320
   at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeInner@314.Invoke(Unit unitVar0) in C:\code\fsharp\src\FSharp.Core\seqcore.fs:line 314
   at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeInner@314.Invoke(Unit unitVar0) in C:\code\fsharp\src\FSharp.Core\seqcore.fs:line 314
   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source) in C:\code\fsharp\src\FSharp.Core\seq.fs:line 974
   at Microsoft.VisualStudio.FSharp.Editor.Hints.HintService.getHintsForDocument@62-2.Invoke(Tuple`2 _arg1) in C:\code\fsharp\vsintegration\src\FSharp.Editor\Hints\HintService.fs:line 66
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvokeNoHijackCheck[a,b](AsyncActivation`1 ctxt, b result1, FSharpFunc`2 userCode) in C:\code\fsharp\src\FSharp.Core\async.fs:line 528
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.Document-GetFSharpParseAndCheckResultsAsync@169-3.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.CheckerExtensions.FSharpChecker-ParseAndCheckDocumentWithPossibleStaleResults@80-13.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.CheckerExtensions.parseAndCheckFile@40-2.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.CheckerExtensions.parseAndCheckFile@39-3.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.CheckerExtensions.FSharpChecker-ParseAndCheckDocumentWithPossibleStaleResults@79-14.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.CheckerExtensions.FSharpChecker-ParseAndCheckDocumentWithPossibleStaleResults@32-15.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.CheckerExtensions.FSharpChecker-ParseAndCheckDocumentWithPossibleStaleResults@31-16.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.CheckerExtensions.FSharpChecker-ParseAndCheckDocumentWithPossibleStaleResults@29-17.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.Document-GetFSharpParseAndCheckResultsAsync@167-5.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.Document-GetFSharpCompilationOptionsAsync@113-1.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.WorkspaceExtensions.Document-GetFSharpParseAndCheckResultsAsync@166-6.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.VisualStudio.FSharp.Editor.Hints.HintService.getHintsForDocument@59-4.Invoke(AsyncActivation`1 ctxt)
   at <StartupCode$FSharp-Editor>.$RoslynAdapter.Pipe #1 input at line [email protected](AsyncActivation`1 ctxt)
   at <StartupCode$FSharp-Editor>.$RoslynAdapter.Pipe #1 input at line [email protected](AsyncActivation`1 ctxt)
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in C:\code\fsharp\src\FSharp.Core\async.fs:line 112

Metadata

Metadata

Assignees

Labels

Area-LangService-HintsF# hints inspired by C# inline hintsBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions