[CLOSED/DUP] IDE Crash when external monitor looses power (Mac OS X Catalina)

Hi there

Running on OS X Catalina on a MacBook Pro with an external 30 inch display connected through USB C with a Thunderbolt 3 Express Dock. Arduino version 1.8.12

For some reason my external display looses power (T° protection) intermittently and all the windows thus are moved back to the Laptop display — well not quite all of them, only the Arduino IDE dies in the process. This was not the case prior to 1.8.12

EDIT: And actually the issue appears as soon as you move a window from one Screen to the other. Just tried moving the Serial Monitor to my embedded screen and the IDE died.


[size=8pt][color=green]Model: MacBookPro16,1, BootROM 1037.100.359.0.0 (iBridge: 17.16.14263.0.0,0), 8 processors, 8-Core Intel Core i9, 2,3 GHz, 32 GB, SMC 
Graphics: kHW_IntelUHDGraphics630Item, Intel UHD Graphics 630, spdisplays_builtin
Graphics: kHW_AMDRadeonPro5500MItem, AMD Radeon Pro 5500M, spdisplays_pcie_device, 8 GB
Memory Module: BANK 0/ChannelA-DIMM0, 16 GB, DDR4, 2667 MHz, Micron, -
Memory Module: BANK 2/ChannelB-DIMM0, 16 GB, DDR4, 2667 MHz, Micron, -
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x7BF), wl0: Feb 28 2020 15:31:53 version 9.30.357.35.32.5.47 FWID 01-29ff5c69
Bluetooth: Version 7.0.4f6, 3 services, 27 devices, 1 incoming serial ports
Network Service: Thunderbolt Ethernet Slot  1, Ethernet, en7
Network Service: Wi-Fi, AirPort, en0
PCI Card: ethernet, sppci_ethernet, Thunderbolt@71,0,0
PCI Card: pci1b73,1100, sppci_usbxhci, Thunderbolt@72,0,0
USB Device: Mobile Drive
USB Device: USB 3.1 Bus
USB Device: USB 3.0 Bus
USB Device: 4-Port USB 3.0 Hub
USB Device: USB audio CODEC
USB Device: Hub
USB Device: Hub
USB Device: Apple Cinema HD Display
USB Device: 4-Port USB 2.0 Hub
USB Device: Apple T2 Bus
USB Device: Composite Device
USB Device: Touch Bar Backlight
USB Device: Touch Bar Display
USB Device: Apple Internal Keyboard / Trackpad
USB Device: Headset
USB Device: Ambient Light Sensor
USB Device: FaceTime HD Camera (Built-in)
USB Device: Apple T2 Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 55.3
Thunderbolt Device: Thunderbolt 3 Express Dock HD, Belkin International, Inc., 3, 19.1
Thunderbolt Bus: MacBook Pro, Apple Inc., 55.3[/color]


[color=blue]Process:               Arduino [61310]
Path:                  /Applications/Arduino.app/Contents/MacOS/Arduino
Identifier:            cc.arduino.Arduino
Version:               1.8.12 (1.8.12)
Code Type:             X86-64 (Native)
Parent Process:        ? ? ? [1]
Responsible:           Arduino [61310]
User ID:               501

Date/Time:             2020-04-07 10:10:58.435 +0200
OS Version:            Mac OS X 10.15.4 (19E266)
Report Version:        12
Bridge OS Version:     4.4 (17P4263)
Anonymous UUID:        7933063B-2CC7-44BB-A38A-9D8E6C6ACBE9

Sleep/Wake UUID:       CA656DFE-CF1F-47E4-AB6C-9B73431FC2E6

Time Awake Since Boot: 210000 seconds
Time Since Wake:       26 seconds

System Integrity Protection: enabled

Crashed Thread:        35  Java: Java2D Queue Flusher

Exception Type:        EXC_BAD_INSTRUCTION (SIGABRT)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
-[NSOpenGLContext setView:] must be called from the main thread.[/color]


[/size]

This is a known bug with Arduino IDE 1.8.11 and newer:

The problem is Arduino had to switch from Oracle JRE to OpenJDK in order to notarize the Arduino IDE to meet Apple's new requirements introduced in macOS Catalina. But it turned out that OpenJDK caused a lot of problems, including this one. They went back to Oracle JRE in the Windows and Linux versions of the Arduino IDE for the Arduino IDE 1.8.12 release, but were not able to do this with the macOS version due to the notarization requirement.

The workaround is to use Arduino IDE 1.8.10.

I think they'll have it fixed by the time Arduino IDE 1.8.13 is released.

Thanks Pert - I missed the GitHub report, that's exactly it.