r/arduino • u/Charlie_Macaw • 6d ago
Arduino IDE dropping code
I have discovered the Arduino IDE drops code when the screen saver kicks in and locks then the screen. On unlock, my code is gone!!
Ive had it happen several times now and its taken me this long to discover whats going on!
This is a HUGE bug.
Has anyone else had this happen?
EDIT: using ver 2.3.7
4
u/Fess_ter_Geek 6d ago
I use Notepad++ for Arduino coding and only use the IDE for uploading.
1
u/Several-Sign5777 6d ago
Same thing. In fact, you don't really need to download the IDE. You can write a macro and use AVRDUDE with Npp :)
3
u/gm310509 400K , 500K , 600K , 640K , 750K 6d ago
I have never experienced this. What happens if you change the screen saver to one of the standard ones (assuming you are using a third party one)?
FWIW, I mostly use IDE 1.8, but occasionally I used 2.3 and haven't noticed this issue. If you save your project, then let the screen saver kick in then move the mouse does it still happen? Is the saved project file "blank"?
4
u/Charlie_Macaw 6d ago
I have just this minute via a Google search found this:
3
u/gdchinacat 6d ago
That's really appalling handling of that bug. A data loss bug has existed for over a year, it's considered an 'imperfection'. Typically data loss bugs are considered among the most severe and are fixed within days. *Especially* when the report identifies the exact commit that introduced it. This reinforces my decision to use a separate IDE and only use the arduino IDE to do uploads (because I haven't bothered to find or write a small script to do it).
3
u/Charlie_Macaw 6d ago
I have used ESPConnect to flash my ESP32 but I’m a newbie and not sure if it can be widely used across the board or if there are limitations
1
u/Several-Sign5777 6d ago
Excuse me, but is it essential for you to use the latest version of the IDE? Maybe you could switch back to the previous version and wait until the bug is fixed?
1
1
-1
u/jongscx 6d ago
Can you post screenshots?
2
u/Charlie_Macaw 6d ago edited 6d ago
Of what? An empty ARDUINO IDE window where my code used to be but now looks like a new sketch window freshly opened?
Sorry for the sarcasm but there is nothing to show you. What do you want to see???
8
u/lovesrayray2018 6d ago
I personally havent seen this happen, but thats probably because i am on IDE 2+ which has auto save enabled on every edit (unless u turn it off). If you are on IDE 2+ you should be able to reopen the saved file right?