Closed unleashed7 closed 1 year ago
The not reconnecting after a restart is a known issue, see - https://github.com/dotnet/vscode-csharp/issues/5882 A workaround is to reload the window.
However the System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
is not known. Will take a look at that.
So I'm not able to reproduce this on my machine using unity - would you be able to share your project here (or via my email on my github profile)?
We seem to be having issues right here https://sourceroslyn.io/#Microsoft.CodeAnalysis.Scripting/ClrGlobalAssemblyCache.cs,66
I'm not very familiar with this part of the code - it looks like we're trying to find assemblies in the GAC to try and find the SDK assembly containing List
Apologies for the delay! Here is the requested completely new project created with the latest recommended Unity version 2022.3.8f1.
Please note, there's another issue at the moment for me, since upgrading the whole Code environment to the new Unity extension (before the current issue), with creating new Unity projects. New projects install the Engineering package with Visual Studio Editor 2.0.18 for some reason, which breaks Code connection completely. The workaround I found is, uninstalling Engineering (since VS Editor package is locked as a dependency), installing the latest VS Editor 2.0.20, then reinstalling the Engineering package and reopen project. This is also a reproducable issue and workaround for me, I might report this too another time.
It's probably not related to the current issue, but just in case.
It looks like we're throwing when iterating the GAC (global assembly cache) for metadata assemblies. It is possible something in your GAC is corrupted, but its hard to tell with just the stack trace.
Would it be possible for you to collect a crash dump of the process? The easiest way is probably to launch vscode with two specific environment variables - DOTNET_DbgEnableMiniDump
to 1
, and DOTNET_DbgMiniDumpName
to a path you can write to. Then you launch vscode from that same shell to ensure the environment variables are picked up.
For example, in powershell you'd use the following commands:
PS C:\Users\dabarbet\source\repos\ConsoleApp4> $env:DOTNET_DbgEnableMiniDump=1
PS C:\Users\dabarbet\source\repos\ConsoleApp4> $env:DOTNET_DbgMiniDumpName="C:\Users\dabarbet\coredump"
PS C:\Users\dabarbet\source\repos\ConsoleApp4> code .
Then when the server process crashes dotnet will create a crash dump at the location you specified. You can then email that to me directly (if its small enough), or if its large (could be tens of gb) upload to a file server and send that link to me via email.
I had to dump it as a file, so used \coredump.%p
and uploaded to cloud, hope that's fine. Sent it through to dabarbet@microsoft.com just now!
Also noticed three things:
float
word in Code for example, rather if I continuously hold Ctrl and move my mouse over a problematic keyword (int, float, etc.) the crash occurs.It's extremely bothersome to reload the window 30 times in an hour, as I trigger the crash on accident while saving, copying, pasting and so on. Hope there's a solution to this.
I had to dump it as a file, so used \coredump.%p and uploaded to cloud, hope that's fine. Sent it through to dabarbet@microsoft.com just now!
Got the dump! The fix for this should be here - https://github.com/dotnet/roslyn/pull/69936 Hopefully will be in next weeks release if I can get the change in.
It didn't make it into today's release, but it should be in next weeks.
It didn't make it into today's release, but it should be in next weeks.
No problem at all, thanks for the heads-up! If it's possible when the patch arrives, could let me know what extension to update exactly, so I can test it if it works, would be greatly appreciated!
@unleashed7 the fix should be in 2.5.30 which we just released - let me know if it is working better!
@dibarbet You did it!! Thank you so much, I've been so bothered by this ever since, I got the habit of moving my mouse to the edge of the screen before every Ctrl + S.. Finally it's over!
Type: Bug
Issue Description
Quick fix for IDE0090 keeps crashing IntelliSense.
Steps to Reproduce
Actual Behavior
Logs
20230826T193755.zip
Note: Log shortened because of character limit.
C# LSP Trace Logs
Environment information
VSCode version: 1.81.1 C# Extension: 2.0.413 Using OmniSharp: false
Dotnet Information
Error running dotnet --info: Error: Command failed: C:\Program Files\dotnet\dotnet.exe --info 'C:\Program' is not recognized as an internal or external command, operable program or batch file. 'C:\Program' is not recognized as an internal or external command, operable program or batch file.Visual Studio Code Extensions
|Extension|Author|Version|Folder Name| |---|---|---|---| |combinefiles|wangzhen|0.0.2|wangzhen.combinefiles-0.0.2| |csdevkit|ms-dotnettools|0.3.21|ms-dotnettools.csdevkit-0.3.21-win32-x64| |csharp|ms-dotnettools|2.0.413|ms-dotnettools.csharp-2.0.413-win32-x64| |csv-to-table|phplasma|1.4.0|phplasma.csv-to-table-1.4.0| |discord-tools|Darkempire78|1.5.0|darkempire78.discord-tools-1.5.0| |dupchecker|jianbingfang|0.1.7|jianbingfang.dupchecker-0.1.7| |eppz-code|eppz|1.2.52|eppz.eppz-code-1.2.52| |gc-excelviewer|GrapeCity|4.2.58|grapecity.gc-excelviewer-4.2.58| |jupyter|ms-toolsai|2023.7.1002162226|ms-toolsai.jupyter-2023.7.1002162226-win32-x64| |jupyter-keymap|ms-toolsai|1.1.2|ms-toolsai.jupyter-keymap-1.1.2| |jupyter-renderers|ms-toolsai|1.0.17|ms-toolsai.jupyter-renderers-1.0.17| |language-liquid|neilding|0.1.1|neilding.language-liquid-0.1.1| |lucidocean-plurge|LucidOcean|0.0.5|lucidocean.lucidocean-plurge-0.0.5| |permute-lines|earshinov|1.1.0|earshinov.permute-lines-1.1.0| |poweron|0sawaqed|1.0.10|0sawaqed.poweron-1.0.10| |python|ms-python|2023.14.0|ms-python.python-2023.14.0| |sort-lines|Tyriar|1.10.2|tyriar.sort-lines-1.10.2| |theme-by-language|jsaulou|1.2.1|jsaulou.theme-by-language-1.2.1| |timing|HaaLeo|2.7.2|haaleo.timing-2.7.2| |turbo-console-log|ChakrounAnas|2.9.6|chakrounanas.turbo-console-log-2.9.6| |unity-code-snippets|kleber-swf|2.2.5|kleber-swf.unity-code-snippets-2.2.5| |unity-toolbox|pixl|3.0.0|pixl.unity-toolbox-3.0.0| |unity-tools|Tobiah|1.2.12|tobiah.unity-tools-1.2.12| |vetur|octref|0.37.3|octref.vetur-0.37.3| |vscode-autohotkey-debug|zero-plusplus|1.11.0|zero-plusplus.vscode-autohotkey-debug-1.11.0| |vscode-autohotkey-plus-plus|mark-wiemer|5.0.3|mark-wiemer.vscode-autohotkey-plus-plus-5.0.3| |vscode-combine-scripts|BateleurIO|2.0.5|bateleurio.vscode-combine-scripts-2.0.5| |vscode-dotnet-runtime|ms-dotnettools|1.7.1|ms-dotnettools.vscode-dotnet-runtime-1.7.1| |vscode-eslint|dbaeumer|2.4.2|dbaeumer.vscode-eslint-2.4.2| |vscode-jupyter-cell-tags|ms-toolsai|0.1.8|ms-toolsai.vscode-jupyter-cell-tags-0.1.8| |vscode-jupyter-slideshow|ms-toolsai|0.1.5|ms-toolsai.vscode-jupyter-slideshow-0.1.5| |vscode-liquid-snippets|killalau|2.0.3|killalau.vscode-liquid-snippets-2.0.3| |vscode-pets|tonybaloney|1.24.0|tonybaloney.vscode-pets-1.24.0| |vscode-pylance|ms-python|2023.8.40|ms-python.vscode-pylance-2023.8.40| |vscodeintellicode-csharp|ms-dotnettools|0.1.26|ms-dotnettools.vscodeintellicode-csharp-0.1.26-win32-x64| |vstuc|visualstudiotoolsforunity|0.9.0|visualstudiotoolsforunity.vstuc-0.9.0|;Extension version: 2.0.413 VS Code version: Code 1.81.1 (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:22:42.175Z) OS version: Windows_NT x64 10.0.19043 Modes:
System Info
|Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-10850K CPU @ 3.60GHz (20 x 3600)| |GPU Status|2d_canvas: enabledcanvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|31.92GB (10.52GB free)| |Process Argv|K:\\Unity\\My project (1) -g K:\\Unity\\My project (1)\\Assets\\NewBehaviourScript.cs:1:0 --crash-reporter-id a0484d8e-a2c7-49bc-aa3c-5fbf8a21e2a6| |Screen Reader|no| |VM|40%|
A/B Experiments
``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 py29gd2263:30792226 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 vsccc:30803844 2e4cg342:30602488 89544117:30613380 showlangstatbar:30737416 03d35959:30757346 pythonfmttext:30731395 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 gsofb:30804716 pythonnosmt12:30797651 pythonidxpt:30805730 pythonnoceb:30805159 dsvsc013:30795093 dsvsc014:30804076 diffeditorv2:30821572 ```