[SOLVED] Compilation error

Hi @negativ3.

Do they disappear immediately after the upload finishes, or do they only disappear when you make the next upload attempt?

Are there a bunch of other folders in C:\Users\Dell\AppData\Local\Temp\, or is it empty? I ask this because usually there is a ton of stuff left over from all your different applications (because Windows doesn't actively clean that folder). If it is empty then this would indicate that some system is automatically cleaning the folder).

Arduino IDE 1.x does delete those folders when you exit the IDE, but it does not delete them while the IDE is running. So it seems like the folders are being deleted by your operating system or some other application.

Are the folders deleted, or only the files in the folders deleted? I ask because Arduino IDE should recreate the folders if they are not present. So, even though the folders being deleted is problematic because it means you must wait for a full compilation every time instead of reusing the objects that were cached during the previous compilation, I would not expect it to cause the compilation to fail. It seems like whatever system is deleting the folder is also interfering during the compilation process.

You might check to see if your antivirus/security software is the culprit. It could be quarantining the folder, or blocking Arduino IDE from creating it. As an experiment, you can try :warning: TEMPORARILY :warning: disabling the security software/antivirus on your computer for a single compilation to see if the problem goes away:

  1. Disable the security software/antivirus software.
  2. Compile or upload the sketch, just as you did before.
  3. Wait for the process to finish.
  4. Immediately enable the security software/antivirus software again.

If the problem doesn't occur when you tried a compilation or upload while the security software was disabled, you will need to adjust the settings of your antivirus to put the appropriate file, folder, or process on the "allowlist" so it doesn't interfere with compilation.


:warning: Please be cautious about working with the security software disabled. This is only about temporarily disabling it for a quick test. If you don't feel comfortable doing that, fine. You can try going straight to configuring the security software so that it does not interfere with the Arduino software.


Hi @ptillisch ,

With explorer open, I observed the folders were being deleted upon verify/upload being chosen the second time, so not immediate following a successful verify/upload. Many other folders/files exist there as you say.

It appears Malwarebytes have enabled an ai sentry to their suite of protection, which after disabling [plus disabling baked in windows protection] made no difference.

I enabled Arduino.exe to be run-as-administrator, after which the temp folder deletion stopped and the program is working normally now.

Windows may have updated something else causing the system folders to be monitored, but I'm guessing.

If it misbehaves again I will jump back in.

Many thanks for your detailed and considered advice.
Andy.

You are welcome. I'm glad it is working now. Thanks for taking the time to post an update!

Regards, Per