Version 1.9.4 (pre-release) C++ extension automatically creates garbled files in the workspace
Bug type: Language Service
Describe the bug
- OS and Version: Win11
- VS Code Version: 1.65.2
- C/C++ Extension Version: 1.9.4(pre-release)
- Other extensions you installed (and if the issue persists after disabling them):
- If using SSH remote, specify OS of remote machine: Cent0S 7
- A clear and concise description of what the bug is, including information about the workspace (i.e. is the workspace a single project or multiple projects, size of the project, etc).
I updated to version 1.9.4 (pre-release), C/C++ automatically creates garbled files in the workspace,please check it, thanks
@wendal Okay, thanks, that rules out some changes we made post-1.9.4-prerelease1 as the cause.
1.9.5 is released -- which reverts to the 1.9.3 binaries, which should fix this issue.
We're still investigating an actual fix though...
@sean-mcmanus Thanks, it's good for me
The repro of renaming a folder doesn't repro the issue for us. None of us on our team have been able to repro the issue so far on multiple machines and projects (user specified GitHub projects along with LLVM). We have not identified what factor causes the repro.
We've released a 1.9.6-prerelease1 update on GitHub (not via the Marketplace) that has a fix for a read of deleted memory along with the other reverted changes, but since we don't know how that read of deleted memory could cause the bug and we can't repro the bug, we're not sure yet if it's been fixed or not. We've run cpptools under Application Verifier and so far have not found any memory corruption issue.
I've created a discussion at https://github.com/microsoft/vscode-cpptools/discussions/9048 .
@sean-mcmanus
I was unable to repro the issue in 1.9.4 with C_Cpp: Logging Level set to debug When logging level was returned back to default, the issue appears again
@sean-mcmanus Thanks a lot -- that makes sense (we typically test with debug logging set to Debug) -- changed the logging level to Error and now I got a app verifier hit with 1.9.6-prerelease1, i.e. it wasn't fixed. Investigating now...
I was hitting this bug today at work. I was using VSCode with a windows client over SSH into a Linux host. I only saw files generated in the base directory of my workspace on the Linux machine.
@mtvjr Yeah, there was uninitialized memory being used so if the memory happened to point to an existing file it would get reset to empty. It's been fixed for our pending 1.9.6 (1.9.5 has the changes reverted) and we're looking into various ways this could be prevented in the future.
A python tool(works in Linux OS) wrote to delete files generated by this problem: https://github.com/wangym307/del_null_file I hope it was useful for you, though it have risk of deleting useful null file.
@sean-mcmanus Is there a 1.9.6 pre-release Linux VSIX as well? I have to install all of my extensions on an standalone machine and ran across this yesterday, specifically using the same setup as @mtvjr. I should add that in addition to creating those files, it somehow managed to corrupt my workspace to the point where I could not build (had to blow away and pull again but the problem keeps happening).
@jake-the-eng The 1.9.6 pre-release version is not yet shipped, but when it is available the VSIX will be available for all our supported platforms including Linux.
You can use 1.9.5 pre-release (which does not have the file corruption issue) if you'd like until 1.9.6 is available. The 1.9.5 pre-release VSIX for all our supported platforms can be downloaded from https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools.
I see this was moved to being done, but I didn't see it in the release notes for 1.9.7. Was this issue resolved for this release or was the behavior rolled back like the 1.9.5 prerelease?
@jharmer95 We remove stuff from the "release" version release notes (changelog) that were not reproduceable in the previous release version, i.e. 1.8.4, and since this issue only reproed with 1.9.4 (pre-release) it doesn't appear in the changelog for 1.9.7 -- the fix was noted in the changelog for 1.9.5 (as a reversion) and 1.9.6 (as a "proper" fix with the other fixes).