Java NullPointerException on second compile/upload

Hi everyone. I've been doing various things in Arduino for many years, and now I've hit a problem that I can't seem to figure out, but can definitely reproduce every time. Just started seeing this yesterday. NEVER seen this before.

Open a project, any project, my code, an example, anything...

First time I compile and upload it, it works as it has for years. No problem at all. Second compile/upload and I see this:

java.lang.NullPointerException
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingProgrammer(SerialUploader.java:314)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:89)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
at processing.app.SketchController.upload(SketchController.java:713)
at processing.app.SketchController.exportApplet(SketchController.java:686)
at processing.app.Editor$DefaultExportAppHandler.run(Editor.java:2265)
at java.lang.Thread.run(Thread.java:748)

If I close the IDE, or perhaps even just open another sketch which will pop up a new IDE window, that one will do the same thing. Upload first time fine, second and all subsequent, the above error message shows up.

I've searched forums until the fingerprint of my right pointer finger is no longer there and the paint is worn off my mouse. :slight_smile: Plenty of NullPointerException issues, but of course we all know those are generic, and the call stack isn't really knocking anything loose in my head.

I did recently update java to:

java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)

Until I saw this a day ago I was on some 1.6-ish version of the IDE, but getting this error, I went ahead and updated to the Windows app store version of the latest. Still there.

Windows 10, 64bit,
Arduino 1.8.5 (Windows Store 1.8.10.0)

I've attached a pic of the board menu for reference as well.

Are there any other details I've missed?

board_settings.png

Nothing has changed in what I'm doing and now I get this every time. Not even able to compile the first time anymore. Doesn't matter the board. Uno R2, Mega, WemosD1 mini, NodeMCU.

Tried downloading/installing again several times, various versions.

Java NPE every time. Back to Mongoose for now :-\

I have seen problems (can't say if they were identical) caused by an error in the Arduino code (maybe a missing closing double quote - or maybe something else) that caused Java to choke - presumably because the Arduino folks missed out on some error checking.

However that sort of problem should cause a fail every time.

...R