vscode: Linux Mint Guest OS crashes while using VSCode
Issue Type: Bug
problem: VirtualBoxVM crashes with Application Error while running VSCode
- start with Windows 10
- Run Oracle VirtualBox
- create linux mint VM
- run linux mint VM
- install VSCode for Linux from tar.gz
- clone some repo from GitHub
- cd into local repo and start editor (usually
code -a .
) - work with VSCode in local clone (unsure exactly what activity triggers this)
After some unpredictable amount of time, clicking on a menu or the settings icon (maybe some other actions also trigger), the expected pop-up menu will be all black instead of filled with content. A short time (usually no more than a minute) later, the guest VM will be unresponsive and an Application Error dialog will appear in the Win10 host. The VM is dead at this point. Here is the content of the dialog just received:
The instruction at 0x00007FF84210F161 referenced memory at
0x00000000000000000000000000000000. The memory could not be written.
Click on OK to terminate the program
This has been a consistent problem in the VSCode versions since I started. May be tied to git plugin and editing in a directory that is a git repo.
VS Code version: Code 1.40.0 (86405ea23e3937316009fc27c9361deee66ffbf5, 2019-11-06T18:14:08.920Z) OS version: Linux x64 4.15.0-70-generic
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-8550U CPU @ 1.80GHz (1 x 1991) |
GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled metal: disabled_off multiple_raster_threads: disabled_off oop_rasterization: disabled_off protected_video_decode: unavailable_off rasterization: disabled_software skia_renderer: disabled_off surface_control: disabled_off surface_synchronization: enabled_on video_decode: unavailable_off viz_display_compositor: enabled_on viz_hit_test_surface_layer: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | 1, 1, 0 |
Memory (System) | 5.82GB (3.37GB free) |
Process Argv | -a . --no-sandbox |
Screen Reader | no |
VM | 100% |
Extensions (6)
Extension | Author (truncated) | Version |
---|---|---|
gitlens | eam | 10.1.2 |
vscode-docker | ms- | 0.8.2 |
python | ms- | 2019.10.44104 |
cpptools | ms- | 0.26.2-insiders |
preview-vscode | myh | 1.3.0 |
vscode-print | pdc | 0.7.13 |
Also:
(base) mintadmin@mint-vm:~/.../eclipse/adl2pydm$ more /etc/os-release
NAME="Linux Mint"
VERSION="19.2 (Tina)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 19.2"
VERSION_ID="19.2"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.ubuntu.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=tina
UBUNTU_CODENAME=bionic
Windows 10 host details (running Oracle VirtualBox)
VS Code version: Code 1.40.0 (86405ea23e3937316009fc27c9361deee66ffbf5, 2019-11-06T17:02:13.381Z) OS version: Windows_NT x64 10.0.17763
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-8550U CPU @ 1.80GHz (8 x 1992) |
GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: disabled_off protected_video_decode: enabled rasterization: enabled skia_renderer: disabled_off surface_control: disabled_off surface_synchronization: enabled_on video_decode: enabled viz_display_compositor: enabled_on viz_hit_test_surface_layer: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 15.85GB (6.32GB free) |
Process Argv | -a . |
Screen Reader | no |
VM | 0% |
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 11
- Comments: 48 (5 by maintainers)
Same symptoms here with Centos7. Followed these instructions insode VSCode to fix - no performance changes other than it doesn’t crash!
Open the Command Palette (Ctrl+Shift+P). Run the Preferences: Configure Runtime Arguments command. This command will open a argv.json file to configure runtime arguments. You might see some default arguments there already. Add “disable-hardware-acceleration”: true Restart VS Code.
update: worked with that (
code --disable-gpu -a .
) all day with no problemsLooks like a NULL pointer was not checked, perhaps related to when GPU use is enabled.
Once that line of code is found, will you follow up with Oracle VirtualBox? There is no way that a user program on linux (even in a VM) should crash the entire machine.
Also happens on Ubuntu 19.10, fully updated, latest vs code
Aha! Well, thanks for getting to the root cause of this issue. I confirm your empirical approach to quit as soon as glitches start to appear. That has worked for me as well. For now, this conversation has helped me remember to use
--disable-gpu
when in the VM.Let’s leave this issue open until the upstream (VirtualBox) issues are resolved, if ever. That would be helpful to others who encounter this problem, seeing it as yet unresolved.
And now the VM has crashed with exactly the same VirtualBoxVM.exe - Application Error dialog as originally posted:
The instruction at 0x00007FF84210F161 referenced memory
…Hope this is enough info for y’all to figure this one out.
Closing as the upstream issues https://github.com/microsoft/vscode/issues/84745#issuecomment-561645280 have not gained any momentum. Please continue to disable hardware acceleration in VSCode for this specific setup as workaround.
You should check out a more permanent fix here. Until they fix it, it’s the better we got. P.S. Can you confirm it still works.
I’m having this same issue with a centos 7 vm in a virtual box. Opening right-click context menus will eventually crash the whole VM.
Additionally, if memory serves well, I believe my workaround back in the day was to quit the application with
ctrl-q
as soon as the graphical glitches started to appear. If you catch it in time, you can simply quit and relaunch the application and your VM will keep on truckin’.