Hi,
After enabling preview Razor editor for Visual Studio and opening razor file (70 lines of code) application stop responding.
Log files in attachment.
Hi @TomaszGrzmilas thank you for reporting this issue! Would you mind providing a simple repro app for us to investigate further?
@NTaylorMullen
Hi,
Here is a repo https://github.com/TomaszGrzmilas/VSTest.
It is not building since, when I open Pages -> Applications.razor and start to edit it, application stop working.
We most likely fixed your issue in the 16.8-Preview1 milestone @TomaszGrzmilas! I can't promise that we did only because I don't have all the C# data:
Butttt I doubt that'd cause a crash 馃槃 . That release should be coming out in the next week or so!
Hi @NTaylorMullen
Just installed VS 16.8-Preview 1.0 and still opening Applications.razor crash Visual Studio :(
Just installed VS 16.8-Preview 1.0 and still opening Applications.razor crash Visual Studio :(
Would you mind reproing it with VS' feedback tool (it should capture a dump) and link the issue it creates so I can investigate further?
@NTaylorMullen
Ahhhh, ok I have a better idea of what's going wrong then. Thank you so much for your patience and help in investigating this issue. We definitely want to make sure we get things working for you 馃槃.
Would it be possible to share that application with me privately? If not I totally understand and we can go other routes. Things I'd be curious about:
project.razor.json
? If so would you mind including that here?RAZOR_TRACE
to Verbose
you should get a new Razor Language Server Client
entry in your output window:@NTaylorMullen
No problem :)
In attached archive there are:
- Output_2.txt - Razor Language Server Client output after opening Application.razor (I think there is some infinite loop).
Hmm, ya there's loadddssss of logs in that Output_2.txt. Out of curiosity, how long was the document open before capturing that log? Only asking because the semantic token pieces do poll every few seconds so seeing it repeatedly makes sense; however, that amount of logs would not make sense if you just had the file open for a brief period of time.
Would you mind providing the log output after typing @DateTime.Now
and <strong></strong>
? That might give some insight as to why you're not getting any IntelliSense.
@NTaylorMullen
Out of curiosity, how long was the document open before capturing that log?
File opened instantly, I was doing nothing, just watched log scrolling, I was thinking that it eventually stop but it didn't. This is why I wrote that I think there is some infinite loop.
Output-RazorLanguageServerClient_1.txt - on open document Application.razor I started typing @DateTime.Now
and <strong></strong>
(I get no IntelliSense)
Output-RazorLanguageServerClient_2.txt - I created empty razor Component and I started typing @DateTime.Now
and <strong></strong>
(I get no IntelliSense)
@dibarbet is there a way we can acquire C# LSP logs? I'm looking at the logs @TomaszGrzmilas has provided and all is looking good from our end so I'm curious if C# is having issues.
@TomaszGrzmilas would you mind providing the Html Language Server Client log in the output pane when typing <strong></strong>
. Oh and again, you're the best for hanging in there with me. I know this is probably annoying as hell but man you're definitely helping shed some light on gaps in our log gathering + potentially how the new editor falls part. Thank you!!
@NTaylorMullen I'm just a humble tester of your great work :) I'm glad that I can support the development of this great software to a small extent.
Log file in attachment.
Hmmm super interesting, everything looks totally as-expected there as well. So to clarify, @TomaszGrzmilas when you type <
you don't get any completion list pop-up?
Also, @ToddGrun is there some sort of logging that can be enabled to provide even more info from the HTML side of the equation? Specifically I'm trying to understand if the HTML language server discovered completion items because it looks like we're asking it appropriately.
@jimmylewis -- Any thoughts on whether we should be distributing the lspwatcher to help track these issues down?
@ToddGrun, we could look into that, but even sharing private binaries does have some requirements. I'm not sure what they all are e.g. certainly code signing (but that's pretty easy) but not sure about other release requirements like accessibility etc.., which I have been neglecting since it's a quick and dirty internal tool.
Since LSPWatcher is ETW based, we can get the raw event data from PerfView (need to add *Microsoft-VisualStudio-WebTools-LanguageServer
in the Additional Providers). We could maybe look at a way to ingest that (in ETL form?) and then display it nicely for playback/debugging.
@ToddGrun, we could look into that, but even sharing private binaries does have some requirements. I'm not sure what they all are e.g. certainly code signing (but that's pretty easy) but not sure about other release requirements like accessibility etc.., which I have been neglecting since it's a quick and dirty internal tool.
Since LSPWatcher is ETW based, we can get the raw event data from PerfView (need to add
*Microsoft-VisualStudio-WebTools-LanguageServer
in the Additional Providers). We could maybe look at a way to ingest that (in ETL form?) and then display it nicely for playback/debugging.
Interesting, ya it's definitely something we should evaluate because if people are going to be running into problems we definitely need to have tools available for them to help us help them 馃槃
@tinaschrepfer is there any way to get any additional JsonRpc information from VS' LSP platform so folks like @TomaszGrzmilas can help provide additional data?
@NTaylorMullen
I think I've expressed myself badly lately. when I press `<' I get html hints but when I type @Date ... I don't get Intelisence.
Yes I will provide additional data. Please write what I must do :)
@TomaszGrzmilas sorry it took so long I was finally able to get the extra steps needed! If you run devenv /log
and then reproduce your issue it'll then produce logs in the %temp%/VisualStudio/LSP
folder that we can look out to investigate further!
@NTaylorMullen
I did what you asked, I run devenv /log
and opened 'Application.razor' then application stop responding. Logs:
LSP.zip
I did what you asked, I run
devenv /log
and opened 'Application.razor' then application stop responding. Logs:
LSP.zip
@TomaszGrzmilas thank you! So it's definitely not an exception occurring at our language server layer which means there's something more VS intrinsic going on.... We're getting close! So there's two paths we should look into.
@NTaylorMullen I started two VS instances. On one I attach debug to another. On Second I opened TEST project and open the Application.razor. Second VS stops responding, after a while I suspend Debuging and I save dump file. I hope I did it right.
Link to dump file: https://drive.google.com/file/d/1F6BzDeXS1G82r5JzNYCyopv_H5TieLlP/view?usp=sharing
I just installed VS 16.8.0 Preview 2.0. Still got infinite loop in Razor Language Server Client, but now:
@
(not get any Intelisence),System.NullReferenceException : Object reference not set to an instance of an object.
at Microsoft.CodeAnalysis.Razor.MemoryCache2.<>c.<Compact>b__6_0(KeyValuePair
2 x)
at System.Linq.EnumerableSorter2.ComputeKeys(TElement[] elements,Int32 count)
at System.Linq.EnumerableSorter
1.Sort(TElement[] elements,Int32 count)
at System.Linq.OrderedEnumerable1.<GetEnumerator>d__1.MoveNext()
at System.Linq.Enumerable.ElementAt[TSource](IEnumerable
1 source,Int32 index)
at Microsoft.CodeAnalysis.Razor.MemoryCache2.Compact()
at Microsoft.CodeAnalysis.Razor.MemoryCache
2.Set(TKey key,TValue value)
at Microsoft.CodeAnalysis.Razor.Serialization.TagHelperDescriptorJsonConverter.ReadJson(JsonReader reader,Type objectType,Object existingValue,JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter,JsonReader reader,Type objectType,Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list,JsonReader reader,JsonArrayContract contract,JsonProperty containerProperty,String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader,Type objectType,JsonContract contract,JsonProperty member,Object existingValue,String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader,Type objectType,JsonContract contract,JsonProperty member,JsonContainerContract containerContract,JsonProperty containerMember,Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader,Type objectType,Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader,Type objectType)
at Newtonsoft.Json.JsonSerializer.DeserializeT
at Microsoft.CodeAnalysis.Razor.Serialization.TagHelperResolutionResultJsonConverter.<>c__DisplayClass4_0.
at Microsoft.CodeAnalysis.Razor.Serialization.JsonReaderExtensions.ReadProperties(JsonReader reader,Action`1 onProperty)
at Microsoft.CodeAnalysis.Razor.Serialization.TagHelperResolutionResultJsonConverter.ReadJson(JsonReader reader,Type objectType,Object existingValue,JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter,JsonReader reader,Type objectType,Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader,Type objectType,Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader,Type objectType)
at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType,JsonSerializer jsonSerializer)
at Newtonsoft.Json.Linq.JToken.ToObjectT
at StreamJsonRpc.JsonMessageFormatter.JsonRpcResult.GetResultT
at async StreamJsonRpc.JsonRpc.InvokeCoreAsyncTResult
at async Microsoft.CodeAnalysis.Remote.RemoteEndPoint.InvokeAsyncT
@TanayParikh this MemoryCache issue isn't known is it?
@TanayParikh this MemoryCache issue isn't known is it?
Nope, first I'm seeing it.
@TomaszGrzmilas we just fixed the memory cache issue which should ship in 16.8-Preview3. Aside from that exception is your experience still broken?
Like I write before now application is not crashing but after I hit Ctrl+Space inside Component Tag i get only @
(didn't get any Intellisense).
Like I write before now application is not crashing but after I hit Ctrl+Space inside Component Tag i get only
@
(didn't get any Intellisense).
Is there any IntelliSense that you do get?
@NTaylorMullen I updated to version 16.8.0 Preview 2.1. Yes I got IntelliSense at code section, but when I'm inside blazor component I only get @
:/
@NTaylorMullen I updated to version 16.8.0 Preview 2.1. Yes I got IntelliSense at code section, but when I'm inside blazor component I only get
@
:/
Would you mind elaborating with a gif possibly?
@NTaylorMullen I just updated to Version 16.8.0 Preview 3.0 and everything seems to work just fine :) Thanks everyone for their effort in making this software and replying to issue reports !
Most helpful comment
@NTaylorMullen I just updated to Version 16.8.0 Preview 3.0 and everything seems to work just fine :) Thanks everyone for their effort in making this software and replying to issue reports !