Skip to content

Temporary files are not cleaned up #1795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
per1234 opened this issue Jan 2, 2023 · 3 comments
Open
3 tasks done

Temporary files are not cleaned up #1795

per1234 opened this issue Jan 2, 2023 · 3 comments
Labels
topic: code Related to content of the project itself topic: theia Related to the Theia IDE framework type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Jan 2, 2023

Describe the problem

The Arduino IDE application creates some temporary folders:

  • Name format: arduino-ide2-0694b57a37dbff387afae61891204d75/
    • One folder created for each IDE window that is opened.
  • Name format: .arduinoIDE-unsaved202301-12372-u0dvfq.rtr7i/
    • One folder created for each unsaved sketch
  • Name format: gdb-server-console-6800.log
  • Name: github-remote/
  • Name: http-remote/
  • Name: theia_upload/

These persist even after the user exits the IDE.

In the case of the first two on the list above, the folders accumulate over time, which may eventually cause a performance impact.

To reproduce

  1. Take note of the contents of your temporary folder.
    • Windows:
      C:\Users\<user name>\AppData\Local\Temp
      
    • Linux:
      /tmp
      
    • macOS
      $TMPDIR
      
  2. Start Arduino IDE.
  3. Select File > New from the Arduino IDE menus.
    This is treated as an unsaved sketch.
  4. Select File > Quit from the Arduino IDE menus.
  5. Examine the contents of your temporary folder.

🐛 An additional folder is present for each of the IDE windows you opened.
🐛 An additional folder is present for each of the unsaved sketches you opened.
🐛 An additional gdb-server-console-nnnn.log file is present for each of the IDE windows you opened.
🐛 The github-remote/, http-remote/, and theia_upload/ temporary folders Arduino IDE creates are still present

Expected behavior

Temporary files are cleaned up on exit.

Arduino IDE version

76f9f63

Operating system

  • Windows
  • Linux
  • macOS

Operating system version

  • Windows 11
  • Ubuntu 22.04
  • macOS Ventura

Additional context

This is similar to #1779. However, the two are distinct in that #1779 allows for easier management of the temporary files during runtime (e.g., configuring antivirus software exclusions) and manual cleanup of files leftover when the application is not able to perform an automatic cleanup (e.g., power outage, crash).


Some operating systems may eventually do a clean-up on the temporary folder, but this is not guaranteed. It is better for the application to take care of clean up of any temporary files once they are no longer needed.


Additional temporary files are generated by tools used by Arduino IDE (e.g., Arduino CLI, arduino-fwuploader, Arduino Language Server, clangd). Cleanup of those file should be the responsibility of the individual tool, not Arduino IDE, so cleanup of those files is out of scope for this issue.

They are tracked in the repositories of those projects:

Additional reports

Related

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project topic: theia Related to the Theia IDE framework labels Jan 2, 2023
@gashtaan

This comment was marked as duplicate.

@dlarue

This comment was marked as duplicate.

@ednieuw

This comment was marked as duplicate.

@arduino arduino locked as too heated and limited conversation to collaborators Jun 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic: code Related to content of the project itself topic: theia Related to the Theia IDE framework type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

4 participants