FS#60378 - [arduino] Fails to run after update

Attached to Project: Community Packages
Opened by Doğukan Korkmaztürk (dogukan) - Wednesday, 10 October 2018, 22:58 GMT
Last edited by NicoHood (NicoHood) - Monday, 20 May 2019, 15:30 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To NicoHood (NicoHood)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 19
Private No

Details

Description:
Upon installing 1:1.8.7-1, it is impossible to run the application.
It gives the following exception when I try to run it from command line.

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)


I tried removing .arduino15 directory from my user's home directory but it didn't solve the problem.

Steps to reproduce:
Update to latest, launch the Arduino application
This task depends upon

Closed by  NicoHood (NicoHood)
Monday, 20 May 2019, 15:30 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed by upstream
Comment by Doug Newgard (Scimmia) - Thursday, 11 October 2018, 01:47 GMT
With what version of java as default?
Comment by SLP (s3lph) - Thursday, 11 October 2018, 08:46 GMT
I can reproduce this with the following Java versions:
- java-8-openjdk (extra/jdk8-openjdk)
- java-10-openjdk (extra/jdk10-openjdk)
- java-8-jdk (aur/jdk8)
Comment by SLP (s3lph) - Thursday, 11 October 2018, 08:53 GMT
I just noticed, the start script (/usr/bin/arduino) has the java-8-openjdk path hardcoded into it.
Still, I can reproduce the issue with all Java versions noted above when directly running /usr/share/arduino/arduino without a hardcoded JVM.
Comment by miniskipper (miniskipper) - Thursday, 11 October 2018, 13:08 GMT
Seems only new installs are affected where ~/.arduino15/packages/ is empty (no boardpackages installed).

Classic NPE in BaseNoGui.java:
TargetPlatform targetPlatform = getTargetPlatform();
if (targetPlatform != null) {
[...]
}

[...]
librariesIndexer.setArchitecturePriority(getTargetPlatform().getId()); <-- CRASH


If you install arduino-avr-core it should work.
Comment by Alfie (44alphabet) - Friday, 12 October 2018, 09:58 GMT
New install with arduino-avr-core installed also can't start the application.
java.lang.NullPointerException
at processing.app.BaseNoGui.onBoardOrPortChange(BaseNoGui.java:679)
at processing.app.Base.onBoardOrPortChange(Base.java:1313)
at processing.app.Base$12.actionPerformed(Base.java:1540)
at processing.app.Base.rebuildBoardsMenu(Base.java:1490)
at processing.app.Base.<init>(Base.java:267)
at processing.app.Base.main(Base.java:145)

Comment by miniskipper (miniskipper) - Friday, 12 October 2018, 11:36 GMT
Sorry, it worked for me. Did not spend much time, just had a brief look at the code.

I just tried copying the .arduino15 directory from another machine and the application started. Maybe this is a possibility until fixed upstream?
Comment by Matthias (seehma) - Monday, 15 October 2018, 18:23 GMT
Had the same problem and Alfie's workaround also worked for me!
Comment by Felipe (felipe) - Saturday, 27 October 2018, 23:21 GMT
I had the same problem after update my system, but installing arduino-avr-core 1.6.23-1 it was solved.
But I still have the warning

Picked up JAVA_TOOL_OPTIONS:
Error parsing gtk-icon-sizes string: ''
Comment by Jens N (Forsaken) - Tuesday, 18 December 2018, 18:44 GMT
The issue still happens for me with package "arduino-1:1.8.8-1". After installing avr-core like Felipe suggested (thanks for that) it went away. The "yay -S community/arduino-avr-core" i ran to fixed it pulled: "avr-binutils-2.31.1-1 avr-gcc-8.2.0-1 avr-libc-2.0.0-3 avrdude-1:6.3-3 confuse-3.2.2-1 elfutils-0.175-1 libftdi-1.4-2 arduino-avr-core-1.6.23-1"
Comment by Magnus Sörensen (r00tr4t) - Wednesday, 19 December 2018, 14:21 GMT
I have the exact same problem and installing arduino-avr-core did not solve the problem for me.
(edit) Think i solved it by removing .arduino15 directory:

$ mv .arduino15 .arduino15old

And then it worked for me.
Comment by John Stone (IronPig) - Saturday, 05 January 2019, 21:40 GMT
Installing arduino-avr-core solved it for me.
If I am not wrong arduino-avr-core installs packages necessary for the Arduino IDE to compile code, but why is it an optional dependency then?
Comment by Peter Sutton (foxxy) - Sunday, 06 January 2019, 12:51 GMT
Install arduino-avr-core fixed for me as well on a clean install. I think it should be required.
Comment by ⁣ (eimis) - Tuesday, 22 January 2019, 20:36 GMT
Yep arduino-avr-core fixed it. I agree with Peter, it should be required.
Comment by Alex Dewar (billypilgrim) - Sunday, 03 February 2019, 17:59 GMT
Is there any chance the maintainer could take a look at this? It's been broken for a while and should be an easy fix.
Comment by NicoHood (NicoHood) - Sunday, 03 February 2019, 22:26 GMT
I do have a look at the issue, but its an upstream bug. I've described the details here:
https://github.com/arduino/Arduino/issues/8229
Comment by Alfredo Palhares (alfredopalhares) - Wednesday, 27 February 2019, 16:44 GMT
I can reproduce this bug.
Comment by Oskar Roesler (bionade24) - Thursday, 21 March 2019, 05:04 GMT
I can reproduce this bug, too. Should be fixed with the new version, package have to be updated.
Comment by NicoHood (NicoHood) - Saturday, 06 April 2019, 11:16 GMT
Updated to the latest version. Is the bug gone?
Comment by Alex Dewar (billypilgrim) - Saturday, 06 April 2019, 11:18 GMT
Unfortunately not. The program gets as far as the splash screen, then it terminates with a NullPointerException.
Comment by Josh Cox (thoth) - Wednesday, 24 April 2019, 15:31 GMT
this was not resolved for me until `sudo pacman -S arduino-avr-core` was installed. I am in the arduino-avr-core should be a dependency of arduino boat.

Comment by Frank Theile (frank-ka) - Saturday, 04 May 2019, 18:37 GMT
Installing package 'arduino-avr-code' fixed the problem with Arduino IDE for me, too. Thank you @miniskipper!
Comment by NicoHood (NicoHood) - Monday, 06 May 2019, 17:43 GMT
I am currently very limited in time, would someone please be so nice and check if this patch fixes the bug?
https://github.com/arduino/Arduino/pull/8857
Comment by NicoHood (NicoHood) - Monday, 20 May 2019, 15:30 GMT
Fixed with https://github.com/arduino/Arduino/pull/8857
Also backported the patch for current version.

Loading...