OmniSharp ArgumentOutOfRangeException in Semantic Highlighting
See original GitHub issueIssue Type: Bug
I get the below error in the OmniSharp log after opening a Unity 2019.4.17f1 project. Tested with 1.23.8 and 1.23.7, both the same. Restarting OmniSharp and VSCode doesn’t change the behavior.
[fail]: OmniSharp.Stdio.Host
************ Response ************
{
"Request_seq": 59,
"Command": "/v2/highlight",
"Running": true,
"Success": false,
"Message": "\"System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.\\r\\nParameter name: line\\r\\n at Microsoft.CodeAnalysis.Text.LinePosition..ctor(Int32 line, Int32 character)\\r\\n at OmniSharp.Roslyn.CSharp.Services.SemanticHighlight.SemanticHighlightService.<Handle>d__1.MoveNext() in D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Roslyn.CSharp\\\\Services\\\\SemanticHighlight\\\\SemanticHighlightService.cs:line 36\\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__13.MoveNext() in D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Stdio\\\\Host.cs:line 215\"",
"Body": null,
"Seq": 137,
"Type": "response"
}
Extension version: 1.23.8 VS Code version: Code 1.52.1 (ea3859d4ba2f3e577a159bc91e3074c5d85c0523, 2020-12-16T16:34:46.910Z) OS version: Windows_NT x64 10.0.18362
Issue Analytics
- State:
- Created 3 years ago
- Reactions:13
- Comments:19 (4 by maintainers)
Top Results From Across the Web
Semantic highlighting in OmniSharp and C# extension for VS ...
The semantic highlighting is an exciting feature that improves the quality of syntax highlighting when working with C# in VS Code. I encourage ......
Read more >C# semantic highlighting in VS Code - Stack Overflow
I am trying to utilize new feature from VS Code to highlight C# code using new semantics. While code itself was highlighted successfully, ......
Read more >VS2022 总是提示“Feature 'Document higlights' is currently ...
ArgumentOutOfRangeException : Specified argument was out of the range of valid values. ... HandleNonSuccessAndDebuggerNotification(Task task) at OmniSharp.
Read more >omnisharp-vscode - Discover .NET
Official C# support for Visual Studio Code (powered by OmniSharp) ... Great C# editing support, including Syntax Highlighting, IntelliSense, ...
Read more >facebook Code Example - Code Grepper
... Syntax Error: Error: PostCSS plugin tailwindcss requires PostCSS 8. ... sdp library android · rvm is not a function selecting rubies with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@filipw repro: https://github.com/vchirikov/limiter file LimiterTests.cs
ms-dotnettools.csharp-1.23.8 omnisharp 1.37.6-beta.16
I’ve restarted multple times + switching back to the newest re-breakes it (and it requires a restart to switch), so either a corrupt file is cached somewhere on my pc or it’s something else.