PowerShell / PowerShell/PowerShellEditorServices
ArgumentOutOfRangeException in ValidatePosition
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 767
- Fork
- 266
- Merge medio
- 3g 16h
- PR unite (30g)
- 1
Descrizione
Still getting this exception in 1.11.0 version of the extension in v1.31.1 of VSCode.
2019-02-23 22:10:41.702 [VERBOSE] tid:17 in 'ResolveFilePath' C:\PowerShellEditorServices\src\PowerShellEditorServices\Workspace\Workspace.cs: line 466
Resolved path: c:\Users\Keith\GitHub\dahlbyk\posh-git\src\GitUtils.ps1
2019-02-23 22:10:41.888 [ERROR] tid:43 in 'OnListenTaskCompleted' C:\PowerShellEditorServices\src\PowerShellEditorServices.Protocol\MessageProtocol\ProtocolEndpoint.cs: line 391
ProtocolEndpoint message loop terminated due to unhandled exception:
System.AggregateException: One or more errors occurred. (Specified argument was out of the range of valid values.
Parameter name: Position 569:64 is outside of the line range of 1 to 497.) ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: Position 569:64 is outside of the line range of 1 to 497.
at Microsoft.PowerShell.EditorServices.ScriptFile.ValidatePosition(Int32 line, Int32 column)
at Microsoft.PowerShell.EditorServices.ScriptFile.ApplyChange(FileChange fileChange)
at Microsoft.PowerShell.EditorServices.Protocol.Server.LanguageServer.HandleDidChangeTextDocumentNotification(DidChangeTextDocumentParams textChangeParams, EventContext eventContext)
at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.MessageDispatcher.<>c__DisplayClass6_0`2.<SetEventHandler>b__0(Message eventMessage, MessageWriter messageWriter)
at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.MessageDispatcher.DispatchMessage(Message messageToDispatch, MessageWriter messageWriter)
at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.ProtocolEndpoint.ListenForMessages(CancellationToken cancellationToken)
at Microsoft.PowerShell.EditorServices.Utility.AsyncContext.Start(Func`1 asyncMainFunc, ILogger logger)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: Position 569:64 is outside of the line range of 1 to 497.
at Microsoft.PowerShell.EditorServices.ScriptFile.ValidatePosition(Int32 line, Int32 column)
at Microsoft.PowerShell.EditorServices.ScriptFile.ApplyChange(FileChange fileChange)
at Microsoft.PowerShell.EditorServices.Protocol.Server.LanguageServer.HandleDidChangeTextDocumentNotification(DidChangeTextDocumentParams textChangeParams, EventContext eventContext)
at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.MessageDispatcher.<>c__DisplayClass6_0`2.<SetEventHandler>b__0(Message eventMessage, MessageWriter messageWriter)
at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.MessageDispatcher.DispatchMessage(Message messageToDispatch, MessageWriter messageWriter)
at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.ProtocolEndpoint.ListenForMessages(CancellationToken cancellationToken)
at Microsoft.PowerShell.EditorServices.Utility.AsyncContext.Start(Func`1 asyncMainFunc, ILogger logger)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)<---
This happened when I was pasting some text in the middle of the file.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con Microsoft.PowerShell.EditorServices.ScriptFile.ValidatePosition e ApplyChange, quindi segui la chiamata da LanguageServer.HandleDidChangeTextDocumentNotification. Riproduci l’operazione di incolla segnalata in VSCode usando i Logs e l’archivio forniti; il lavoro è completato quando la modifica non termina più il ciclo dei messaggi del protocollo con una ArgumentOutOfRangeException.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp, powershell, vscode
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 32/100