vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

Continuous crashing on razor source

Open spazmodius opened this issue 3 years ago • 0 comments

Issue Description

When I open detail.cshtml, and as I hover the mouse over various c# variables, I get no type information shown in the editor, but the Omnisharp log fills with ArgumentOutOfRangeException.

Further, analysis does not seem to find references to my types in cshtml files.

Logs

OmniSharp log

Many, many copies of essentially this:

[warn]: OmniSharp.Stdio.Host
        ************ Request ************
{
  "Type": "request",
  "Seq": 7568,
  "Command": "/quickinfo",
  "Arguments": {
    "FileName": "c:\\spazmodius\\versionone\\tz\\VersionOne.Web\\Views\\Conversation\\detail.cshtml__virtual.cs",
    "Line": 45,
    "Column": 9
  }
}
[fail]: OmniSharp.Stdio.Host
        ************  Response (0.5772ms) ************ 
{
  "Request_seq": 7568,
  "Command": "/quickinfo",
  "Running": true,
  "Success": false,
  "Message": "\"System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.\\r\\nParameter name: index\\r\\n   at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)\\r\\n   at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)\\r\\n   at OmniSharp.Extensions.SourceTextExtensions.GetTextPosition(SourceText sourceText, Request request) in D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Roslyn\\\\Extensions\\\\SourceTextExtensions.cs:line 11\\r\\n   at OmniSharp.Roslyn.CSharp.Services.QuickInfoProvider.<Handle>d__5.MoveNext() in D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Roslyn.CSharp\\\\Services\\\\QuickInfoProvider.cs:line 61\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n   at OmniSharp.Endpoint.EndpointHandler`2.<GetFirstNotEmptyResponseFromHandlers>d__19.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n   at OmniSharp.Endpoint.EndpointHandler`2.<HandleRequestForLanguage>d__20.MoveNext() in D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Host\\\\Endpoint\\\\EndpointHandler.cs:line 230\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n   at OmniSharp.Endpoint.EndpointHandler`2.<Process>d__16.MoveNext() in D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Host\\\\Endpoint\\\\EndpointHandler.cs:line 131\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n   at OmniSharp.Stdio.Host.<HandleRequest>d__14.MoveNext() in D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Stdio\\\\Host.cs:line 218\"",
  "Body": null,
  "Seq": 1691,
  "Type": "response"
}

C# log

No output

Environment information

VSCode version: 1.69.1 C# Extension: 1.25.0

Dotnet Information .NET SDK (reflecting any global.json): Version: 5.0.302 Commit: c005824e35

Runtime Environment: OS Name: Windows OS Version: 10.0.19044 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\5.0.302\

Host (useful for support): Version: 6.0.0 Commit: 4822e3c3aa

.NET SDKs installed: 3.1.101 [C:\Program Files\dotnet\sdk] 5.0.302 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download

Visual Studio Code Extensions
Extension Author Version
basic-dark-color-theme spazmodius 0.0.4
csharp ms-dotnettools 1.25.0
fracturedjsonvsc j-brooke 2.2.2
shifter Gruntfuggly 0.0.6
TabOut albert 0.2.1
vscode-eslint dbaeumer 2.2.6
vscode-navigate-edit-history codeandstuff 1.6.0
vscode-open-in-github sysoev 1.16.0
vscode-toggle-quotes BriteSnow 0.3.6
xml DotJoshJohnson 2.5.1

spazmodius avatar Aug 08 '22 22:08 spazmodius