Arduino fails to start on MacOS

I’m running the latest MacOS and latest Arduino IDE.

Running at the terminal yields:

$ /Applications/Arduino.app/Contents/MacOS/Arduino
java.lang.NullPointerException
at processing.app.BaseNoGui.onBoardOrPortChange(BaseNoGui.java:679)
at processing.app.Base.onBoardOrPortChange(Base.java:1312)
at processing.app.Base$12.actionPerformed(Base.java:1539)
at processing.app.Base.rebuildBoardsMenu(Base.java:1489)
at processing.app.Base.(Base.java:273)
at processing.app.Base.main(Base.java:151)

It was working last night and nothing changed since. I tried reinstalling the IDE, but no change.

With no obvious clues, I’m stuck.

Thanks,
Melissa

Actually, there is 1 clue. It fails just after the splash screen says "Preparing Boards...".

Ok, using that clue, after removing the ~/Library/Arduino15/packages/esp32 folder, it did start. So most likely there was something corrupt in there. Hope this helps somebody else. Sorry, tried to post this earlier, but it made me wait.

Thanks for posting an update with your solution! I'm sure that will be helpful to anyone else with the same problem. It is possible that the ESP32 package installation became corrupted in some way. If you still need it, you might try installing the ESP32 package again via Tools > Board > Boards Manager and hopefully it won't cause the same problem again this time.