vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Frequently unable to save file or file data gets erased with error EBUSY

Open brycehutchings opened this issue 4 months ago • 21 comments

Type: Bug

I often switch between VS and VSCode and for the past month or two, VSCode has started to sometimes fail when I CTRL+S to save. It will show a message "Failed to save : Unable to write file ... (Unknown (FileSystemError): Error: EBUSY: resource busy or locked ...". In the editor the file shows as unsaved and intact, but actually the file has been cleared at this point and is empty.

If I click "Retry" it will still fail, but then I am given an option to "overwrite", and that will work and it will finally store what I had in my editor.

I have frequently been losing code or small changes due to this. If it matters, I am using Dev Drive for the files in question.

VS Code version: Code 1.94.2 (384ff7382de624fb94dbaf6da11977bba1ecd427, 2024-10-09T16:08:44.566Z) OS version: Windows_NT x64 10.0.26100 Modes:

System Info
Item Value
CPUs 13th Gen Intel(R) Core(TM) i9-13900K (32 x 2995)
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
webnn: disabled_off
Load (avg) undefined
Memory (System) 127.81GB (83.21GB free)
Process Argv . --crash-reporter-id 11c0d54b-5322-4b67-bf1a-6b3385489ba7
Screen Reader no
VM 0%
Extensions: none
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30995554
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
9c06g630:31013171
dvdeprecation:31068756
dwnewjupytercf:31046870
impr_priority:31102340
nativerepl2:31139839
refactort:31108082
pythonrstrctxt:31112756
wkspc-onlycs-t:31132770
wkspc-ranged-t:31151552
cf971741:31144450
autoexpandse:31146404
iacca2:31156134
notype1:31157159
controlgs:31153265
5fd0e150:31155592
icondisabled:31158250

brycehutchings avatar Oct 16 '24 22:10 brycehutchings