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
WSL2: 'code .' resulting in Segmentation fault #3117
Comments
Can you run |
|
Sorry, forgot the quotes: |
|
same error here, any improvements? Calling in centos7 wsl2:
And for Ubuntu: > bash -x "$(which code)"
+ '[' '' = true ']'
+ COMMIT=a5d1cc28bb5da32ec67e86cc50f84c67cc690321
+ APP_NAME=code
+ QUALITY=stable
+ NAME=Code
+ DATAFOLDER=.vscode
++++ realpath '/mnt/c/Users/erkan/AppData/Local/Programs/Microsoft VS Code/bin/code'
+++ dirname '/mnt/c/Users/erkan/AppData/Local/Programs/Microsoft VS Code/bin/code'
++ dirname '/mnt/c/Users/erkan/AppData/Local/Programs/Microsoft VS Code/bin'
+ VSCODE_PATH='/mnt/c/Users/erkan/AppData/Local/Programs/Microsoft VS Code'
+ ELECTRON='/mnt/c/Users/erkan/AppData/Local/Programs/Microsoft VS Code/Code.exe'
+ grep -qi Microsoft /proc/version
++ uname -r
++ sed -E 's/^[0-9.]+-([0-9]+)-Microsoft.*|([0-9]+).([0-9]+).([0-9]+)-microsoft-standard.*|.*/\1\2\3\4/'
+ WSL_BUILD=419104
+ '[' -z 419104 ']'
+ '[' 419104 -ge 17063 ']'
+ export WSLENV=ELECTRON_RUN_AS_NODE/w:WT_SESSION:DISPLAY/p:WT_PROFILE_ID
+ WSLENV=ELECTRON_RUN_AS_NODE/w:WT_SESSION:DISPLAY/p:WT_PROFILE_ID
++ wslpath -m '/mnt/c/Users/erkan/AppData/Local/Programs/Microsoft VS Code/resources/app/out/cli.js'
+ CLI='C:/Users/erkan/AppData/Local/Programs/Microsoft VS Code/resources/app/out/cli.js'
+ WSL_EXT_ID=ms-vscode-remote.remote-wsl
+ '[' 419104 -ge 41955 -a 419104 -lt 41959 ']'
+ ELECTRON_RUN_AS_NODE=1
+ '/mnt/c/Users/erkan/AppData/Local/Programs/Microsoft VS Code/Code.exe' 'C:/Users/erkan/AppData/Local/Programs/Microsoft VS Code/resources/app/out/cli.js' --locate-extension ms-vscode-remote.remote-wsl
/mnt/c/Users/erkan/AppData/Local/Programs/Microsoft VS Code/bin/code: line 63: 14966 Segmentation fault ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" --locate-extension $WSL_EXT_ID > /tmp/remote-wsl-loc.txt 2> /dev/null
++ cat /tmp/remote-wsl-loc.txt
+ WSL_EXT_WLOC=
+ '[' -n '' ']'
+ ELECTRON_RUN_AS_NODE=1
+ '/mnt/c/Users/erkan/AppData/Local/Programs/Microsoft VS Code/Code.exe' 'C:/Users/erkan/AppData/Local/Programs/Microsoft VS Code/resources/app/out/cli.js'
/mnt/c/Users/erkan/AppData/Local/Programs/Microsoft VS Code/bin/code: line 64: 14968 Segmentation fault ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
+ exit 139 |
same issue here: $ bash -x "$(which code)"
+ '[' '' = true ']'
+ COMMIT=17299e413d5590b14ab0340ea477cdd86ff13daf
+ APP_NAME=code
+ QUALITY=stable
+ NAME=Code
+ DATAFOLDER=.vscode
++++ realpath '/mnt/c/Users/cesar/AppData/Local/Programs/Microsoft VS Code/bin/code'
+++ dirname '/mnt/c/Users/cesar/AppData/Local/Programs/Microsoft VS Code/bin/code'
++ dirname '/mnt/c/Users/cesar/AppData/Local/Programs/Microsoft VS Code/bin'
+ VSCODE_PATH='/mnt/c/Users/cesar/AppData/Local/Programs/Microsoft VS Code'
+ ELECTRON='/mnt/c/Users/cesar/AppData/Local/Programs/Microsoft VS Code/Code.exe'
+ IN_WSL=false
+ '[' -n Ubuntu ']'
+ IN_WSL=true
+ '[' true = true ']'
+ export WSLENV=ELECTRON_RUN_AS_NODE/w:WT_SESSION::WT_PROFILE_ID
+ WSLENV=ELECTRON_RUN_AS_NODE/w:WT_SESSION::WT_PROFILE_ID
++ wslpath -m '/mnt/c/Users/cesar/AppData/Local/Programs/Microsoft VS Code/resources/app/out/cli.js'
+ CLI='C:/Users/cesar/AppData/Local/Programs/Microsoft VS Code/resources/app/out/cli.js'
+ WSL_EXT_ID=ms-vscode-remote.remote-wsl
+ ELECTRON_RUN_AS_NODE=1
+ '/mnt/c/Users/cesar/AppData/Local/Programs/Microsoft VS Code/Code.exe' 'C:/Users/cesar/AppData/Local/Programs/Microsoft VS Code/resources/app/out/cli.js' --locate-extension ms-vscode-remote.remote-wsl
++ cat /tmp/remote-wsl-loc.txt
+ WSL_EXT_WLOC='c:\Users\cesar\.vscode\extensions\ms-vscode-remote.remote-wsl-0.44.4'
+ '[' -n 'c:\Users\cesar\.vscode\extensions\ms-vscode-remote.remote-wsl-0.44.4' ']'
++ wslpath -u 'c:\Users\cesar\.vscode\extensions\ms-vscode-remote.remote-wsl-0.44.4'
+ WSL_CODE=/mnt/c/Users/cesar/.vscode/extensions/ms-vscode-remote.remote-wsl-0.44.4/scripts/wslCode.sh
+ /mnt/c/Users/cesar/.vscode/extensions/ms-vscode-remote.remote-wsl-0.44.4/scripts/wslCode.sh 17299e413d5590b14ab0340ea477cdd86ff13daf stable '/mnt/c/Users/cesar/AppData/Local/Programs/Microsoft VS Code/Code.exe' code .vscode
Segmentation fault
+ exit 139 $code --verbose
Segmentation fault This is the second time this happens to me, my work around is to make a backup of my projects folder and reinstal ubuntu for wsl. |
I got the same issue in WSL 2, Ubuntu 18.04. After I switch WSL 2 to WSL using Output for
|
Woke up this morning to start work after latest Windows Insider Preview updates and now I am getting this! Is there any known workaround? |
Output for
|
Please also try |
Output for
|
The segmentation fault occurs when running the windows exe of code (/mnt/c/Users/andre/AppData/Local/Programs/Microsoft VS Code/Code.exe) Must be a WSL issue. Maybe related to microsoft/WSL#5274 |
I solved this by renaming the I have copied my extensions over from the .bak folder, so it is something else that is causing the issue. |
I also used the 'opportunity' to move over to the newer Ubuntu 20.04 LTS WSL distribution. I used a regex ( |
Thanks for @drewhemm. This works for me! |
this solution( |
We have two issues on segmentation faults This issue is for a. For b. we have #3556 Closing this issue. |
Issue Type: Bug
navigate to desired folder to be opened by wsl2 ubuntu 20.04, write "code ." and hit enter.
VS Code version: Code 1.45.1 (5763d909d5f12fe19f215cbfdd29a91c0fa9208a, 2020-05-14T08:27:35.169Z)
OS version: Windows_NT x64 10.0.19635
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Extensions (14)
(2 theme extensions excluded)
The text was updated successfully, but these errors were encountered: