-
-
Notifications
You must be signed in to change notification settings - Fork 401
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
End of sketch lost after "Save As" #1798
Comments
Hi @ednieuw. Thanks for your report.
I think you forgot to attach the "damaged file It is not clear to me why you chose to include the temporary files generated by Arduino IDE instead of the permanent sketch folders. These files are only intended to be used internally by the Arduino Language Server and Arduino Firmware Uploader, rather than directly by the user. The user is expected to only directly interact with the permanent sketch files produced by Arduino IDE's "Save As" and "Save" operations. Do you use these files directly? If yes, please describe how you use them. |
Hi Per1234
The attached ZIP file is a kind of history. It contains the used libraries and the script. Because I could not reproduce the error I attached the last compilations as a ‘proof’ that it is happening on my PC. But there is not much for you to do with.
When I do a File->Saveas I see: RP2040-WordClockV019_copy_20230105143508
There is a lot of timestamp gibberish attached after the original file name. Maybe a separate issue to solve and do not add ‘_copy_20230105143508’.
My problem is that something ends the saving process before it is finished and without a warning.
!!!! I repeated the problem once while typing this mail. The other 10 times the file saveas’d correctly.
Attached the original and corrupted file.
|
I see we received another report of this bug later, which received more discussion: #2086 The cause of that bug was identified and fixed by #2027. I checked the files you provided:
From this I can see that the symptoms you reported here match very well with those reported in #2086 So I will close this as fixed. The fix was first introduced in the Arduino IDE 2.2.0 release so you should not encounter this problem when using Arduino IDE versions 2.2.0 or newer. If you are still experiencing this fault, please comment here and I'll investigate further. Thanks again for reporting this serious bug @ednieuw. I apologize for not having found the time to look into this before now. |
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:
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 fileRP2040-WordClockV019
.Before doing the "Save As" operation, I saw that the
V018b
filename had a lot of, probably, temporary characters after theV018b
likeRP2040-WordClockV018b344uiy32i4ui3
or something like thatTo 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
The text was updated successfully, but these errors were encountered: