Arduino IDE from repository does not work because of "java.lang.NullPointerException thrown while loading gnu.io.RXTXCommDriver"

Bug #1770604 reported by Norbert on 2018-05-11
128
This bug affects 26 people
Affects Status Importance Assigned to Milestone
arduino (Debian)
New
Unknown
arduino (Ubuntu)
Undecided
Unassigned
Bionic
Undecided
Unassigned
rxtx (Debian)
Fix Released
Unknown
rxtx (Ubuntu)
Undecided
Unassigned
Bionic
Undecided
Unassigned

Bug Description

[TEST CASE]
Steps to reproduce:
1. Install Ubuntu 18.04 LTS
2. Install Arduino IDE with `sudo apt-get install arduino`
3. Add your user to dialout group with `sudo usermod -a -G dialout $USER`
4. Connect Arduino board to the computer
5. Launch Arduino IDE

Expected results:
Arduino IDE works normally, user can upload program to board and use Serial Monitor and Serial Plotter.

Actual results:
The serial-port functionality of Arduino IDE is broken, it shows the following messages in termina -

$ arduino
java.lang.NullPointerException thrown while loading gnu.io.RXTXCommDriver
java.lang.NullPointerException thrown while loading gnu.io.RXTXCommDriver

Notes:
1. steps 3-4 are not really necessary.
2. first seen on AskUbuntu ( https://askubuntu.com/q/1034173/66509 ).

[ REGRESSION POTENTIAL ]
* low: using this driver is already broken so its hard to make the situation worse

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: librxtx-java 2.2pre2+dfsg1-1
ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17
Uname: Linux 4.15.0-20-generic x86_64
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Fri May 11 12:40:54 2018
Dependencies:
 gcc-8-base 8-20180414-1ubuntu2
 libc6 2.27-3ubuntu1
 libgcc1 1:8-20180414-1ubuntu2
InstallationDate: Installed on 2018-04-28 (12 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
SourcePackage: rxtx
UpgradeStatus: No upgrade log present (probably fresh install)

Norbert (nrbrtx) wrote :
no longer affects: rxtx
Changed in arduino (Debian):
status: Unknown → New
Changed in rxtx (Debian):
status: Unknown → Fix Released
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in arduino (Ubuntu):
status: New → Confirmed
Changed in rxtx (Ubuntu):
status: New → Confirmed
Bernd Porr (berndporr) wrote :

Also affects me under bionic:
bp1@eeapp:~$ arduino

java.lang.NullPointerException thrown while loading gnu.io.RXTXCommDriver
java.lang.NullPointerException thrown while loading gnu.io.RXTXCommDriver
java.lang.NullPointerException thrown while loading gnu.io.RXTXCommDriver
java.lang.NullPointerException thrown while loading gnu.io.RXTXCommDriver
java.lang.NullPointerException thrown while loading gnu.io.RXTXCommDriver

bp1@eeapp:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
bp1@eeapp:~$

bp1@eeapp:~$ java --version
openjdk 10.0.2 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, mixed mode)
bp1@eeapp:~$

Jose Bordelon (jose-w) wrote :

Same issue with Ubuntu 18.04 Linux kernel 4.15.0-34-generic.

Greg Holst (gregory-holst) wrote :

Same problem on Lubuntu 18.04 with the build from the most current ubuntu repo (1.0.5 I believe. 2:1.0.5+dfsg2-4.1). The 1.8.4 version from the arduino website works fine.

torben baumgartner (toalba) wrote :

Got same on Ubuntu 18.04 with the Arduino IDE 1.8.9 when I want to add Boards in Visual Studio Code with Arduino Ext.

Martijn (kleptog-l) wrote :

Note: the issue is in librxtx-java and is fixed in Debian version 2.2pre2+dfsg1-2. Ubuntu has this since Cosmic. For Bionic you can download and install the Comic version by hand.

For bionic this could be fixed by simply backporting the Cosmis version.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in arduino (Ubuntu Bionic):
status: New → Confirmed
Changed in rxtx (Ubuntu Bionic):
status: New → Confirmed
Michael Vogt (mvo) wrote :

I uploaded rxtx_2.2pre2+dfsg1-1ubuntu1_source.changes as an SRU now. Hopefully this hits the archive soon.

Changed in rxtx (Ubuntu):
status: Confirmed → Fix Released
Changed in rxtx (Ubuntu Bionic):
status: Confirmed → In Progress
description: updated
Changed in arduino (Ubuntu):
status: Confirmed → In Progress
Changed in arduino (Ubuntu Bionic):
status: Confirmed → In Progress
Changed in arduino (Ubuntu):
status: In Progress → Fix Released

Hello Norbert, or anyone else affected,

Accepted rxtx into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/rxtx/2.2pre2+dfsg1-1ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in rxtx (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Cliff Wong (recharged95) wrote :

Same problem, tried fix:
configure: WARNING: using JAVA_HOME environmental variable
adjusted java.home is /usr/lib/jvm/java-13-oracle
checking os.name Linux
checking os.arch amd64
checking java.vendor Oracle Corporation
checking java.version 13.0.1
checking os.version 4.15.0-65-generic
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

Ran standard configure. Failed on make with following output:
warning: [options] bootstrap class path not set in conjunction with -source 1.3
error: Source option 1.3 is no longer supported. Use 7 or later.
error: Target option 1.3 is no longer supported. Use 7 or later.
warning: [options] bootstrap class path not set in conjunction with -source 1.3
warning: [options] bootstrap class path not set in conjunction with -source 1.3
error: Source option 1.3 is no longer supported. Use 7 or later.
error: Target option 1.3 is no longer supported. Use 7 or later.
error: Source option 1.3 is no longer supported. Use 7 or later.
error: Target option 1.3 is no longer supported. Use 7 or later.
warning: [options] bootstrap class path not set in conjunction with -source 1.3
Makefile:610: recipe for target '/home/walt/dev/rxtx-2.2pre2/gnu/io/UnSupportedLoggerException.class' failed
make: *** [/home/walt/dev/rxtx-2.2pre2/gnu/io/UnSupportedLoggerException.class] Error 2

Cannot used Java 8, new ubuntu LTS install and has issues installing Java 8 or Java 11. Java 13 install is fine.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.