Was using the IDE a lot today. Keeping the instances at one or two. If I leave the computer for some hours it complains it lost the cloud (forget the exact wording) then wouldn't close. Had to go to the "Task Manager". It showed 9 lines that were "Arduino IDE"
Did the computer sleep during that time?
Don't recall but most likely it did.
Do you know if, after the initial startup of the IDE, it monitors anything via the internet?
John
I have that same problem (won't close) and can't Save or Save As - most annoying when one has unsaved code mods. Have to use Task Manager to close. Restarting returns to "normal".
Also, Serial Monitor sometimes stops printing after a new download - only way to recover is to close (if you can) and relaunch.
Sometimes goes "not connected". Sometimes cannot reconnect except by closing & relaunching. This may be associated with after downloading when a serial device is connected to Rx (pin 0), but not sure as it is not consistent.
I like IDE 2 a lot but these bugs have me wanting to go back to the IDE 1 version.
Could this be connected to having multiple sketches open? Sometimes one sketch will go not connected while another(s) will remain connected - I dunno.
I had 2.1.0 (?) before 2.3.0 and had none of these issues.
I'll wait a little then if not sorted out will go back to 2.1.0
Sounds like a plan. And I think I will try to stick with only one sketch open to see if that solves anything.
ETA, I now see under "Related Topics" , "I can't close the IDE 2.0.3", "IDE 2.0.3 - Can't close window, can't compile" and "Can't close Arduino IDE!".
It depends on what you prefer but you can reduce the risk of loosing work. There is an auto save option.
- Press
<F1>
or<ctrl><shift>P
. - Type save.
- Check if you have the autosave option enabled.
I asked because there is a known bug where the IDE can sometimes go into a non-functional state it it is running while the computer sleeps. The Arduino IDE developers are tracking this bug here:
No monitoring. It does access the Internet after certain actions performed by the user. For example, if you install a library via Library Manager, the library is downloaded from the Internet.
However, the IDE does a lot of communication via TCP/IP. This communication is not over the Internet, and not even over the LAN. It is instead through the localhost. This is the communication between the various components of the IDE application. If for some reason the IDE can't make those communications, it loses all real functionality. You might see a message in Arduino IDE about it being "offline" in this case. "Offline" means that the frontend is not able to communicate with the backend internally to your computer rather than that it is not able to connect to the Internet. There is also a different warning about the Internet-dependent features being unavailable when the IDE doesn't have access to the Internet.
Thank you for your detailed explanation of the internal communications. The extra detail makes the difference
John
So I grew up with PC's (i.e.as they grew up). I've learned to save often. Sometimes to my detriment. When I pass on, the undertaker will notice I will still make the ctrl-s motion even after I've gone.
I'm not a big fan of autosave as it can be a detriment if code changes don't work out.
For now, I think a workaround to prevent losing code changes on system freeze is to copy the sketch (if that part is still functional) and paste after IDE relaunch.
There is another way, edit your sketch in a independent editor (notpad++, sublime etc)
The IDE will follow the code changes and if the IDE crashes the code is still in your editor.
Interesting but how does the IDE follow the code changes?
Apparently the IDE monitors the code in the open file, if the code changes while the IDE still has it open, the IDE will update the code. Of course the external editor must open the same file as the IDE. Its been this way since v1.
Just tried that but there seems to be no effect (changes to IDE do not reflect in external editor (Notepad in this case) or vice-versa. Are there other steps required to sync the two?
I just tried with MS Notepad and it worked fine. The update in the IDE will not happen until you save any changes in Notepad.
I tried that too (in MS Notepad) but the IDE did not change.
Just to be clear, I have both the IDE and Notepad open and both with the same .ino.
If I make a code change in Notepad and switch to the IDE, will the change be automatically reflected there? I assume here it is not necessary to re-open the sketch in the IDE for this to work.
Screen shot with Notepad in focus and a text change made.
Same shot after saving the file in Notepad, Note Notepad is still in focus.
Still can't get it to work but I notice your Notepad doesn't look the same as mine (different top panel). Anyhow, here's my screenshot:
Shown after Notepad save.
I'm on Win 10 if that makes a difference.
Just noticed that the following is displayed when I exit the IDE:
"The file 'GPS_OLED_Speed_and_Course.ino' has been changed on the file system"
So, the IDE does seem to monitor changes to the file when exiting at least.
I'm no windows 11. Its been too long to remember if this worked in Win10