dotnet / dotnet/vscode-csharp

Continuous crashing on razor source

Open
#5,333 0 comments 2 reactions 0 assignees View on GitHub
OmniSharp Razor
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
18h 40m
Merged PRs (30d)
31

Description

## 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.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.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.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.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.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|;

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.