I'm trying to read data from serial port with rxtx library (https://github.com/rxtx/rxtx) on Ubuntu 14.04 (x64). I have simple java applet build with and running on java 1.6 (was trying 1.8 with the same result).
And when listener wants to read input it crashes with the following error.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyUSB0
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f90ac2e2462, pid=6721, tid=140259339552512
#
# JRE version: 6.0_45-b06
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.45-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [librxtxSerial.so+0x6462] long double restrict+0x52
#
# An error report file with more information is saved as:
# /home/etxzay/IdeaProjects/Solenoid/hs_err_pid6721.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Experimental: JNI_OnLoad called.
Process finished with exit code 134
Looks like it's a kind of native RXTX library (librxtxSerial.so) problem. Would appreciate any help.
The answer is... use JSSC (https://github.com/scream3r/java-simple-serial-connector). It works.