Why VS Code’s C++ Extension 1.9.4 Randomly Creates and Deletes Files – The Hidden Bug Explained
A recent VS Code bug in the C++ extension 1.9.4 causes the editor to generate numerous empty files with invalid names, corrupt user data, and even erase system files, stemming from memory‑dump artifacts and pointer issues that disappear when the extension is downgraded or disabled.
Visual Studio Code has encountered a new bug.
A user named na-an reported that when opening a folder with VS Code, the editor automatically creates many empty files containing invalid code. The issue was posted on the VS Code GitHub repository and sparked extensive discussion.
The automatically created files have varied name lengths and contain non‑valid Unicode sequences (e.g., \312\316\361 in octal).
Analysis shows these random files appear to originate from a running process’s memory dump, containing strings typically found in executable files and exhibiting pointer‑related stack corruption.
Beyond flooding the workspace with empty files, the bug also randomly modifies user files; for example, all contents of files prefixed with the username daantimmer were cleared to 0 KB, making recovery impossible without prior backups.
The problem is not limited to the current workspace—it can also erase certain system files or directories.
The bug has been observed on both Windows and Linux. All affected users share a common factor: they write C++ code and use the VS Code C++ extension. Disabling all extensions or reverting to the stable version 1.8.4 eliminates the issue.
The root cause lies in the pre‑release version 1.9.4 of the VS Code C++ extension, which introduces file‑system defects due to unstable code.
The extension developers are unaware of the exact problem in version 1.9.4. The memory‑corruption appears linked to long‑standing unresolved file‑damage bugs in the extension (issues α4573 and 5061).
Current speculation suggests that version 1.9.4 unintentionally uses uninitialized memory, and pointer issues trigger file‑system errors, especially when interacting with external third‑party subsystems that do not follow modern C++ coding standards.
The simple fix is to avoid installing the C++ extension 1.9.4. Versions 1.9.5, 1.9.3, 1.8.4, and the newly released 1.9.6 do not exhibit this problem.
Article reposted from SegmentFault (copyright belongs to the original author).
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
