Hi, just installed the new ide 2.0. A few times i had the following experience.
When I use ''save as..'' I change the name of my sketch with an ascending number. So I also change the proposed name of the compiler. After this (sometimes) I get a blank screen with index and the program hangs. After closing completely (with the windows task manager) the compiler does not start with the last saved sketch. However, when I open it manually it appears that more than 80 percent of my sketch has disappeared. Anyone having the same experience ? Thx.
If I choose save as.. then the compiler puts an addition after the original name. It looks like a timestamp. I replace that with a self-selected addition.
Hi @evve. Thanks for your report. I'm sorry about this problem with the saving of your sketches.
If possible, please take a screenshot of the Arduino IDE the next time it is in this state. It is possible there might be some important details that the people knowledgeable about the IDE application can spot by looking at it.
You can take screenthat by pressing Alt+Print Screen on your keyboard, which will copy the screenshot to your clipboard. You are also welcome to screenshot by any other procedure you prefer.
You can then add the screenshot to a reply here by doing any one of the following:
Press Ctrl+V to paste the screenshot from the clipboard.
Save the screenshot as an image and then drag and drop it into a forum reply.
Save the screenshot as an image, click the upload button () in the post composer toolbar, and then select the image file.
Is there any sort of a pattern to the missing part of the sketch?
For example, is the missing part the code you wrote most recently?
It is difficult to reproduce the problem. Sometimes it goes well and sometimes it doesn't. My sketch is 850kb in size and has about 15000 lines. The times the saving did not go well my sketch was deleted about after line 2400. In my attempts to reproduce the problem I noticed that sometimes saving caused the IDE to hang and I could only exit using task management.
My board is a Teensy 4.1. The behavior varies and this also makes it somewhat difficult to take screenshots.
Sometimes when I save the sketch, the compiler screen is blank and the IDE hangs. The name of the sketch is at the top though. And when I look in explorer the file is saved. But i have to restart the IDE.
Could the type of board and/or the board manager have something to do with this ?
Unfortunately this bug can not be reproduced consistently. Some users encounter it occasionally, I encounter it occasionally, one of the developers encounters it occasionally, but whenever we try to reproduce it on purpose the IDE starts working correctly. Very annoying bug.
Perhaps to some extent. I experienced some correlation between the processing of the sketch by the language server during the "Save As" operation. The amount of time the IDE stays in that processing state depends on which board is selected (e.g., the Nano 33 BLE has much more core code than an Uno, so it takes longer).
So it is not necessarily a matter of one board working correctly and another board not working correctly, but rather a matter of one board making it easier to happen to produce the timing of multiple operations occurring concurrently that triggers the bug.
That is all purely conjecture, but other IDE bugs with an "intermittent" nature have turned out to be caused by conflicts between concurrent operations.