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

Bug #1770604 reported by Norbert
132
This bug affects 27 people
Affects Status Importance Assigned to Milestone
arduino (Debian)
Fix Released
Unknown
arduino (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
In Progress
Undecided
Unassigned
rxtx (Debian)
Fix Released
Unknown
rxtx (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
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)

Revision history for this message
Norbert (nrbrtx) wrote :
no longer affects: rxtx
Changed in arduino (Debian):
status: Unknown → New
Changed in rxtx (Debian):
status: Unknown → Fix Released
Revision history for this message
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
Revision history for this message
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:~$

Revision history for this message
Jose Bordelon (jose-w) wrote :

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

Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
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
Revision history for this message
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
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

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
Revision history for this message
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.

Revision history for this message
Jens Rosenboom (frickler) wrote :

Verified that installing librxtx-java 2.2pre2+dfsg1-1ubuntu1 solves the issue for me.

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rxtx - 2.2pre2+dfsg1-1ubuntu1

---------------
rxtx (2.2pre2+dfsg1-1ubuntu1) bionic; urgency=medium

  * fix "java.lang.NullPointerException in gnu.io.RXTXCommDriver"
    when using the arduino IDE (LP: #1770604)
  * fix building on bionic

 -- Michael Vogt <email address hidden> Sun, 06 Oct 2019 16:15:04 +0200

Changed in rxtx (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for rxtx has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Changed in arduino (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
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.