Error: java.lang.NullPointerException

KenArton
Posts: 2
Joined: Fri Jun 21, 2019 4:18 pm

Error: java.lang.NullPointerException

Postby KenArton » Fri Jun 21, 2019 4:24 pm

I am trying to program the ESP32 Dev Module using Arduino IDE (v 1.8.9), on Windows 10.
Using Board Manager, I have installed "esp32 by Espressif Systems"

I'm starting with an absolute minimum sketch that does nothing, as follows:
void setup() {
}
void loop() {
}

I have selected board “ESP32 Dev Module”
and programmer “Arduino as ISP”
Compile is OK.
I then attempt Upload Using Programmer.
I get following error message:

java.lang.NullPointerException
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingProgrammer(SerialUploader.java:295)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:90)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:82)
at processing.app.SketchController.upload(SketchController.java:736)
at processing.app.SketchController.exportApplet(SketchController.java:703)
at processing.app.Editor$DefaultExportAppHandler.run(Editor.java:2125)
at java.lang.Thread.run(Thread.java:748)

I have spent several hours Googling “java.lang.NullPointerException”.
There are many links, mostly just confusing and not offering a fix.
The main message seems to be that there is a mistake in the code, and indeed the error message
seems to be pointing at errors at specific lines in seven different .java files.

But I have done a search of my whole C drive and cannot find any of these .java files.

I have tried uninstalling Arduino, deleting folder Arduino15, and re-installing,
always with same problem.

Can you help?
Many thanks.

KenArton
Posts: 2
Joined: Fri Jun 21, 2019 4:18 pm

Re: Error: java.lang.NullPointerException -- Solved!

Postby KenArton » Sun Jun 23, 2019 3:14 pm

Further to my Post, problem solved.
I must upload the sketch using "Upload", NOT "Upload Using Programmer".
With "Upload", everything works OK.

Who is online

Users browsing this forum: No registered users and 70 guests