Skip to content

End of sketch lost after "Save As" #1798

Closed
@ednieuw

Description

@ednieuw

Describe the problem

When I develop a program I regularly save the script with a new filename containing the version number.

From the first version of the IDE 2.0 I have had problems with Save As such as:

  • Sketch being saved in the Arduino sketch root folder.
  • IDE freezing during a save./
  • Part of the sketch being lost.

I experienced the problem of the last part of the sketch being lost when using Arduino IDE 2.0.3.

I attached the last compilations of version RP2040-WordClockV018b and the damaged file RP2040-WordClockV019.

Before doing the "Save As" operation, I saw that the V018b filename had a lot of, probably, temporary characters after the V018b like RP2040-WordClockV018b344uiy32i4ui3 or something like that

To reproduce

I have no idea to reproduce this.

I compile for an Arduino Nano RP2040 Connect with the standard Arduino board settings.

Autosave is off because I regularly save the file manually.

Expected behavior

No sketch contents are lost after doing a "Save As" operation.

Arduino IDE version

2.0.3

Operating system

Windows

Operating system version

11

Additional context

I attached the ZIP with the last compilation temp files:

Temp.zip

  • arduino-language-server1763127236: contains the last complete "V018b" sketch file before the "Save As" operation to produce the "V019" version.
  • arduino-language-server3607719326: contains the damaged "V019" sketch file.

I regularly put the PC in Hibernation or in Sleep then taking a pause for myself


I did not test with the nightly built

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions