-
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
Save's are being blocked by Quick Fixes on every save. #3561
Comments
I am guessing this is caused by another extension - that was the case in the past. |
No, that's definitely not it. Even when it's the only running extension the issue persists. note: just notice that now the code won't format and random methods won't show the reference count anymore. None of this occurred yesterday if that helps any. And I did try a restart of the computer. |
can you provide somw repro project then? and some repro steps? and the other information that is requested in the issue template - like OmniSharp log and so on thanks! |
Repo Steps to Replicate
After an uninstall/re-install followed by a reboot of the machine I noticed the issue persisted. However, what I didn't notice before was the error mentioned below. Error Noticed
|
hmm unfortunately I am unable to reproduce this issue using your code. |
Well that figures haha, below is the debug output. Please let me know if anything else is needed.
|
thanks - however the log doesn't have any exception 😀 |
To me it makes no sense. This just started a few hours ago today, without any thing changing other than I did install/remove the XML extension. If that were the reason then it should have cleared up after I removed it, uninstalled/re-installed VS Code, rebooted 5+ times, and so on. Unless Omnisharp dies on WPF projects (which I doubt) there is no logical reason for the formatting, references, etc to quite working along with the stupid save dialog that pops up. |
Notice the empty space over the Also, searching for any references on that method will result in an infite loop where the resulst pane just keeps "loading" over and over. Not sure if that's related but it's weird behavior that wasn't noticed until this issue occurred. |
The exception looks like a duplicate of #3485 |
@filipw The error came back today after a fresh restart of pc and open VS Code. My steps that lead to noticing the error again:
Is there any fix to this if it is related to #3485? |
if it's caused by the same as #3485 (line mappings) then it will be fixed by OmniSharp/omnisharp-roslyn#1707 however, I am not convinced because as mentioned I tried out the repro code you shared and it doesn't reproduce for me 😀 thanks a lot for your help |
@filipw Ok, just figured I ask since I saw the other comment. Found a console error, fingers crossed this helps. Console Error: mainThreadExtensionService.ts:66 TypeError: Cannot read property 'text' of undefined
at DocommentDomainCSharp.IsTriggerDocomment (c:\Users\Jordan Pritt\.vscode\extensions\k--kato.docomment-0.1.8\out\src\Domain\Lang\DocommentDomainCSharp.js:23:39)
at DocommentDomainCSharp.Execute (c:\Users\Jordan Pritt\.vscode\extensions\k--kato.docomment-0.1.8\out\src\Domain\DocommentDomain.js:20:19)
at DocommentControllerCSharp._onEvent (c:\Users\Jordan Pritt\.vscode\extensions\k--kato.docomment-0.1.8\out\src\Controller\DocommentController.js:54:31)
at DocommentControllerCSharp.<anonymous> (c:\Users\Jordan Pritt\.vscode\extensions\k--kato.docomment-0.1.8\out\src\Controller\DocommentController.js:18:22)
at l.fire (c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:48:561)
at t.ExtHostDocuments.$acceptDirtyStateChanged (c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:562:996)
at p._doInvokeHandler (c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:676:202)
at p._invokeHandler (c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:675:901)
at p._receiveRequest (c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:674:545)
at p._receiveOneMessage (c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:673:373)
at c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:671:588
at l.fire (c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:48:541)
at _.fire (c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:190:934)
at c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:838:649
at l.fire (c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:48:541)
at _.fire (c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:190:934)
at t.PersistentProtocol._receiveMessage (c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:195:277)
at c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:192:459
at l.fire (c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:48:541)
at p.acceptChunk (c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:188:445)
at c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:187:796
at Socket.t (c:\Users\Jordan Pritt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:196:732)
at Socket.emit (events.js:200:13)
at addChunk (_stream_readable.js:294:12)
at readableAddChunk (_stream_readable.js:275:11)
at Socket.Readable.push (_stream_readable.js:210:10)
at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)
$onExtensionRuntimeError @ mainThreadExtensionService.ts:66
_doInvokeHandler @ rpcProtocol.ts:398
_invokeHandler @ rpcProtocol.ts:383
_receiveRequest @ rpcProtocol.ts:299
_receiveOneMessage @ rpcProtocol.ts:226
(anonymous) @ rpcProtocol.ts:101
fire @ event.ts:582
fire @ ipc.net.ts:453
_receiveMessage @ ipc.net.ts:733
(anonymous) @ ipc.net.ts:592
fire @ event.ts:582
acceptChunk @ ipc.net.ts:239
(anonymous) @ ipc.net.ts:200
t @ ipc.net.ts:28
emit @ events.js:200
addChunk @ _stream_readable.js:294
readableAddChunk @ _stream_readable.js:275
Readable.push @ _stream_readable.js:210
onStreamRead @ internal/stream_base_commons.js:166 |
thanks but the error you have posted doesn't come from OmniSharp - it comes from |
Ok, so I removed the extension and reloaded VS Code to get this omni-sharp errir again: Unhandled Exception: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: index
at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
at OmniSharp.Helpers.LocationExtensions.GetQuickFix(Location location, OmniSharpWorkspace workspace) in D:\a\1\s\src\OmniSharp.Roslyn.CSharp\Helpers\LocationExtensions.cs:line 24
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.<DistinctIterator>d__64`1.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__1.MoveNext()
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer)
at OmniSharp.Protocol.Packet.ToString() in D:\a\1\s\src\OmniSharp.Host\Protocol\Packet.cs:line 22
at System.IO.TextWriter.WriteLine(Object value)
at System.IO.TextWriter.SyncTextWriter.WriteLine(Object value)
at OmniSharp.Services.SharedTextWriter.ProcessWriteQueue() in D:\a\1\s\src\OmniSharp.Host\Services\SharedTextWriter.cs:line 48
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart() And in the developer tools there was "cannot write after a stream was destroyed..." warning that was followed by this error: Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
at doWrite (_stream_writable.js:413:19)
at writeOrBuffer (_stream_writable.js:401:5)
at Socket.Writable.write (_stream_writable.js:301:11)
at O._makeRequest (c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:438640)
at o._makeRequest (c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:428803)
at o.processPending (c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:439784)
at t.RequestQueueCollection.drain (c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:440897)
at t.RequestQueueCollection.enqueue (c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:440409)
at c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:436546
at new Promise (<anonymous>)
at O.<anonymous> (c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:436439)
at Generator.next (<anonymous>)
at c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:426845
at new Promise (<anonymous>)
at r (c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:426622)
at O.makeRequest (c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:436317)
at Object.<anonymous> (c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:29452)
at Generator.next (<anonymous>)
at c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:29177
at new Promise (<anonymous>)
at r (c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:28954)
at Object.t.codeCheck (c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:29410)
at p.<anonymous> (c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:405017)
at Generator.next (<anonymous>)
at c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:399611
at new Promise (<anonymous>)
at r (c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:399388)
at Timeout._onTimeout (c:\Users\Jordan Pritt\.vscode\extensions\ms-vscode.csharp-1.21.11\dist\extension.js:16:404967)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7) |
thanks the call stack indicates something that will be fixed in OmniSharp/omnisharp-roslyn#1707 as a workaround you should be able to find all |
Ok good to know, then I'll close this one. Thanks for all the help @filipw ! |
An info pop-up message appears on every save event. Click, Ctrl - S, File -> Save, etc. It stays open indefinitely until you either close the message box or exit VS Code, but while it's open you are unable to actually save your files.
You have close the message box and hope and it doesn't come back, then try to save again. On successful saves the dialog is still appearing, but after the save has occurred instead of before so it does save your work in those cases.
The text was updated successfully, but these errors were encountered: