Skip to content
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

Opening File Diff in Source Control Crashes Microsoft.CodeAnalysis.LanguageServer #7399

Closed
tophattwaffle opened this issue Jul 28, 2024 · 2 comments

Comments

@tophattwaffle
Copy link

tophattwaffle commented Jul 28, 2024

Type: Bug

Issue Description

While working on Unity project, opening a file Diff under source control ends up crashing the Microsoft.CodeAnalysis.LanguageServer and it never restarts until VSCode is closed and reopened.

[LanguageServerHost] System.InvalidOperationException: Unsupported extension '.cs%22,%22ref%22:%22~%22%7D' and LSP language id '' is shown in output.

Steps to Reproduce

Open a C# project
Edit File
View diff under Source Control

Expected Behavior

View Diff without crash

Actual Behavior

Crashes the language server and requires restart

Environment information

VSCode version: 1.91.1
C# Extension: 2.39.29
Using OmniSharp: false

Logs

logs.zip

Dotnet Information .NET SDK: Version: 7.0.101 Commit: bb24aafa11

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.101\

Host:
Version: 8.0.3
Architecture: x64
Commit: 9f4b1f5d66

.NET SDKs installed:
3.1.405 [C:\Program Files\dotnet\sdk]
5.0.102 [C:\Program Files\dotnet\sdk]
5.0.415 [C:\Program Files\dotnet\sdk]
6.0.400 [C:\Program Files\dotnet\sdk]
7.0.101 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
arm64 [C:\Program Files\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\arm64\InstallLocation]
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Visual Studio Code Extensions
Extension Author Version Folder Name
cisco jamiewoodio 1.9.1 jamiewoodio.cisco-1.9.1
close-all benjpas 1.0.2 benjpas.close-all-1.0.2
cmake twxs 0.0.17 twxs.cmake-0.0.17
cmake-tools ms-vscode 1.18.43 ms-vscode.cmake-tools-1.18.43
code-spell-checker streetsidesoftware 3.0.1 streetsidesoftware.code-spell-checker-3.0.1
cpptools ms-vscode 1.21.4 ms-vscode.cpptools-1.21.4-win32-x64
cpptools-extension-pack ms-vscode 1.3.0 ms-vscode.cpptools-extension-pack-1.3.0
cpptools-themes ms-vscode 2.0.0 ms-vscode.cpptools-themes-2.0.0
csdevkit ms-dotnettools 1.8.14 ms-dotnettools.csdevkit-1.8.14-win32-x64
csharp ms-dotnettools 2.39.29 ms-dotnettools.csharp-2.39.29-win32-x64
csharp-colors logerfo 0.2.1 logerfo.csharp-colors-0.2.1
csv-to-table phplasma 1.4.0 phplasma.csv-to-table-1.4.0
debugpy ms-python 2024.8.0 ms-python.debugpy-2024.8.0-win32-x64
gc-excelviewer GrapeCity 4.2.59 grapecity.gc-excelviewer-4.2.59
githistory donjayamanne 0.6.20 donjayamanne.githistory-0.6.20
gitlens eamodio 15.2.3 eamodio.gitlens-15.2.3
gitless maattdd 11.7.2 maattdd.gitless-11.7.2
hexeditor ms-vscode 1.10.0 ms-vscode.hexeditor-1.10.0
isort ms-python 2023.10.1 ms-python.isort-2023.10.1
jsonviewer ccimage 1.5.0 ccimage.jsonviewer-1.5.0
jupyter ms-toolsai 2024.6.0 ms-toolsai.jupyter-2024.6.0-win32-x64
jupyter-keymap ms-toolsai 1.1.2 ms-toolsai.jupyter-keymap-1.1.2
jupyter-renderers ms-toolsai 1.0.18 ms-toolsai.jupyter-renderers-1.0.18
makefile-tools ms-vscode 0.9.10 ms-vscode.makefile-tools-0.9.10
nc-gcode ML 0.13.0 ml.nc-gcode-0.13.0
platformio-ide platformio 3.3.3 platformio.platformio-ide-3.3.3-win32-x64
powershell ms-vscode 2024.2.2 ms-vscode.powershell-2024.2.2
python ms-python 2024.10.0 ms-python.python-2024.10.0-win32-x64
rainbow-csv mechatroner 3.12.0 mechatroner.rainbow-csv-3.12.0
remote-explorer ms-vscode 0.4.3 ms-vscode.remote-explorer-0.4.3
remote-ssh ms-vscode-remote 0.112.0 ms-vscode-remote.remote-ssh-0.112.0
remote-ssh-edit ms-vscode-remote 0.86.0 ms-vscode-remote.remote-ssh-edit-0.86.0
sync-scroll dqisme 1.3.1 dqisme.sync-scroll-1.3.1
todo-tree Gruntfuggly 0.0.226 gruntfuggly.todo-tree-0.0.226
unity-code-snippets kleber-swf 2.4.0 kleber-swf.unity-code-snippets-2.4.0
unity-tools Tobiah 1.2.12 tobiah.unity-tools-1.2.12
vscode-autohotkey-plus-plus mark-wiemer 5.0.5 mark-wiemer.vscode-autohotkey-plus-plus-5.0.5
vscode-dotnet-runtime ms-dotnettools 2.1.1 ms-dotnettools.vscode-dotnet-runtime-2.1.1
vscode-electricimp electricimp 1.0.0 electricimp.vscode-electricimp-1.0.0
vscode-html-css ecmel 2.0.10 ecmel.vscode-html-css-2.0.10
vscode-jupyter-cell-tags ms-toolsai 0.1.9 ms-toolsai.vscode-jupyter-cell-tags-0.1.9
vscode-jupyter-slideshow ms-toolsai 0.1.6 ms-toolsai.vscode-jupyter-slideshow-0.1.6
vscode-pylance ms-python 2024.7.1 ms-python.vscode-pylance-2024.7.1
vscode-theme-onedark akamud 2.3.0 akamud.vscode-theme-onedark-2.3.0
vscodeintellicode-csharp ms-dotnettools 2.1.11 ms-dotnettools.vscodeintellicode-csharp-2.1.11-win32-x64
vsliveshare ms-vsliveshare 1.0.5936 ms-vsliveshare.vsliveshare-1.0.5936
vstuc visualstudiotoolsforunity 1.0.2 visualstudiotoolsforunity.vstuc-1.0.2

Extension version: 2.39.29
VS Code version: Code 1.91.1 (f1e16e1e6214d7c44d078b1f0607b2388f29d729, 2024-07-09T22:06:49.809Z)
OS version: Windows_NT x64 10.0.19045
Modes:

System Info
Item Value
CPUs AMD Ryzen 9 5950X 16-Core Processor (32 x 3400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 63.92GB (20.82GB free)
Process Argv D:\TimeTok\TimeTok --crash-reporter-id d85c62b4-766d-4320-86af-a83a95d9ff74
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
0ee40948:31013168
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupyter:31046869
impr_priority:31102340
nativerepl1:31104043
refactort:31101459
ccpltc:31103427
pythonrstrctxt:31103193
1iic9185:31097392
wkspc-onlycs-t:31102394

@dibarbet
Copy link
Member

dibarbet commented Jul 31, 2024

Fixed by dotnet/roslyn#74544, will be available in a prerelease version next week. Will update here once available. As a temporary workaround uncheck this option:
image

@dibarbet
Copy link
Member

FYI - the fix is in the latest prerelease version v2.43.16 (pre-release)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants