New Release Today? Random files being generated in Workspace!?

:heart: :ukraine:
When I logged on this morning I saw that there was a platform upgrade and so implemented it and restarted VSC.
Home page shows Core 5.2.5 Home 3.4.1
Now I am getting random files of zero length being scattered through the current workspace and folder
image

It is a new ‘feature’ and does not appear to be happening anywhere else in my system (not widespread soft/hard fault).

Is there an install file in VSC that I can see what was actually installed?

I have tried to downgrade using

 pip install -U "platformio<5.2.4" 

But that has not worked according to the homepage. Did I do a downgrade wrong?

I am just a bit paranoid that this is part of a wider cyber attack in the current circumstances

Also reported in Unable to resolve configuration with compiler path ERROR and generating random files in projects and Problem with platformio.ini "creating some garbage files when I open any project that contain platformio.ini".

1 Like

There were definitely commits in the last 2 days but the last stable is from februrary. So if you were using the stable version, nothing should have changed… Commits · platformio/platformio-core · GitHub

CC @ivankravets

The update notification was on the settings icon of the left VSC menu. Would that have been a VSC update or do PIO also show on the same notification?
My VSC about shows it was last updated on Mar 10th (I think!)

Version: 1.65.2 (user setup)
Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
Date: 2022-03-10T14:33:55.248Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19043

I have just upgraded again to
Using cached platformio-5.2.5.tar.gz (218 kB)
Looks like the home page notification didn’t change but the PIO version did downgrade

I am only using full releases not pulling from individual commits

I’m on the same VSCode version and running the very latest dev version of the core CLIpio upgrade --dev) and I cannot reproduce this random files behavior. I cleaned and built a simple Uno project multiple times.

With the C/C++ extension, are you on the release or pre-release path and version? I’m on the stable 1.8.4 version.

(Cogwheel → Install Another Version)

I am tempted to think it is a corruption of VSC not PIO - If I knew more about the upgrade notification - where it came from and what was loaded, it would help pin it down.

I guess MS VSC would be a greater target for attack (my paranoia again :woozy_face:)

Hmm … It showed I needed a reload and was on the very latest pre-release 1.9.5

This not something I would have consciously done and certainly not today - I guess that this could have been the source of the upgrade notification?

Retesting now

So far so good no new garbage!

Another symptom which started at the same time and still persists - the following C/C++ Configuration Warnings

[18/03/2022, 8:12:58 am] Unable to resolve configuration with compilerPath "C:/Users/mick/.platformio/packages/toolchain-xtensa32@2.50200.97/bin/xtensa-esp32-elf-gcc.exe".  Using "C:\esp\msys32\usr\bin\gcc.exe" instead.
[18/03/2022, 8:13:00 am] Unable to resolve configuration with compilerPath "C:/Users/mick/.platformio/packages/toolchain-xtensa32@2.50200.97/bin/xtensa-esp32-elf-gcc.exe".  Using "C:\esp\msys32\usr\bin\gcc.exe" instead.
[18/03/2022, 8:13:03 am] Unable to resolve configuration with compilerPath "C:/Users/mick/.platformio/packages/toolchain-xtensa@2.40802.200502/bin/xtensa-lx106-elf-gcc.exe".  Using "C:\esp\msys32\usr\bin\gcc.exe" instead.
[18/03/2022, 8:13:05 am] Unable to resolve configuration with compilerPath "C:/Users/mick/.platformio/packages/toolchain-xtensa@2.40802.200502/bin/xtensa-lx106-elf-gcc.exe".  Using "C:\esp\msys32\usr\bin\gcc.exe" instead.
[18/03/2022, 8:13:07 am] Unable to resolve configuration with compilerPath "C:/Users/mick/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-gcc.exe".  Using "C:\esp\msys32\usr\bin\gcc.exe" instead.
[18/03/2022, 8:13:12 am] Unable to resolve configuration with compilerPath "C:/Users/mick/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-gcc.exe".  Using "C:\esp\msys32\usr\bin\gcc.exe" instead.

Hmm… This is when the problems started!
image

You can remove toolchain folders ("C:/Users/mick/.platformio/packages/toolchain-xtensa32@2.50200.97/) and PlatformIO will try to redownload it. Maybe it’s a leftover from the previous corruption and it won’t do that again? Please tell if it does.

2 Likes

Hi @maxgerhardt

Thank you mucho!

That has worked in getting rid of the warnings. There were zero length .exe files in all the toolchains from that time this morning. Very odd!

If there is anything I can do to help the diagnostics of this, please let me know.

Maybe a bit premature to mark as solved?

Now PIO seems to have lost all knowledge of Arduino when testing with a basic blink example.

image

Ok… I have found numerous corruptions (zero-length files) in the frameworks folders for PIO.

I have reloaded all the frameworks and now my projects appear to compile without the hundreds of previous errors.

My problems might be resolved (I’ll see if there are other problems that occur through the dev/rel workflow)

But as yet I don’t think anyone has identified the ‘root cause’ that has impacted many in the last 24-36 hours.

How was the bug previously triggered? A simple clean & build?

Is there any more corruption happening after you let PIO redownload the packages and switched the C/C++ extension version to the release one?

Edit: Seems like https://github.com/microsoft/vscode/issues/145297 / Version 1.9.4 (pre-release) C++ extension automatically creates garbled files in the workspace · Issue #9041 · microsoft/vscode-cpptools · GitHub indeed .

2 Likes