arduino / arduino-ide

Arduino IDE 2.x
https://www.arduino.cc/en/software
GNU Affero General Public License v3.0
2.18k stars 375 forks source link

IDE might get into a non-functional state after OS sleep/awake cycle #2148

Open kittaakos opened 1 year ago

kittaakos commented 1 year ago

Describe the problem

Users reported that IDE2 could become non-functional after waking the OS from sleep. It has happened on macOS and Windows (eclipse-theia/theia#12707). I tried various pmset options but could not reproduce the defect. Searching boards, libraries, and compile+upload do not work.

CleanShot 2023-07-19 at 06 50 33@2x

To reproduce

Sleep the OS for enough time (I do not know how much) while IDE2 is running, wake the OS, IDE2 does not work. Even quitting the app does not do anything.

Expected behavior

After the OS wake, IDE2 works.

Arduino IDE version

2.1.1

Operating system

macOS

Operating system version

13.4.1

Additional context

Related IDE2 change: https://github.com/arduino/arduino-ide/commit/30136b0ef208a48042ecb1e18407ef525b772252 Upstream issue: https://github.com/eclipse-theia/theia/issues/12707

Additional Reports

Issue checklist

php4fan commented 8 months ago

It's not only after waking up from sleep. It also happens randomly out of the blue while I'm using the IDE.

php4fan commented 7 months ago

The most painful part of this issue is having to kill all the arduino processes when this happens.

The window's close button does nothing, and there are like a dozen processes related to Arduino. Some of them, when killed, will cause a few other to die in cascade, but (a) they are not easy to identify, and (b) there doesn't seem to be a single one of them that will kill all of the others. You always need to kill a few one by one. And killall arduino doesn't accomplish anything.

Any workaround for easily killing all arduino processes when this happens, would alleviate the pain greatly while we wait for a full fix.

brennanMKE commented 6 months ago

This was happening sporadically a few weeks ago but now it is happening after just being open for a few minutes.

SciElec-JS commented 6 months ago

I still have this issue every day. Status along the bottom still shows "Offline" (cannot connect to the backend), IDE fails to save projects, cannot close itself, has to be killed with task manager. I locked and left my computer at the end of the day yesterday, and when I woke it up and logged back in this morning, the Arduino backend process appears to have died again. I'm running Windows 10 22H2, Arduino IDE 2.3.0, Arduino-Pico 3.7.0, Board selected: Raspberry Pi Pico, port selected: COM8 (USB-CDC virtual COM port exposed by the Pico), the Pico was not physically connected at the time.

If anyone working this issue needs logs or something, let me know and I'll do my best to get them.

spilz87 commented 5 months ago

I face the same issue 🥺