Skip to content

FSharpRangeToTextSpan crash on GoTo All #3180

@ImaginaryDevelopment

Description

@ImaginaryDevelopment

Vs 2017 is crashing on go to all after typing a few letters

Repro steps

Have not been able to reproduce outside of my enterprise solution (12 projects) 6 C#, 5 F#, 1 .SqlProj
Only started since last VS update.

Expected behavior

A list of possible matches for what I typed comes up

Actual behavior

Visual studio crashes. without showing anything in the goto all box
image

Known workarounds

use find in all files instead of the Go To All item.

Related information

Obtained by attaching VS to another instance of VS:

System.ArgumentOutOfRangeException occurred
  HResult=0x80131502
  Message=Specified argument was out of the range of valid values.
  Source=Microsoft.CodeAnalysis
  StackTrace:
   at Microsoft.CodeAnalysis.Text.TextSpan..ctor(Int32 start, Int32 length)
   at Microsoft.VisualStudio.FSharp.Editor.RoslynHelpers.FSharpRangeToTextSpan(SourceText sourceText, range range)
   at <StartupCode$FSharp-Editor>[email protected](IEnumerable`1& next)
   at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.MoveNextImpl()
   at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.System-Collections-IEnumerator-MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at Microsoft.FSharp.Collections.SeqModule.ToArray[T](IEnumerable`1 source)
   at <StartupCode$FSharp-Editor>[email protected](FSharpParseFileResults _arg3)
   at [email protected](a a)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Editor.Implementation.NavigateTo.NavigateToItemProvider.Searcher.<SearchAsyncWorker>d__12.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Editor.Implementation.NavigateTo.NavigateToItemProvider.Searcher.<SearchAsync>d__11.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CodeAnalysis.Editor.Implementation.NavigateTo.NavigateToItemProvider.Searcher.<Search>d__10.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
  • Windows 10
  • Visual Studio 15.2 (26439.12) Release (.NET 4.6.01586)
  • Visual F# Tools 15.4.1.17060502
    Just updated Visual F# tools to the latest nightly and it persists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions