Description
Describe the problem
Sometimes the IDE will stop saving sketches.
I just spent two hours editing code in the IDE, I was saving code regularly through the session. When I tried to compile the code the IDE wouldn't compile, the compile button got 'stuck' and the 'Compiling' pop up appeared but nothing happened. A message appeared across the bottom that said 'Offline'.
I tried to close the app but it wouldn't respond.
All through this the editor continued to work and the save option in the menu could be selected.
When I forced quit the application and restarted it, ALL the code I had written in the last two hours was gone - it had failed to save anything.
To reproduce
No idea how to reproduce apart from having a sketch open and sending the computer to sleep several times in a row.
Perhaps this is an issue related to windows in sleep mode.
I have NOT verified this in the nightly build because I can't easily reproduce it. If you insist on excluding bug reports for hard to reproduce items then you will miss some important bugs.
Expected behavior
The IDE shouldn't allow code to be edited, and respond to the save menu being selected, but not actually save anything.
Arduino IDE version
Version: 2.1.0 Date: 2023-04-19T15:31:10.185Z CLI Version: 0.32.2
Operating system
Windows
Operating system version
10
Additional context
No response
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