-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Omnisharp stops a few minutes after loading project #3485
Comments
can you please share the project that reproduces this issue? according to the stack trace it might be a bug in the compiler |
We are seeing this same issue, I can't post the project right now as it contains a lot of our proprietary code but I will try and recreate the issue with a clean sample project soon. We have a dotnet core web api app, with a few projects, some are dotnet core 2.2 class libraries, but the issue only started after we upgraded the API to dotnet core 3.1 (and at the same time added a new dotnet core 3.1 project to the solution.... so it could be either) For us I think the issue lies in the added project, not the upgrade of dotnet. The new project is a submodule, and it uses the Microsoft.NET.Sdk.Razor SDK type (all the others are either Sdk="Microsoft.NET.Sdk or Microsoft.NET.Sdk.Web) ... maybe that is the issue. Opening the razor submodule on it's own seems to work ok, I thought it was because it was using a new format of "using" statement without brackets wrapping the using context, but on changing that to the traditional style, the problem is persisting. |
I had a similar issue. I updated to the latest omnisharp-roslyn using |
I take that back, I'm still seeing the issue. |
@xtellurian Can share logs? Also do you have a project that will repo this behavior? |
@JoeRobich Unfortunately for us in this situation, it's a closed source project. However, I think it has something to do with Razor pages. The error seems non-deterministic, I have to open/ close files to make it occur, although it inevitably occurs. The below logs have had paths and project names redacted. OmniSharp log:
|
I'm working on a repro, but it's hard to nail down the issue... |
@JoeRobich got a repro here: |
@3omar3allam not sure if this is the same issue you're seeing... what do you think? |
Thank, this is a good repro. I had a quick look and the problem here is that here we fall out of bounds with the current implementation. In this case the state is as follow:
So what we do wrong is that we try to fetch line with index 143 (as defined in What's funny is that it mostly works because the lines are correct and the filepath returned too, just the text doesn't add up; however VS Code doesn't use the text - only lines and filepath. So this crashes only when the real CSHTML is longer than the generated file. |
This bug applies to all mapped files by the way, not just Razor |
Issue Description
Project works fine for a few minutes, then all omnisharp features stop working (intellisense and go-to reference, etc..).
Logs
OmniSharp log
Environment information
VSCode version: 1.41.1
C# Extension: 1.21.9
Mono Information
OmniSharp using global mono :6.4.0Dotnet Information
.NET Core SDK (reflecting any global.json): Version: 3.0.101 Commit: bc5f8df0f5Runtime Environment:
OS Name: linuxmint
OS Version: 19
OS Platform: Linux
RID: linuxmint.19-x64
Base Path: /usr/share/dotnet/sdk/3.0.101/
Host (useful for support):
Version: 3.0.1
Commit: 19942e7199
.NET Core SDKs installed:
2.1.802 [/usr/share/dotnet/sdk]
2.2.402 [/usr/share/dotnet/sdk]
3.0.101 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.14 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.14 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.14 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
The text was updated successfully, but these errors were encountered: