arduino-ide icon indicating copy to clipboard operation
arduino-ide copied to clipboard

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

Open kittaakos opened this issue 1 year ago • 5 comments

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

  • https://github.com/arduino/arduino-ide/issues/2297
  • https://github.com/arduino/arduino-ide/issues/2331
  • https://github.com/arduino/arduino-ide/issues/2148#issuecomment-2001967539
  • https://github.com/arduino/arduino-ide/issues/2467
  • https://forum.arduino.cc/t/ide-2-1-0-freezes-during-compile-after-a-period-of-sleep/1138808
  • https://forum.arduino.cc/t/ide-2-1-0-freezes-during-compile-after-a-period-of-sleep/1138808/4
  • https://forum.arduino.cc/t/need-to-close-ide-via-task-manager-after-sleep-win11/1257657
  • https://forum.arduino.cc/t/ide-2-3-2-shows-offline-and-freezes/1300783

Issue checklist

  • [X] I searched for previous reports in the issue tracker
  • [X] I verified the problem still occurs when using the latest nightly build
  • [X] My report contains all necessary details

kittaakos avatar Jul 20 '23 07:07 kittaakos

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

php4fan avatar Dec 24 '23 18:12 php4fan

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.

php4fan avatar Jan 04 '24 17:01 php4fan

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

brennanMKE avatar Jan 31 '24 05:01 brennanMKE

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.

SciElec-JS avatar Feb 08 '24 20:02 SciElec-JS

I face the same issue 🥺

spilz87 avatar Mar 16 '24 12:03 spilz87