tgjones / HlslTools

A Visual Studio extension that provides enhanced support for editing High Level Shading Language (HLSL) files
http://timjones.io/blog/archive/2016/04/25/hlsl-tools-for-visual-studio-v1.0-released
Other
569 stars 97 forks source link

Language Server errors #241

Open Nintynuts opened 2 years ago

Nintynuts commented 2 years ago

Not entirely sure what has triggered them, but these have come up:

[Error - 16:25:09] OmniSharp.Extensions.JsonRpc.InputHandler: Failed to handle request textDocument/documentHighlight 38 - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'position')
   at ShaderTools.CodeAnalysis.Hlsl.Syntax.SyntaxTree.MapRootFilePosition(Int32 position)
   at ShaderTools.CodeAnalysis.ReferenceHighlighting.DocumentHighlightsService.GetDocumentHighlightsAsync(Document document, Int32 position, IImmutableSet`1 documentsToSearch, CancellationToken cancellationToken)
   at ShaderTools.LanguageServer.Handlers.DocumentHighlightHandler.Handle(DocumentHighlightParams request, CancellationToken token)
   at OmniSharp.Extensions.LanguageServer.Server.Pipelines.SemanticTokensDeltaPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.<RouteRequest>g__InnerRoute|5_0(IServiceScopeFactory serviceScopeFactory, Request request, TDescriptor descriptor, Object params, CancellationToken token, ILogger logger)
   at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(IRequestDescriptor`1 descriptors, Request request, CancellationToken token)
   at OmniSharp.Extensions.JsonRpc.InputHandler.<>c__DisplayClass38_0.<<RouteRequest>b__5>d.MoveNext() | Method='textDocument/documentHighlight' RequestId='38'
[Error - 16:25:09] Request textDocument/documentHighlight failed.
  Message: Internal Error - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'position')
   at ShaderTools.CodeAnalysis.Hlsl.Syntax.SyntaxTree.MapRootFilePosition(Int32 position)
   at ShaderTools.CodeAnalysis.ReferenceHighlighting.DocumentHighlightsService.GetDocumentHighlightsAsync(Document document, Int32 position, IImmutableSet`1 documentsToSearch, CancellationToken cancellationToken)
   at ShaderTools.LanguageServer.Handlers.DocumentHighlightHandler.Handle(DocumentHighlightParams request, CancellationToken token)
   at OmniSharp.Extensions.LanguageServer.Server.Pipelines.SemanticTokensDeltaPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.<RouteRequest>g__InnerRoute|5_0(IServiceScopeFactory serviceScopeFactory, Request request, TDescriptor descriptor, Object params, CancellationToken token, ILogger logger)
   at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(IRequestDescriptor`1 descriptors, Request request, CancellationToken token)
   at OmniSharp.Extensions.JsonRpc.InputHandler.<>c__DisplayClass38_0.<<RouteRequest>b__5>d.MoveNext()
  Code: -32603 
  [Error - 16:29:14] OmniSharp.Extensions.JsonRpc.InputHandler: Failed to handle request textDocument/hover 3 - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
   at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
   at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
   at ShaderTools.LanguageServer.LanguageServerWorkspace.GetLogicalDocument(TextDocumentPositionParams textDocumentPositionParams)
   at ShaderTools.LanguageServer.Handlers.HoverHandler.Handle(HoverParams request, CancellationToken token)
   at OmniSharp.Extensions.LanguageServer.Server.Pipelines.SemanticTokensDeltaPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.<RouteRequest>g__InnerRoute|5_0(IServiceScopeFactory serviceScopeFactory, Request request, TDescriptor descriptor, Object params, CancellationToken token, ILogger logger)
   at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(IRequestDescriptor`1 descriptors, Request request, CancellationToken token)
   at OmniSharp.Extensions.JsonRpc.InputHandler.<>c__DisplayClass38_0.<<RouteRequest>b__5>d.MoveNext() | Method='textDocument/hover' RequestId='3'
[Error - 16:29:14] Request textDocument/hover failed.
  Message: Internal Error - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
   at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
   at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
   at ShaderTools.LanguageServer.LanguageServerWorkspace.GetLogicalDocument(TextDocumentPositionParams textDocumentPositionParams)
   at ShaderTools.LanguageServer.Handlers.HoverHandler.Handle(HoverParams request, CancellationToken token)
   at OmniSharp.Extensions.LanguageServer.Server.Pipelines.SemanticTokensDeltaPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.<RouteRequest>g__InnerRoute|5_0(IServiceScopeFactory serviceScopeFactory, Request request, TDescriptor descriptor, Object params, CancellationToken token, ILogger logger)
   at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(IRequestDescriptor`1 descriptors, Request request, CancellationToken token)
   at OmniSharp.Extensions.JsonRpc.InputHandler.<>c__DisplayClass38_0.<<RouteRequest>b__5>d.MoveNext()
  Code: -32603 

Since I'm not sure what's triggering it, here is the github repo for my VS Code workspace so maybe you can figure it out: https://github.com/Nintynuts/3DMigoto-Splinter-Cell-Blacklist-DX11