Skip to content

java.lang.NullPointerException on 1.8.7 #8229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jaxxzer opened this issue Nov 24, 2018 · 23 comments · Fixed by #8857
Closed

java.lang.NullPointerException on 1.8.7 #8229

jaxxzer opened this issue Nov 24, 2018 · 23 comments · Fixed by #8857

Comments

@jaxxzer
Copy link

jaxxzer commented Nov 24, 2018

On archlinux:

$ pacman -S arduino
$ arduino
Picked up JAVA_TOOL_OPTIONS: 
java.lang.NullPointerException
	at processing.app.BaseNoGui.onBoardOrPortChange(BaseNoGui.java:679)
	at processing.app.Base.onBoardOrPortChange(Base.java:1313)
	at processing.app.Base.<init>(Base.java:276)
	at processing.app.Base.main(Base.java:145)
@facchinm
Copy link
Member

Hi @jaxxzer ,
we don't officially support any version of the IDE except the ones from https://www.arduino.cc/en/Main/Software.
May you test the Linux x86_64 build and check it it also exhibit the same problem?
Otherwise probably Arch bugtracker is the right place where to file this issue. @NicoHood

@facchinm facchinm added the Waiting for feedback More information must be provided before we can proceed label Nov 26, 2018
@NicoHood
Copy link
Contributor

NicoHood commented Nov 27, 2018

I do not have this issue. Which java version did you install?
Try to update your system. Edit: And reboot. Just in case.

@jaxxzer
Copy link
Author

jaxxzer commented Nov 27, 2018

May you test the Linux x86_64 build and check it it also exhibit the same problem?

What do you know, it works!

Re the pacman installation...

Try to update your system. Edit: And reboot. Just in case.

Done so, no difference.

Which java version did you install?

It was installed as a dependency of the arduino package.

$ java -version
openjdk version "1.8.0_192"
OpenJDK Runtime Environment (build 1.8.0_192-b26)
OpenJDK 64-Bit Server VM (build 25.192-b26, mixed mode)

@NicoHood
Copy link
Contributor

I have the same java version report. I suggest installing java 7 and 8 manually.
Another solution would be to remove the .arduino directory (maybe backup before) or try to install the optional dependencies first.

@PaulStoffregen
Copy link
Contributor

PaulStoffregen commented Nov 27, 2018

I use 1.8.7 on Ubuntu 18.04 x86 64 bit. Works great. Arduino.cc version has java bundled with it in the "java" folder. Here's Java the version info:

$ ./arduino-1.8.7/java/bin/java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)

Highly recommend getting the officially supported version from Arduino's downloads page. 1.8.7 was developed and tested against this version of Java, so if you simply download and use the supported version it should use the correct java that comes as part of the package.

@silvanocerza
Copy link

I have the same issue, same version of Java, same version of the IDE. Installing the Linux x86_64 build solved the issue.

@skuroedov
Copy link

skuroedov commented Jan 27, 2019

Install arduino-avr-core package.

It should work., more info here

@NicoHood
Copy link
Contributor

I think the problem is, that on a fresh install, with no board package installed, the IDE crashes. ArchLinux does not ship the default board package, because we package our own with upstream avr-gcc. But this package is not installed by default, as it is optional for those people who want to stick to the older arduino core. You can install it manually in the board manager.

The problem here is, that on the first startup none of both exists and the IDE crashes. There is also a bugreport with more details here:
https://bugs.archlinux.org/task/60378#comment175516

It seems that a special directory must be created first. This issue should be fixed in the IDE.

@dianamazo
Copy link

please how Install arduino-avr-core package

@per1234 per1234 removed the Waiting for feedback More information must be provided before we can proceed label Feb 12, 2019
@skuroedov
Copy link

skuroedov commented Feb 13, 2019

@dianamazo In ArchLinux it is # pacman -S arduino-avr-core or find it in some grpahical package manager like pamac.

@NicoHood
Copy link
Contributor

@facchinm People are contacting me over and over again that their IDE does not start. As explained earlier this is a bug in the IDE that should get fixed.

I do not want to make the avr core a normal dependency, as I had several reasons to make it optional and its no excuse to fix this issue. Its very likely that the fix is quite simple.

@alfredopalhares
Copy link

I agree with @NicoHood the ide should not assume a default board is there.

@facchinm
Copy link
Member

facchinm commented Mar 4, 2019

@NicoHood there's a bit of logic that requires at least on platform to be installed. It could be fixed easily with a fake dependency that just injects a fake board; this would becomes a compulsory dependency, while marking arduino-avr-core incompatible with it (so pacman asks if you want to remove it to install the real core)

@bluepoke
Copy link

bluepoke commented Mar 5, 2019

I have this issue on Windows 10 with version 1.8.8 (installation package).
Reinstallation did not fix the problem.

@dvukovic
Copy link

dvukovic commented Mar 6, 2019

Win 7, Ver 1.8.8 same message.
What does this message even mean ?

What kind of problems are going to happen that I can not see ?

@crenn
Copy link

crenn commented Mar 8, 2019

Just experienced this on Win10 Pro x64, Version 1.8.8. Seemed to fix itself after I just went into the board manager once.

@wallanpsantos
Copy link

wallanpsantos commented May 5, 2019

I solved the problem by installing arduino-avr-core

Manjaro:

sudo pacman -S arduino-avr-core arduino

Link: https://bbs.archlinux.org/viewtopic.php?id=241249

@NicoHood
Copy link
Contributor

NicoHood commented May 5, 2019

@wallanpereira This has been mentioned already, but does not solve the problem. The Arduino team should fix this bug. All new users got this problem.

@wallanpsantos
Copy link

@NicoHood This is good, thanks for the info.

@NicoHood
Copy link
Contributor

Thanks for patching this long time bug! :-)

facchinm added a commit to facchinm/Arduino that referenced this issue Jun 16, 2019
@janbothatagger
Copy link

I think the problem is, that on a fresh install, with no board package installed, the IDE crashes. ArchLinux does not ship the default board package, because we package our own with upstream avr-gcc. But this package is not installed by default, as it is optional for those people who want to stick to the older arduino core. You can install it manually in the board manager.

The problem here is, that on the first startup none of both exists and the IDE crashes. There is also a bugreport with more details here:
https://bugs.archlinux.org/task/60378#comment175516

It seems that a special directory must be created first. This issue should be fixed in the IDE.

Thanks, this fixed it for me.

@ZoomRmc
Copy link

ZoomRmc commented Dec 2, 2020

Still got the same (?) bug on fresh install, 1.8.13:

Picked up JAVA_TOOL_OPTIONS:
Set log4j store directory /home/xxx/.arduino15
java.lang.NullPointerException
	at processing.app.Base.rebuildProgrammerMenu(Base.java:1705)
	at processing.app.Base.<init>(Base.java:286)
	at processing.app.Base.main(Base.java:150)

@matthijskooijman
Copy link
Collaborator

@ZoomRmc, you're seeing a different problem. The symptom (NullPointerException) is similar, but the location where it happened is totally different.

I'm pretty sure that you're seeing the problem that is fixed by #10922. Maybe you could try the version from that PR (see the comment by ArduinoBot) to see if that fixes your problem and report your findings in that PR? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.